version 0.3.29
[fms.git] / include / nntp / nntpconnection.h
index dd365c4..d048375 100644 (file)
@@ -1,13 +1,15 @@
 #ifndef _nntpconnection_\r
 #define _nntpconnection_\r
 \r
+#include "../threadwrapper/cancelablerunnable.h"\r
 #include "../socketdefines.h"\r
 #include "../ilogger.h"\r
 #include "../message.h"\r
+#include "../localidentity.h"\r
+#include "../ithreaddatabase.h"\r
 \r
 #include <string>\r
 #include <vector>\r
-#include <zthread/Runnable.h>\r
 \r
 #ifdef _WIN32\r
 \r
@@ -20,7 +22,7 @@
        #include <arpa/inet.h>\r
 #endif\r
 \r
-class NNTPConnection:public ZThread::Runnable,public ILogger//,public IDatabase\r
+class NNTPConnection:public CancelableRunnable,public ILogger,public IThreadDatabase\r
 {\r
 public:\r
        NNTPConnection(SOCKET sock);\r
@@ -45,11 +47,15 @@ private:
        };\r
        struct ClientStatus\r
        {\r
+               ClientStatus(SQLite3DB::DB *db):m_authuser(db)          {}\r
+\r
                ClientMode m_mode;\r
                bool m_allowpost;\r
                bool m_isposting;\r
                long m_boardid;\r
                long m_messageid;\r
+               LocalIdentity m_authuser;               // -1 if user not authenticated, otherwise id of user from tblLocalIdentity\r
+               bool m_authenticated;\r
        };\r
 \r
        void SendBuffered(const std::string &data);\r
@@ -82,6 +88,10 @@ private:
        const bool HandleNewGroupsCommand(const NNTPCommand &command);\r
        const bool HandlePostCommand(const NNTPCommand &command);\r
        const bool HandleOverCommand(const NNTPCommand &command);\r
+       const bool HandleAuthInfoCommand(const NNTPCommand &command);\r
+       const bool HandleGetTrustCommand(const NNTPCommand &command);\r
+       const bool HandleSetTrustCommand(const NNTPCommand &command);\r
+       const bool HandleGetTrustListCommand(const NNTPCommand &command);\r
 \r
        SOCKET m_socket;\r
        ClientStatus m_status;\r