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
Notes:
sideshowbarker
2024-07-19 06:23:41 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d2ae37f88f7
1 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue