logsui/logsengine/logssymbianos/inc/logsdbconnector.h
changeset 19 e4c884866116
parent 16 c5af8598d22c
equal deleted inserted replaced
16:c5af8598d22c 19:e4c884866116
    34 class CLogClient;
    34 class CLogClient;
    35 class LogsReader;
    35 class LogsReader;
    36 class LogsEvent;
    36 class LogsEvent;
    37 class LogsRemove;
    37 class LogsRemove;
    38 class RFs;
    38 class RFs;
    39 class CRepository;
       
    40 
    39 
    41 // CLASS DECLARATIONS
    40 // CLASS DECLARATIONS
    42 
    41 
    43 
    42 
    44 /**
    43 /**
   157          * @return true if marking started
   156          * @return true if marking started
   158          */
   157          */
   159         bool markEventsSeen(const QList<LogsEvent*>& events);
   158         bool markEventsSeen(const QList<LogsEvent*>& events);
   160         
   159         
   161         /**
   160         /**
   162          * Clear missed calls counter.
       
   163          * @return 0 if clearing was success
       
   164          */
       
   165         int clearMissedCallsCounter();
       
   166         
       
   167         /**
       
   168          * Read duplicates for specified event
   161          * Read duplicates for specified event
   169          * @param eventId
   162          * @param eventId
   170          * @return 0 if reading started succesfully
   163          * @return 0 if reading started succesfully
   171          */
   164          */
   172         int readDuplicates(int eventId);
   165         int readDuplicates(int eventId);
   177          */
   170          */
   178         QList<LogsEvent*> takeDuplicates();
   171         QList<LogsEvent*> takeDuplicates();
   179         
   172         
   180         int refreshData();
   173         int refreshData();
   181         int compressData();
   174         int compressData();
   182 		
       
   183         
       
   184         /**
       
   185          * Returns cenrep key status of predictive search feature. 
       
   186          * @return 0 - feature is permanently off and can't be turned on,
       
   187          *         1 - feature is on
       
   188          *         2 - feature is temporarily off and can be turned on 
       
   189          *         negative value indicates some error in fetching the key
       
   190          */
       
   191         int predictiveSearchStatus();
       
   192         
       
   193         /**
       
   194          * Allows to modify cenrep key value of predictive search features. 
       
   195          * However, this function can't be used if feature is set permanently off 
       
   196          * (see predictiveSearchStatus())
       
   197          * @param enabled, specify whether cenrep key will be set to 1 or 2
       
   198          * @ return 0 if cenrep key value modified succesfully,
       
   199          *          -1 in case of some error
       
   200          */
       
   201         int setPredictiveSearch(bool enabled);
       
   202         
   175         
   203         
   176         
   204     protected: // From LogsReaderObserver
   177     protected: // From LogsReaderObserver
   205         
   178         
   206         virtual void readCompleted();
   179         virtual void readCompleted();
   217 		void initL();
   190 		void initL();
   218 		void handleTemporaryError(int& error);
   191 		void handleTemporaryError(int& error);
   219 		void deleteInvalidEvents(int newEventCount);
   192 		void deleteInvalidEvents(int newEventCount);
   220 		int doMarkEventSeen();
   193 		int doMarkEventSeen();
   221 		bool handleModifyingCompletion(int err=0);
   194 		bool handleModifyingCompletion(int err=0);
   222 		void getTelNumMatchLenL(int& matchLen);
   195 		void releaseDbConnections();
   223 
   196 
   224     private: // data
   197     private: // data
   225 
   198 
   226         QList<LogsEvent*>& mModelEvents;
   199         QList<LogsEvent*>& mModelEvents;
   227         bool mCheckAllEvents;
   200         bool mCheckAllEvents;
   229         CLogClient* mLogClient;
   202         CLogClient* mLogClient;
   230         LogsEventStrings mLogEventStrings;
   203         LogsEventStrings mLogEventStrings;
   231         RFs* mFsSession;
   204         RFs* mFsSession;
   232         LogsReader* mReader;
   205         LogsReader* mReader;
   233         LogsRemove* mLogsRemove;
   206         LogsRemove* mLogsRemove;
   234         CRepository* mRepository;
       
   235         bool mCompressionEnabled;
   207         bool mCompressionEnabled;
   236         
   208         bool mFirstReadCompleted;
       
   209                 
   237         QList<LogsEvent*> mEvents;
   210         QList<LogsEvent*> mEvents;
   238         QList<LogsEvent*> mDuplicatedEvents;
   211         QList<LogsEvent*> mDuplicatedEvents;
   239         QList<int> mRemovedEventIndexes;
   212         QList<int> mRemovedEventIndexes;
   240         QList<int> mUpdatedEventIndexes;
   213         QList<int> mUpdatedEventIndexes;
   241         QList<int> mAddedEventIndexes;
   214         QList<int> mAddedEventIndexes;