taskswitcher/server/inc/tsmodel.h
changeset 121 0b3699f6c654
child 119 50e220be30d1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/taskswitcher/server/inc/tsmodel.h	Fri Sep 17 08:32:18 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* 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 TSMODEL_H
+#define TSMODEL_H
+
+#include <e32base.h>
+#include "tsmodelitem.h"
+
+class MTsModelObserver;
+class MTsModel 
+{
+public:
+    virtual TInt Count() const = 0;
+    TTsModelItem ItemL( TInt aOffset ) const;
+    virtual void SetObserver( MTsModelObserver *observer ) = 0;
+    
+protected: //data access. should be used by TModelItem
+    virtual const TDesC& DisplayNameL( TInt aOffset ) const = 0;
+    virtual TInt IconHandleL( TInt aOffset ) const = 0;
+    virtual TTime TimestampL( TInt aOffset ) const = 0;
+    virtual TTime TimestampUpdateL(TInt offset) const = 0;
+    virtual TTsModelItemKey KeyL( TInt aOffset ) const = 0;
+    virtual TBool IsActiveL( TInt aOffset ) const = 0;
+    virtual TBool IsClosableL( TInt aOffset ) const = 0;
+
+protected: //operations execution
+    virtual TBool CloseL( TTsModelItemKey aKey ) const = 0;
+    virtual TBool LaunchL( TTsModelItemKey aKey ) const = 0;
+
+    friend class TTsModelItem;
+};
+
+#endif //TSMODEL_H