logsui/logsengine/logssymbianos/inc/logsremove.h
changeset 14 f27aebe284bb
parent 0 4a5361db8937
child 15 76d2cf7a585e
--- a/logsui/logsengine/logssymbianos/inc/logsremove.h	Tue Jul 06 14:16:36 2010 +0300
+++ b/logsui/logsengine/logssymbianos/inc/logsremove.h	Wed Aug 18 09:49:12 2010 +0300
@@ -19,7 +19,9 @@
 
 #include <QObject>
 #include <e32base.h>
+#include "logsworker.h"
 #include "logsmodel.h"
+#include "logsremovestatecontext.h"
 
 // FORWARDS DECLARATIONS
 class CLogClient;
@@ -31,7 +33,7 @@
 /**
  *	Clearing class.
  */
-class LogsRemove : public CActive
+class LogsRemove : public LogsWorker, public LogsRemoveStateContext
     {
     public:
         friend class UT_LogsRemove;
@@ -55,25 +57,34 @@
         int clearEvents(const QList<int>& eventIds, bool& async);
         
     protected: // from CActive
-
-        void DoCancel();
-        void RunL();
+        
         TInt RunError(TInt aError);
 
+    private: // From LogsRemoveStateContext
+        
+        inline LogsRemoveObserver& observer();
+        inline QList<int>& removedEvents();
+        inline int clearType();
+        
     private:
         
         void initL();
+        bool clearListL(LogsModel::ClearType cleartype);
         void clearEventsL(const QList<int>& eventIds, bool& async);
-        bool DeleteNextEvent();
+        void initializeClearAllL();
+        void initializeIdBasedRemovalL();
+        bool startClearingL();
         
     private: // data
         LogsRemoveObserver& mObserver;
-        bool mReadingAllEvents;
+        QList<int> mRemovedEvents;
+     
+        RFs* mFsSession;
         
-        QList<int> mRemovedEvents;
-        CLogClient* mLogClient;
-        CLogViewRecent* mRecentView;
-        RFs* mFsSession;
+        int mClearType;
+        QList<LogsStateBase*> mRemoveStates;
+        QList<LogsStateBase*> mClearAllStates;
+        
     };