mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 08:45:06 +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:
parent
bc7bf727dd
commit
d2ae37f88f
1 changed files with 6 additions and 4 deletions
|
@ -35,12 +35,12 @@ namespace Protocol {
|
||||||
|
|
||||||
class Download;
|
class Download;
|
||||||
|
|
||||||
class Client : public IPC::ServerConnection<ProtocolClientEndpoint, ProtocolServerEndpoint>
|
class Client
|
||||||
|
: public IPC::ServerConnection<ProtocolClientEndpoint, ProtocolServerEndpoint>
|
||||||
, public ProtocolClientEndpoint {
|
, public ProtocolClientEndpoint {
|
||||||
C_OBJECT(Client)
|
C_OBJECT(Client);
|
||||||
public:
|
|
||||||
Client();
|
|
||||||
|
|
||||||
|
public:
|
||||||
virtual void handshake() override;
|
virtual void handshake() override;
|
||||||
|
|
||||||
bool is_supported_protocol(const String&);
|
bool is_supported_protocol(const String&);
|
||||||
|
@ -49,6 +49,8 @@ public:
|
||||||
bool stop_download(Badge<Download>, Download&);
|
bool stop_download(Badge<Download>, Download&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Client();
|
||||||
|
|
||||||
virtual void handle(const Messages::ProtocolClient::DownloadProgress&) override;
|
virtual void handle(const Messages::ProtocolClient::DownloadProgress&) override;
|
||||||
virtual void handle(const Messages::ProtocolClient::DownloadFinished&) override;
|
virtual void handle(const Messages::ProtocolClient::DownloadFinished&) override;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue