taskswitcher/server/inc/tsmodel.h
changeset 117 c63ee96dbe5f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/taskswitcher/server/inc/tsmodel.h	Thu Sep 16 12:11:40 2010 +0100
@@ -0,0 +1,46 @@
+/*
+* 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 offset) const;
+    virtual void setObserver(MTsModelObserver *observer) = 0;
+    
+protected: //data access. should be used by TModelItem
+    virtual const TDesC& displayNameL(TInt offset) const = 0;
+    virtual TInt iconHandleL(TInt offset) const = 0;
+    virtual TTime timestampL(TInt offset) const = 0;
+    virtual TTsModelItemKey keyL(TInt offset) const = 0;
+    virtual TBool isActiveL(TInt offset) const = 0;
+    virtual TBool isClosableL(TInt offset) const = 0;
+
+protected: //operations execution
+    virtual TBool closeL(TTsModelItemKey key) const = 0;
+    virtual TBool launchL(TTsModelItemKey key) const = 0;
+
+    friend class TTsModelItem;
+};
+
+#endif //TSMODEL_H