116
|
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 |
|
125
|
24 |
class MTsResourceManager;
|
116
|
25 |
class CTsDataList;
|
|
26 |
class CTsScreenshotProvider;
|
119
|
27 |
class TsEnv;
|
116
|
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,
|
119
|
37 |
TsEnv& aEnv );
|
116
|
38 |
static CTsRunningAppModel *NewLC( MTsResourceManager &aResources,
|
119
|
39 |
TsEnv& aEnv );
|
116
|
40 |
~CTsRunningAppModel();
|
|
41 |
|
|
42 |
private:
|
|
43 |
CTsRunningAppModel( MTsResourceManager &aResources );
|
|
44 |
void ConstructL( MTsResourceManager &aResources,
|
119
|
45 |
TsEnv& aEnv);
|
116
|
46 |
|
125
|
47 |
public: // MHsDataObserver interface implementation
|
116
|
48 |
virtual void DataChanged();
|
125
|
49 |
|
|
50 |
public: // MTsDataStorage interface implementation
|
116
|
51 |
TBool IsSupported( TInt aFunction ) const;
|
|
52 |
void HandleDataL( TInt aFunction, RReadStream& aDataStream );
|
|
53 |
|
|
54 |
public:
|
|
55 |
virtual TInt Count() const;
|
|
56 |
virtual void SetObserver( MTsModelObserver *aObserver );
|
|
57 |
|
|
58 |
public:
|
|
59 |
virtual const TDesC& DisplayNameL( TInt aOffset ) const;
|
|
60 |
virtual TInt IconHandleL( TInt aOffset ) const;
|
|
61 |
virtual TTime TimestampL( TInt aOffset ) const;
|
|
62 |
virtual TTime TimestampUpdateL(TInt offset) const;
|
|
63 |
virtual TTsModelItemKey KeyL( TInt aOffset ) const;
|
|
64 |
virtual TBool IsActiveL( TInt aOffset ) const;
|
|
65 |
virtual TBool IsClosableL( TInt aOffset ) const;
|
119
|
66 |
virtual TBool IsMandatoryL( TInt aOffset ) const;
|
116
|
67 |
|
|
68 |
public:
|
|
69 |
virtual TBool CloseL( TTsModelItemKey aKey ) const;
|
|
70 |
virtual TBool LaunchL( TTsModelItemKey aKey ) const;
|
|
71 |
|
|
72 |
private: // owned
|
|
73 |
CTsDataList *iDataList;
|
|
74 |
|
|
75 |
private: // not owned
|
|
76 |
MTsModelObserver* iObserver;
|
|
77 |
CTsScreenshotProvider* iScreenshotProvider;
|
|
78 |
MTsResourceManager& iResources;
|
|
79 |
|
|
80 |
};
|
|
81 |
|
|
82 |
#endif //TSRUNNINGAPPMODEL_H
|