1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 18:05:08 +00:00

LibProtocol: Make Protocol::Client constructor private

Core::Object derived objects should always have private constructors
and use construct() for construction. This prevents accidentally
keeping them in non-reference-counting containers.
This commit is contained in:
Andreas Kling 2020-05-19 17:40:44 +02:00
parent bc7bf727dd
commit d2ae37f88f

View file

@ -35,12 +35,12 @@ namespace Protocol {
class Download;
class Client : public IPC::ServerConnection<ProtocolClientEndpoint, ProtocolServerEndpoint>
class Client
: public IPC::ServerConnection<ProtocolClientEndpoint, ProtocolServerEndpoint>
, public ProtocolClientEndpoint {
C_OBJECT(Client)
public:
Client();
C_OBJECT(Client);
public:
virtual void handshake() override;
bool is_supported_protocol(const String&);
@ -49,6 +49,8 @@ public:
bool stop_download(Badge<Download>, Download&);
private:
Client();
virtual void handle(const Messages::ProtocolClient::DownloadProgress&) override;
virtual void handle(const Messages::ProtocolClient::DownloadFinished&) override;