logsui/logsengine/logssymbianos/inc/logsremove.h
changeset 0 4a5361db8937
child 9 68f3171a5819
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/logsui/logsengine/logssymbianos/inc/logsremove.h	Tue May 04 12:39:37 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef LOGSREMOVE_H
+#define LOGSREMOVE_H
+
+#include <QObject>
+#include <e32base.h>
+#include "logsmodel.h"
+
+// FORWARDS DECLARATIONS
+class CLogClient;
+class RFs;
+class CLogViewRecent;
+
+// CLASS DECLARATION
+class LogsRemoveObserver;
+/**
+ *	Clearing class.
+ */
+class LogsRemove : public CActive
+    {
+    public:
+        friend class UT_LogsRemove;
+
+        /**
+         *  Destructor
+         */
+        ~LogsRemove();
+        
+        LogsRemove( LogsRemoveObserver& observer, bool readingAllEvents = false );
+	
+
+        /**
+          * Initialize LogsRemove
+          * @return 0 if initialized succesfully
+          */
+        int init();
+
+        bool clearList(LogsModel::ClearType cleartype);
+        
+        int clearEvents(const QList<int>& eventIds, bool& async);
+        
+    protected: // from CActive
+
+        void DoCancel();
+        void RunL();
+        TInt RunError(TInt aError);
+
+    private:
+        
+        void initL();
+        void clearEventsL(const QList<int>& eventIds, bool& async);
+        bool DeleteNextEvent();
+        
+    private: // data
+        LogsRemoveObserver& mObserver;
+        bool mReadingAllEvents;
+        
+        QList<int> mRemovedEvents;
+        CLogClient* mLogClient;
+        CLogViewRecent* mRecentView;
+        RFs* mFsSession;
+    };
+
+                  
+#endif // LOGSREMOVE_H