logsui/logsengine/logssymbianos/inc/logsremove.h
changeset 14 f27aebe284bb
parent 0 4a5361db8937
child 15 76d2cf7a585e
equal deleted inserted replaced
11:64a47b97e1e1 14:f27aebe284bb
    17 #ifndef LOGSREMOVE_H
    17 #ifndef LOGSREMOVE_H
    18 #define LOGSREMOVE_H
    18 #define LOGSREMOVE_H
    19 
    19 
    20 #include <QObject>
    20 #include <QObject>
    21 #include <e32base.h>
    21 #include <e32base.h>
       
    22 #include "logsworker.h"
    22 #include "logsmodel.h"
    23 #include "logsmodel.h"
       
    24 #include "logsremovestatecontext.h"
    23 
    25 
    24 // FORWARDS DECLARATIONS
    26 // FORWARDS DECLARATIONS
    25 class CLogClient;
    27 class CLogClient;
    26 class RFs;
    28 class RFs;
    27 class CLogViewRecent;
    29 class CLogViewRecent;
    29 // CLASS DECLARATION
    31 // CLASS DECLARATION
    30 class LogsRemoveObserver;
    32 class LogsRemoveObserver;
    31 /**
    33 /**
    32  *	Clearing class.
    34  *	Clearing class.
    33  */
    35  */
    34 class LogsRemove : public CActive
    36 class LogsRemove : public LogsWorker, public LogsRemoveStateContext
    35     {
    37     {
    36     public:
    38     public:
    37         friend class UT_LogsRemove;
    39         friend class UT_LogsRemove;
    38 
    40 
    39         /**
    41         /**
    53         bool clearList(LogsModel::ClearType cleartype);
    55         bool clearList(LogsModel::ClearType cleartype);
    54         
    56         
    55         int clearEvents(const QList<int>& eventIds, bool& async);
    57         int clearEvents(const QList<int>& eventIds, bool& async);
    56         
    58         
    57     protected: // from CActive
    59     protected: // from CActive
    58 
    60         
    59         void DoCancel();
       
    60         void RunL();
       
    61         TInt RunError(TInt aError);
    61         TInt RunError(TInt aError);
    62 
    62 
       
    63     private: // From LogsRemoveStateContext
       
    64         
       
    65         inline LogsRemoveObserver& observer();
       
    66         inline QList<int>& removedEvents();
       
    67         inline int clearType();
       
    68         
    63     private:
    69     private:
    64         
    70         
    65         void initL();
    71         void initL();
       
    72         bool clearListL(LogsModel::ClearType cleartype);
    66         void clearEventsL(const QList<int>& eventIds, bool& async);
    73         void clearEventsL(const QList<int>& eventIds, bool& async);
    67         bool DeleteNextEvent();
    74         void initializeClearAllL();
       
    75         void initializeIdBasedRemovalL();
       
    76         bool startClearingL();
    68         
    77         
    69     private: // data
    78     private: // data
    70         LogsRemoveObserver& mObserver;
    79         LogsRemoveObserver& mObserver;
    71         bool mReadingAllEvents;
    80         QList<int> mRemovedEvents;
       
    81      
       
    82         RFs* mFsSession;
    72         
    83         
    73         QList<int> mRemovedEvents;
    84         int mClearType;
    74         CLogClient* mLogClient;
    85         QList<LogsStateBase*> mRemoveStates;
    75         CLogViewRecent* mRecentView;
    86         QList<LogsStateBase*> mClearAllStates;
    76         RFs* mFsSession;
    87         
    77     };
    88     };
    78 
    89 
    79                   
    90                   
    80 #endif // LOGSREMOVE_H
    91 #endif // LOGSREMOVE_H