taskswitcher/server/inc/tsrunningappmodel.h
changeset 121 0b3699f6c654
child 119 50e220be30d1
equal deleted inserted replaced
115:3ab5c078b490 121:0b3699f6c654
       
     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 TSRUNNINGAPPMODEL_H
       
    18 #define TSRUNNINGAPPMODEL_H
       
    19 
       
    20 #include "tsmodel.h"
       
    21 #include "tsdatastorage.h"
       
    22 #include "tsdataobserver.h"
       
    23 
       
    24 #include "tswindowgroupsobserver.h"
       
    25 
       
    26 class CTsDataList;
       
    27 class CTsScreenshotProvider;
       
    28 
       
    29 NONSHARABLE_CLASS(CTsRunningAppModel) : public CBase, 
       
    30                                         public MTsModel, 
       
    31                                         public MTsDataStorage, 
       
    32                                         public MTsDataObserver
       
    33 {
       
    34 
       
    35 public:
       
    36     static CTsRunningAppModel *NewL( MTsResourceManager &aResources, 
       
    37                                      MTsWindowGroupsMonitor &aMonitor );
       
    38     static CTsRunningAppModel *NewLC( MTsResourceManager &aResources, 
       
    39                                       MTsWindowGroupsMonitor &aMonitor );
       
    40     ~CTsRunningAppModel();
       
    41     
       
    42 private:
       
    43     CTsRunningAppModel( MTsResourceManager &aResources );
       
    44     void ConstructL( MTsResourceManager &aResources, 
       
    45                      MTsWindowGroupsMonitor &aMonitor );
       
    46 
       
    47 // MHsDataObserver interface implementation
       
    48 public:
       
    49     virtual void DataChanged();
       
    50     
       
    51 // MTsDataStorage interface implementation    
       
    52 public:
       
    53     TBool IsSupported( TInt aFunction ) const;
       
    54     void HandleDataL( TInt aFunction, RReadStream& aDataStream );
       
    55     
       
    56 public:
       
    57     virtual TInt Count() const;
       
    58     virtual void SetObserver( MTsModelObserver *aObserver );
       
    59 
       
    60 public:
       
    61     virtual const TDesC& DisplayNameL( TInt aOffset ) const;
       
    62     virtual TInt IconHandleL( TInt aOffset ) const;
       
    63     virtual TTime TimestampL( TInt aOffset ) const;
       
    64     virtual TTime TimestampUpdateL(TInt offset) const; 
       
    65     virtual TTsModelItemKey KeyL( TInt aOffset ) const;
       
    66     virtual TBool IsActiveL( TInt aOffset ) const;
       
    67     virtual TBool IsClosableL( TInt aOffset ) const;
       
    68 
       
    69 public:
       
    70     virtual TBool CloseL( TTsModelItemKey aKey ) const;
       
    71     virtual TBool LaunchL( TTsModelItemKey aKey ) const;
       
    72     
       
    73 private: // owned
       
    74     CTsDataList *iDataList;
       
    75     
       
    76 private: // not owned
       
    77     MTsModelObserver* iObserver;
       
    78     CTsScreenshotProvider* iScreenshotProvider;
       
    79     MTsResourceManager& iResources;
       
    80 
       
    81 };
       
    82 
       
    83 #endif //TSRUNNINGAPPMODEL_H