diff -r 64a47b97e1e1 -r f27aebe284bb logsui/logsengine/logssymbianos/inc/logsreader.h --- a/logsui/logsengine/logssymbianos/inc/logsreader.h Tue Jul 06 14:16:36 2010 +0300 +++ b/logsui/logsengine/logssymbianos/inc/logsreader.h Wed Aug 18 09:49:12 2010 +0300 @@ -24,6 +24,7 @@ #include #include #include +#include "logsworker.h" #include "logsreaderstatecontext.h" #include "logsreaderstates.h" @@ -44,7 +45,7 @@ /** * LogsReader is used to read events from database */ -class LogsReader : public CActive, +class LogsReader : public LogsWorker, public MLogClientChangeObserver, public MLogViewChangeObserver, public LogsReaderStateContext @@ -117,8 +118,6 @@ protected: // From CActive - void RunL(); - void DoCancel(); TInt RunError(TInt error); private: // From MLogClientChangeObserver @@ -142,19 +141,11 @@ TInt aChangeIndex, TInt aTotalChangeCount); private: // From LogsReaderStateContext - - inline void setCurrentState(const LogsReaderStateBase& state); - inline CLogView& logView(); - inline CLogViewDuplicate& duplicatesView(); + inline QList& events(); - inline int& index(); inline LogsEventStrings& strings(); - inline TRequestStatus& reqStatus(); inline LogsReaderObserver& observer(); inline QHash& contactCache(); - inline int currentEventId(); - inline CLogClient& logClient(); - inline bool isRecentView(); inline QList& duplicatedEvents(); private: @@ -168,7 +159,6 @@ * in progress, it will leave with error */ void cancelCurrentRequestL(); - LogsReaderStateBase& currentState(); void initializeReadStates(); void initializeModifyingStates(); void initializeDuplicateReadingStates(); @@ -183,28 +173,18 @@ private: // data - CLogViewRecent* mLogViewRecent; - CLogViewEvent* mLogViewEvent; - CLogViewDuplicate* mDuplicatesView; - RFs& mFsSession; - CLogClient& mLogClient; LogsEventStrings& mStrings; QList& mEvents; LogsReaderObserver& mObserver; - bool mReadAllEvents; - - int mIndex; - QList mReadStates; - QList mModifyingStates; - QList mDuplicateReadingStates; - int mCurrentStateIndex; - QList* mCurrentStateMachine; - + + QList mReadStates; + QList mModifyingStates; + QList mDuplicateReadingStates; + QHash mContactCache; QList mDuplicatedEvents; - int mCurrentEventId; bool mGlobalObserverSet; };