taskswitcher/server/inc/tsmodel.h
changeset 116 305818acdca4
child 119 50e220be30d1
equal deleted inserted replaced
112:dbfb5e38438b 116:305818acdca4
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #ifndef TSMODEL_H
       
    18 #define TSMODEL_H
       
    19 
       
    20 #include <e32base.h>
       
    21 #include "tsmodelitem.h"
       
    22 
       
    23 class MTsModelObserver;
       
    24 class MTsModel 
       
    25 {
       
    26 public:
       
    27     virtual TInt Count() const = 0;
       
    28     TTsModelItem ItemL( TInt aOffset ) const;
       
    29     virtual void SetObserver( MTsModelObserver *observer ) = 0;
       
    30     
       
    31 protected: //data access. should be used by TModelItem
       
    32     virtual const TDesC& DisplayNameL( TInt aOffset ) const = 0;
       
    33     virtual TInt IconHandleL( TInt aOffset ) const = 0;
       
    34     virtual TTime TimestampL( TInt aOffset ) const = 0;
       
    35     virtual TTime TimestampUpdateL(TInt offset) const = 0;
       
    36     virtual TTsModelItemKey KeyL( TInt aOffset ) const = 0;
       
    37     virtual TBool IsActiveL( TInt aOffset ) const = 0;
       
    38     virtual TBool IsClosableL( TInt aOffset ) const = 0;
       
    39 
       
    40 protected: //operations execution
       
    41     virtual TBool CloseL( TTsModelItemKey aKey ) const = 0;
       
    42     virtual TBool LaunchL( TTsModelItemKey aKey ) const = 0;
       
    43 
       
    44     friend class TTsModelItem;
       
    45 };
       
    46 
       
    47 #endif //TSMODEL_H