X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=DBBackends%2FRtcomEventLogger.h;h=e00f20515705d00be0670586fd4bd549128f0f8f;hb=09cf284409d11f5269cbc106429046f993bffa68;hp=d99d4c45b5c2327140e16fd373c1b381a75096d8;hpb=4abcc9ab77d80562371024c243eb6b4f9f28dfcc;p=qwerkisync diff --git a/DBBackends/RtcomEventLogger.h b/DBBackends/RtcomEventLogger.h index d99d4c4..e00f205 100644 --- a/DBBackends/RtcomEventLogger.h +++ b/DBBackends/RtcomEventLogger.h @@ -20,15 +20,17 @@ #define DBBACKENDS_RTCOMEVENTLOGGER_H #include "iDBBackend.h" - -class Settings; +#include "Settings.h" class _RTComElAttachment; typedef _RTComElAttachment RTComElAttachment; class _RTComElEvent; typedef _RTComElEvent RTComElEvent; +class _RTComEl; +typedef _RTComEl RTComEl; template class QList; +class QString; #include @@ -41,6 +43,7 @@ namespace DBBackends RtcomEventLogger(const Settings &settings, const EventTypes::RtcomEvent &event); virtual void Insert(EventTypes::iEvent &event, const NumberToNameLookup &numberToNameLookup); + virtual void PostInsert(); virtual void Process(EventProcessors::iEventProcessor &eventProcessor); protected: @@ -48,20 +51,23 @@ namespace DBBackends protected: virtual EventTypes::iEvent *const CreateEvent(RTComElEvent &revent, QList &rattachments); + void ProcessService(EventProcessors::iEventProcessor &processor, const EventTypes::eEventTypes service, const RTComEl &el); + + virtual const QList &InsertedIDs() const { return m_InsertedIDs; } + + public: + virtual void ClearInsertedIDs(); private: - const Settings &m_Settings; + void Reindex(); + QList &InsertedIDs() { return m_InsertedIDs; } - enum ServiceID - { - SERVICE_ID_CALL, - SERVICE_ID_CHAT, - SERVICE_ID_SMS, - SERVICE_ID_MMS, - SERVICE_ID_SIZE - }; + private: + const Settings &m_Settings; + const QString mk_DBPath; + QList m_InsertedIDs; - QHash m_ServiceIDs; + QHash m_ServiceIDs; }; }