mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
LibCore: Put all classes in the Core namespace and remove the leading C
I've been wanting to do this for a long time. It's time we start being consistent about how this stuff works. The new convention is: - "LibFoo" is a userspace library that provides the "Foo" namespace. That's it :^) This was pretty tedious to convert and I didn't even start on LibGUI yet. But it's coming up next.
This commit is contained in:
parent
b7e3810b5c
commit
2d39da5405
265 changed files with 1380 additions and 1167 deletions
|
@ -31,19 +31,21 @@
|
|||
#include <LibCore/CHttpResponse.h>
|
||||
#include <LibCore/CNetworkJob.h>
|
||||
|
||||
class CTCPSocket;
|
||||
namespace Core {
|
||||
|
||||
class CHttpJob final : public CNetworkJob {
|
||||
C_OBJECT(CHttpJob)
|
||||
class TCPSocket;
|
||||
|
||||
class HttpJob final : public NetworkJob {
|
||||
C_OBJECT(HttpJob)
|
||||
public:
|
||||
explicit CHttpJob(const CHttpRequest&);
|
||||
virtual ~CHttpJob() override;
|
||||
explicit HttpJob(const HttpRequest&);
|
||||
virtual ~HttpJob() override;
|
||||
|
||||
virtual void start() override;
|
||||
virtual void shutdown() override;
|
||||
|
||||
CHttpResponse* response() { return static_cast<CHttpResponse*>(CNetworkJob::response()); }
|
||||
const CHttpResponse* response() const { return static_cast<const CHttpResponse*>(CNetworkJob::response()); }
|
||||
HttpResponse* response() { return static_cast<HttpResponse*>(NetworkJob::response()); }
|
||||
const HttpResponse* response() const { return static_cast<const HttpResponse*>(NetworkJob::response()); }
|
||||
|
||||
private:
|
||||
void on_socket_connected();
|
||||
|
@ -56,11 +58,13 @@ private:
|
|||
Finished,
|
||||
};
|
||||
|
||||
CHttpRequest m_request;
|
||||
RefPtr<CTCPSocket> m_socket;
|
||||
HttpRequest m_request;
|
||||
RefPtr<TCPSocket> m_socket;
|
||||
State m_state { State::InStatus };
|
||||
int m_code { -1 };
|
||||
HashMap<String, String> m_headers;
|
||||
Vector<ByteBuffer> m_received_buffers;
|
||||
size_t m_received_size { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue