taskswitcher/server/inc/tsmodel.h
author Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
Thu, 16 Sep 2010 12:11:40 +0100
changeset 117 c63ee96dbe5f
permissions -rw-r--r--
Missing activityfw and taskswitcher components - fix for Bug 3670
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
117
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
     1
/*
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
     8
*
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    11
*
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    12
* Contributors:
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    13
*
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    14
* Description:
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    15
*
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    16
*/
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    17
#ifndef TSMODEL_H
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    18
#define TSMODEL_H
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    19
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    20
#include <e32base.h>
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    21
#include "tsmodelitem.h"
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    22
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    23
class MTsModelObserver;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    24
class MTsModel 
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    25
{
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    26
public:
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    27
    virtual TInt count() const = 0;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    28
    TTsModelItem itemL(TInt offset) const;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    29
    virtual void setObserver(MTsModelObserver *observer) = 0;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    30
    
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    31
protected: //data access. should be used by TModelItem
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    32
    virtual const TDesC& displayNameL(TInt offset) const = 0;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    33
    virtual TInt iconHandleL(TInt offset) const = 0;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    34
    virtual TTime timestampL(TInt offset) const = 0;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    35
    virtual TTsModelItemKey keyL(TInt offset) const = 0;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    36
    virtual TBool isActiveL(TInt offset) const = 0;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    37
    virtual TBool isClosableL(TInt offset) const = 0;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    38
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    39
protected: //operations execution
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    40
    virtual TBool closeL(TTsModelItemKey key) const = 0;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    41
    virtual TBool launchL(TTsModelItemKey key) const = 0;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    42
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    43
    friend class TTsModelItem;
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    44
};
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    45
c63ee96dbe5f Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff changeset
    46
#endif //TSMODEL_H