Make Service::HTTP::Context non-copyable
This commit is contained in:
parent
5af6a1d8ee
commit
2d09355a25
@ -59,14 +59,14 @@ void HTTP_C::CreateContext(Kernel::HLERequestContext& ctx) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Context context{};
|
++context_counter;
|
||||||
context.url = std::move(url);
|
contexts.emplace(context_counter, Context());
|
||||||
context.method = method;
|
contexts[context_counter].url = std::move(url);
|
||||||
context.state = RequestState::NotStarted;
|
contexts[context_counter].method = method;
|
||||||
|
contexts[context_counter].state = RequestState::NotStarted;
|
||||||
// TODO(Subv): Find a correct default value for this field.
|
// TODO(Subv): Find a correct default value for this field.
|
||||||
context.socket_buffer_size = 0;
|
contexts[context_counter].socket_buffer_size = 0;
|
||||||
context.handle = ++context_counter;
|
contexts[context_counter].handle = ++context_counter;
|
||||||
contexts[context_counter] = std::move(context);
|
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
@ -59,7 +59,15 @@ struct RootCertChain {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Represents an HTTP context.
|
/// Represents an HTTP context.
|
||||||
struct Context {
|
class Context final {
|
||||||
|
public:
|
||||||
|
Context() = default;
|
||||||
|
Context(const Context&) = delete;
|
||||||
|
Context& operator=(const Context&) = delete;
|
||||||
|
|
||||||
|
Context(Context&& other) = default;
|
||||||
|
Context& operator=(Context&&) = default;
|
||||||
|
|
||||||
struct Proxy {
|
struct Proxy {
|
||||||
std::string url;
|
std::string url;
|
||||||
std::string username;
|
std::string username;
|
||||||
@ -73,6 +81,7 @@ struct Context {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RequestHeader {
|
struct RequestHeader {
|
||||||
|
RequestHeader(std::string name, std::string value) : name(name), value(value){};
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string value;
|
std::string value;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user