#ifndef PROTOCOL_LISTENER_H #define PROTOCOL_LISTENER_H #include #include #include class ProtocolListener : public BUrlProtocolListener { public: ProtocolListener ( bool ); virtual ~ProtocolListener(); virtual void DataReceived(BUrlRequest*, const char*, off_t, ssize_t); void SetDownloadIO ( BDataIO* ); BDataIO* GetDownloadIO ( ); void SetSha1 ( boost::uuids::detail::sha1* ); boost::uuids::detail::sha1* GetSha1 ( ); BString GetHash ( ); private: BDataIO* fDownloadIO; boost::uuids::detail::sha1* fSha1; bool fTraceLogging; }; #endif