version 0.3.33
[fms.git] / freenet / identityintroductioninserter.h
1 #ifndef _identityintroductioninserter_\r
2 #define _identityintroductioninserter_\r
3 \r
4 #include "../idatabase.h"\r
5 #include "../datetime.h"\r
6 #include "../ilogger.h"\r
7 #include "ifreenetregistrable.h"\r
8 #include "ifcpconnected.h"\r
9 #include "ifcpmessagehandler.h"\r
10 #include "iperiodicprocessor.h"\r
11 \r
12 class IdentityIntroductionInserter:public IFreenetRegistrable,public IFCPConnected,public IFCPMessageHandler,public IPeriodicProcessor,public IDatabase,public ILogger\r
13 {\r
14 public:\r
15         IdentityIntroductionInserter();\r
16         IdentityIntroductionInserter(FCPv2 *fcp);\r
17 \r
18         void FCPConnected();\r
19         void FCPDisconnected();\r
20 \r
21         const bool HandleMessage(FCPMessage &message);\r
22 \r
23         void Process();\r
24 \r
25         void RegisterWithThread(FreenetMasterThread *thread);\r
26 \r
27 private:\r
28         void Initialize();\r
29         void CheckForNewInserts();\r
30         void StartInsert(const long localidentityid, const std::string &day, const std::string &UUID, const std::string &solution);\r
31 \r
32         std::string m_messagebase;\r
33         DateTime m_lastchecked;\r
34         bool m_inserting;\r
35         \r
36 };\r
37 \r
38 #endif  // _identityintroductioninserter_\r