X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=include%2Fnntp%2Fnntpconnection.h;h=15c208017e33ce64137068ebe51a6778233a4304;hb=746a74c9963728fcbbfe4cdc36c863c653a142ca;hp=d2bf16792a0df418be7f7a46086d740b6354a067;hpb=6b896a9e1dc143bba86795be1e9336549db9b85f;p=fms.git diff --git a/include/nntp/nntpconnection.h b/include/nntp/nntpconnection.h index d2bf167..15c2080 100644 --- a/include/nntp/nntpconnection.h +++ b/include/nntp/nntpconnection.h @@ -1,15 +1,27 @@ #ifndef _nntpconnection_ #define _nntpconnection_ +#include "../threadwrapper/cancelablerunnable.h" #include "../socketdefines.h" #include "../ilogger.h" #include "../message.h" +#include "../localidentity.h" #include #include -#include -class NNTPConnection:public ZThread::Runnable,public ILogger//,public IDatabase +#ifdef _WIN32 + +#else + #include + #include + #include + #include + #include + #include +#endif + +class NNTPConnection:public CancelableRunnable,public ILogger { public: NNTPConnection(SOCKET sock); @@ -39,6 +51,8 @@ private: bool m_isposting; long m_boardid; long m_messageid; + LocalIdentity m_authuser; // -1 if user not authenticated, otherwise id of user from tblLocalIdentity + bool m_authenticated; }; void SendBuffered(const std::string &data); @@ -51,7 +65,7 @@ private: void HandlePostedMessage(const std::string &message); void SendArticleParts(const NNTPCommand &command); - void SendArticleOverInfo(const Message &message); + void SendArticleOverInfo(Message &message); // various NNTP commands to handle const bool HandleQuitCommand(const NNTPCommand &command); @@ -71,6 +85,10 @@ private: const bool HandleNewGroupsCommand(const NNTPCommand &command); const bool HandlePostCommand(const NNTPCommand &command); const bool HandleOverCommand(const NNTPCommand &command); + const bool HandleAuthInfoCommand(const NNTPCommand &command); + const bool HandleGetTrustCommand(const NNTPCommand &command); + const bool HandleSetTrustCommand(const NNTPCommand &command); + const bool HandleGetTrustListCommand(const NNTPCommand &command); SOCKET m_socket; ClientStatus m_status;