#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
#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
};\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
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