#pragma once #include #include #include class Download; class SharedBuffer; class PSClientConnection final : public IClientConnection , public ProtocolServerEndpoint { C_OBJECT(PSClientConnection) public: explicit PSClientConnection(CLocalSocket&, int client_id); ~PSClientConnection() override; virtual void die() override; void did_finish_download(Badge, Download&, bool success); void did_progress_download(Badge, Download&); private: virtual OwnPtr handle(const ProtocolServer::Greet&) override; virtual OwnPtr handle(const ProtocolServer::IsSupportedProtocol&) override; virtual OwnPtr handle(const ProtocolServer::StartDownload&) override; virtual OwnPtr handle(const ProtocolServer::StopDownload&) override; virtual OwnPtr handle(const ProtocolServer::DisownSharedBuffer&) override; HashMap> m_shared_buffers; };