Update the post insert behaviour of the RtcomEventLogger backend to update storage...
[qwerkisync] / DBBackends / RtcomEventLogger.h
index e00f205..728c137 100644 (file)
@@ -31,17 +31,21 @@ typedef _RTComEl RTComEl;
 
 template <typename T1> class QList;
 class QString;
+class QStringList;
 
 #include <QHash>
 
 namespace DBBackends
 {
+       namespace RtcomEventLoggerComponents { class TriggerDisabler; }
+
        class RtcomEventLogger : public iDBBackend
        {
        public:
                RtcomEventLogger(const Settings &settings);
                RtcomEventLogger(const Settings &settings, const EventTypes::RtcomEvent &event);
 
+               virtual void PreInsert();
                virtual void Insert(EventTypes::iEvent &event, const NumberToNameLookup &numberToNameLookup);
                virtual void PostInsert();
                virtual void Process(EventProcessors::iEventProcessor &eventProcessor);
@@ -53,21 +57,24 @@ namespace DBBackends
                virtual EventTypes::iEvent *const CreateEvent(RTComElEvent &revent, QList<RTComElAttachment*> &rattachments);
                void ProcessService(EventProcessors::iEventProcessor &processor, const EventTypes::eEventTypes service, const RTComEl &el);
 
-               virtual const QList<int> &InsertedIDs() const { return m_InsertedIDs; }
+               virtual const QList<uint> &InsertedIDs() const { return m_InsertedIDs; }
 
        public:
                virtual void ClearInsertedIDs();
 
        private:
+               void UpdateInsertedStorageTimes();
                void Reindex();
-               QList<int> &InsertedIDs() { return m_InsertedIDs; }
+               QStringList IntsToStringList(QList<uint> &values);
 
-       private:
                const Settings &m_Settings;
-               const QString mk_DBPath;
-               QList<int> m_InsertedIDs;
 
                QHash<EventTypes::eEventTypes, int> m_ServiceIDs;
+
+               QList<uint> m_InsertedIDs;
+               QList<uint> &InsertedIDs() { return m_InsertedIDs; }
+
+               RtcomEventLoggerComponents::TriggerDisabler *m_TriggerDisabler;
        };
 }