diff options
Diffstat (limited to 'Servers/ProtocolServer/PSClientConnection.h')
-rw-r--r-- | Servers/ProtocolServer/PSClientConnection.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Servers/ProtocolServer/PSClientConnection.h b/Servers/ProtocolServer/PSClientConnection.h new file mode 100644 index 0000000000..190e9bd062 --- /dev/null +++ b/Servers/ProtocolServer/PSClientConnection.h @@ -0,0 +1,26 @@ +#pragma once + +#include <AK/Badge.h> +#include <LibCore/CoreIPCServer.h> +#include <ProtocolServer/ProtocolServerEndpoint.h> + +class Download; + +class PSClientConnection final : public IPC::Server::ConnectionNG<ProtocolServerEndpoint> + , public ProtocolServerEndpoint { + C_OBJECT(PSClientConnection) +public: + explicit PSClientConnection(CLocalSocket&, int client_id); + ~PSClientConnection() override; + + virtual void die() override; + + void did_finish_download(Badge<Download>, Download&, bool success); + void did_progress_download(Badge<Download>, Download&); + +private: + virtual OwnPtr<ProtocolServer::GreetResponse> handle(const ProtocolServer::Greet&) override; + virtual OwnPtr<ProtocolServer::IsSupportedProtocolResponse> handle(const ProtocolServer::IsSupportedProtocol&) override; + virtual OwnPtr<ProtocolServer::StartDownloadResponse> handle(const ProtocolServer::StartDownload&) override; + virtual OwnPtr<ProtocolServer::StopDownloadResponse> handle(const ProtocolServer::StopDownload&) override; +}; |