1 /* |
|
2 * Copyright (c) 2002-2004 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: This file contains the header file of the CSisxUIAppInfo |
|
15 * class. |
|
16 * |
|
17 * This class represents a native symbian package. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef SISXUIAPPINFO_H |
|
23 #define SISXUIAPPINFO_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32base.h> |
|
27 #include <badesca.h> |
|
28 #include <CUIDetailsDialog.h> |
|
29 #include <swi/msisuihandlers.h> |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 |
|
33 namespace SwiUI |
|
34 { |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * This class represents a native symbian application |
|
40 * |
|
41 * @lib sisxui.lib |
|
42 * @since 3.0 |
|
43 */ |
|
44 class CSisxUIAppInfo : public CBase, public CommonUI::MCUIInfoIterator |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Constructor. |
|
50 * @param aInfo - Symbian engine application info object. |
|
51 * @param aIsTrusted - Indicate if the package is trusted or not |
|
52 */ |
|
53 static CSisxUIAppInfo* NewL( const Swi::CAppInfo& aInfo, TBool aIsTrusted ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CSisxUIAppInfo(); |
|
59 |
|
60 public: // New functions |
|
61 |
|
62 /** |
|
63 * Return name of the package. |
|
64 * @since 3.0 |
|
65 * @return Name of the package. |
|
66 */ |
|
67 const TDesC& Name() const; |
|
68 |
|
69 /** |
|
70 * Set the name of the package |
|
71 * @since 3.0 |
|
72 * @param aName - Name of the package. |
|
73 */ |
|
74 void SetNameL( const TDesC& aName ); |
|
75 |
|
76 /** |
|
77 * Return the package vendor. |
|
78 * @since 3.0 |
|
79 * @return Package vendor. |
|
80 */ |
|
81 const TDesC& Vendor() const; |
|
82 |
|
83 /** |
|
84 * Set the vendor of the package |
|
85 * @since 3.0 |
|
86 * @param aVendor - Vendor of the package. |
|
87 */ |
|
88 void SetVendorL( const TDesC& aVendor ); |
|
89 |
|
90 /** |
|
91 * Return the package version. |
|
92 * @since 3.0 |
|
93 * @return Package vendor. |
|
94 */ |
|
95 const TVersion& Version() const; |
|
96 |
|
97 /** |
|
98 * Set the trusted status of the package. |
|
99 * @since 3.0 |
|
100 * @param aIsTrusted - Trusted status. |
|
101 */ |
|
102 void SetTrusted( TBool aIsTrusted ); |
|
103 |
|
104 /** |
|
105 * Indicates the trusted status of the package. |
|
106 * @since 3.0 |
|
107 * @return Trusted status. |
|
108 */ |
|
109 TBool IsTrusted() const; |
|
110 |
|
111 /** |
|
112 * Sets the Uid of the package. |
|
113 * @since 3.0 |
|
114 * @param aUid - Package Uid. |
|
115 */ |
|
116 void SetUid( const TUid& aUid ); |
|
117 |
|
118 /** |
|
119 * Return the Uid of the package. |
|
120 * @since 3.0 |
|
121 * @return Package Uid. |
|
122 */ |
|
123 TUid Uid() const; |
|
124 |
|
125 /** |
|
126 * Prepares the iterator to be shown in details dialog. |
|
127 * @since 3.0 |
|
128 */ |
|
129 void PrepareIteratorL( const Swi::CAppInfo& aInfo ); |
|
130 |
|
131 /** |
|
132 * Frees the memory reserved for the iterator. |
|
133 * @since 3.0 |
|
134 */ |
|
135 void FreeIterator(); |
|
136 |
|
137 public: // Functions from base classes |
|
138 |
|
139 /** |
|
140 * From MCUIInfoIterator, Indicates if the iterator has any more |
|
141 * fields left. |
|
142 * @since 3.0 |
|
143 * @return ETrue if there are some fields left, EFalse if not. |
|
144 */ |
|
145 TBool HasNext() const; |
|
146 |
|
147 /** |
|
148 * From MCUIInfoIterator, Get the next field. |
|
149 * @since 3.0 |
|
150 * @param aKey - After successfull call contains the key / header of the field. |
|
151 * @param aKey - After successfull call contains the value of the field. |
|
152 */ |
|
153 void Next( TPtrC& aKey, TPtrC& aValue ); |
|
154 |
|
155 /** |
|
156 * From MCUIInfoIterator, Reset the iterator. After calling this, Next() |
|
157 * will return the first value. |
|
158 * @since 3.0 |
|
159 */ |
|
160 virtual void Reset(); |
|
161 |
|
162 private: |
|
163 |
|
164 /** |
|
165 * C++ default constructor. |
|
166 */ |
|
167 CSisxUIAppInfo( TBool aIsTrusted ); |
|
168 |
|
169 /** |
|
170 * 2nd phase constructor. |
|
171 * @param aEntry - Sis registry entry. |
|
172 */ |
|
173 void ConstructL( const Swi::CAppInfo& aInfo ); |
|
174 |
|
175 /** |
|
176 * Sets a new field for the iterator with given parameter values. |
|
177 * @since 3.0 |
|
178 * @param aResourceId - Resource id of the header text. |
|
179 * @param aValue - Value of the field. |
|
180 */ |
|
181 void SetFieldL( TInt aResourceId, const TDesC& aValue ); |
|
182 |
|
183 private: // Data |
|
184 |
|
185 TInt iCurrentIndex; |
|
186 CDesCArray* iKeys; // Own |
|
187 CDesCArray* iValues; // Own |
|
188 |
|
189 HBufC* iName; // Own |
|
190 HBufC* iVendor; // Own |
|
191 TVersion iVersion; |
|
192 TUid iUid; |
|
193 TBool iIsTrusted; |
|
194 }; |
|
195 } |
|
196 |
|
197 #endif // SISXUIAPPINFO |
|
198 |
|
199 // End of File |
|