5
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2007 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 the License "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: This Class provides information of Application installed on phone.
|
|
15 |
*
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
#ifndef _APPINFO_H__
|
|
23 |
#define _APPINFO_H__
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <APAID.H> // For TApaAppInfo
|
|
26 |
#include <BADESCA.H> // CDesC16Array
|
|
27 |
#include "appmanagercommon.h"
|
|
28 |
|
|
29 |
_LIT8(KCaption,"Caption");
|
|
30 |
_LIT8(KShortCaption,"ShortCaption");
|
|
31 |
_LIT8(KUid,"Uid");
|
|
32 |
_LIT8(KName,"Path");
|
|
33 |
|
|
34 |
|
|
35 |
/**
|
|
36 |
* This Class provides the information for Application
|
|
37 |
* on phone
|
|
38 |
*
|
|
39 |
* @since Series60 v3.2
|
|
40 |
|
|
41 |
*/
|
|
42 |
|
|
43 |
class CAppInfo : public CBase ,public MInfoMap
|
|
44 |
{
|
|
45 |
public:
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Returns the instance of CAppInfo.
|
|
49 |
* @since Series60 v3.2
|
|
50 |
* @param aAppInfo Instance of TApaAppInfo class
|
|
51 |
* @return CAppInfo* return the instance of CAppInfo class
|
|
52 |
*/
|
|
53 |
|
|
54 |
static CAppInfo* NewL(TApaAppInfo& aAppInfo);
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Destructor.
|
|
58 |
*/
|
|
59 |
|
|
60 |
~CAppInfo();
|
|
61 |
|
|
62 |
/**
|
|
63 |
* This function finds the value as per key given in argument.
|
|
64 |
* @param aKey Key given to find corresponding value.
|
|
65 |
* @param aVal value as per key.
|
|
66 |
* @return TBool ETrue in case of key - value is found else EFalse.
|
|
67 |
* @since Series60 v3.2
|
|
68 |
*/
|
|
69 |
|
|
70 |
virtual TBool FindL(const TDesC8& aKey, TPtrC& aVal);
|
|
71 |
|
|
72 |
/**
|
|
73 |
* This function gives the key value at a given index
|
|
74 |
* @param aIndex TInt index value
|
|
75 |
* @return TPtrC Pointer to descriptor containing key .
|
|
76 |
* @since Series60 v3.2
|
|
77 |
*/
|
|
78 |
virtual TBool AtL( TInt aIndex, TDes8& aKeyVal );
|
|
79 |
|
|
80 |
/**
|
|
81 |
* This function gives the number of keys
|
|
82 |
* @param void
|
|
83 |
* @return TInt Number of keys
|
|
84 |
* @since Series60 v3.2
|
|
85 |
*/
|
|
86 |
virtual TInt Count() const;
|
|
87 |
|
|
88 |
private:
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Constructor
|
|
92 |
* @param aAppInfo Instance of TApaAppInfo class
|
|
93 |
* @since Series60 v3.2
|
|
94 |
*/
|
|
95 |
CAppInfo(TApaAppInfo& aAppInfo);
|
|
96 |
|
|
97 |
/**
|
|
98 |
* Two-phased constructor
|
|
99 |
* @param void
|
|
100 |
* @return void
|
|
101 |
* @since Series60 v3.2
|
|
102 |
*/
|
|
103 |
void ConstructL();
|
|
104 |
|
|
105 |
private:
|
|
106 |
|
|
107 |
/**
|
|
108 |
* TApaAppinfo instance containing information of installed application
|
|
109 |
*/
|
|
110 |
TApaAppInfo iAppInfo;
|
|
111 |
|
|
112 |
/**
|
|
113 |
* Array containing keys
|
|
114 |
*/
|
|
115 |
CDesC8Array* iKeyArray;
|
|
116 |
|
|
117 |
RPointerArray<HBufC> iKeyValArray;
|
|
118 |
|
|
119 |
};
|
|
120 |
|
|
121 |
#endif
|