version 0.3.29
[fms.git] / include / freenet / introductionpuzzleinserter.h
index c83cb9f..e376dbf 100644 (file)
@@ -3,22 +3,26 @@
 \r
 #include "iindexinserter.h"\r
 \r
-//class IntroductionPuzzleInserter:public IFreenetRegistrable,public IFCPConnected,public IFCPMessageHandler,public IPeriodicProcessor,public IDatabase,public ILogger\r
+#include <map>\r
+#include <Poco/DateTime.h>\r
+\r
 class IntroductionPuzzleInserter:public IIndexInserter<long>\r
 {\r
 public:\r
-       IntroductionPuzzleInserter();\r
-       IntroductionPuzzleInserter(FCPv2 *fcp);\r
+       IntroductionPuzzleInserter(SQLite3DB::DB *db);\r
+       IntroductionPuzzleInserter(SQLite3DB::DB *db, FCPv2::Connection *fcp);\r
 \r
 private:\r
        void Initialize();\r
        void CheckForNeededInsert();\r
        const bool StartInsert(const long &localidentityid);\r
        void GenerateCaptcha(std::string &encodeddata, std::string &solution);\r
-       const bool HandlePutSuccessful(FCPMessage &message);\r
-       const bool HandlePutFailed(FCPMessage &message);\r
+       const bool HandlePutSuccessful(FCPv2::Message &message);\r
+       const bool HandlePutFailed(FCPv2::Message &message);\r
 \r
-       DateTime m_lastchecked;\r
+       Poco::DateTime m_lastchecked;\r
+       int m_maxpuzzleinserts;\r
+       std::map<int,Poco::DateTime> m_lastinserted;\r
 \r
 };\r
 \r