|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // apaid.h |
|
15 // |
|
16 |
|
17 #ifndef __APAID_H__ |
|
18 #define __APAID_H__ |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <apadef.h> |
|
22 #include <apmstd.h> // class TDataTypeWithPriority |
|
23 |
|
24 // classes referenced |
|
25 class RReadStream; |
|
26 class RWriteStream; |
|
27 class RFs; |
|
28 |
|
29 /** The identity of an application. |
|
30 |
|
31 An object of this type contains two pieces of information: |
|
32 |
|
33 The application specific UID |
|
34 |
|
35 The file name and extension of the application DLL |
|
36 |
|
37 All persisted documents associated with this application have a stream containing |
|
38 this information. |
|
39 |
|
40 @publishedAll |
|
41 @released |
|
42 @see CApaProcess::ReadRootStreamLC() |
|
43 @see CApaProcess::WriteRootStreamL() |
|
44 @see CApaProcess::ReadAppIdentifierL() |
|
45 @see CApaProcess::WriteAppIdentifierL() */ |
|
46 class TApaAppIdentifier |
|
47 { |
|
48 public: |
|
49 IMPORT_C TApaAppIdentifier(); |
|
50 IMPORT_C TApaAppIdentifier(TUid aAppUidType,const TFileName& aDllName); |
|
51 IMPORT_C void ExternalizeL(RWriteStream& aStream)const; |
|
52 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
53 public: |
|
54 /** The application-specific UID. */ |
|
55 TUid iAppUid; |
|
56 /** The full path name of the application DLL. */ |
|
57 TFileName iFullName; |
|
58 private: |
|
59 TInt iTApaAppIdentifier_Reserved1; |
|
60 }; |
|
61 |
|
62 |
|
63 /** Application information. |
|
64 |
|
65 An object of this type contains four pieces of information: |
|
66 |
|
67 the application specific UID |
|
68 |
|
69 the full path name of the application DLL |
|
70 |
|
71 the application's caption |
|
72 |
|
73 a short caption; how this is used is up to the UI |
|
74 |
|
75 @publishedAll |
|
76 @released */ |
|
77 class TApaAppInfo |
|
78 { |
|
79 public: |
|
80 IMPORT_C TApaAppInfo(); |
|
81 IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption); |
|
82 IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption,const TApaAppCaption& aShortCaption); |
|
83 IMPORT_C void ExternalizeL(RWriteStream& aStream)const; |
|
84 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
85 public: |
|
86 /** The application specific UID. */ |
|
87 TUid iUid; |
|
88 /** The full path name of the application DLL. */ |
|
89 TFileName iFullName; |
|
90 /** The caption for the application. */ |
|
91 TApaAppCaption iCaption; |
|
92 /** The short caption for the application. */ |
|
93 TApaAppCaption iShortCaption; |
|
94 private: |
|
95 TInt iTApaAppInfo_Reserved1; |
|
96 }; |
|
97 |
|
98 |
|
99 /** Contains the basic information about an application view. |
|
100 |
|
101 An object of this type contains two pieces of information: |
|
102 |
|
103 The UID that identifies the view |
|
104 |
|
105 The application's caption. |
|
106 |
|
107 Objects of this type are returned in an array populated by a call to RApaLsSession::GetAppViews(). |
|
108 |
|
109 @publishedAll |
|
110 @released |
|
111 @see CApaAppViewArray |
|
112 @see TUid */ |
|
113 class TApaAppViewInfo |
|
114 { |
|
115 public: |
|
116 IMPORT_C TApaAppViewInfo(); |
|
117 IMPORT_C TApaAppViewInfo(TUid aViewUid,const TApaAppCaption& aViewCaption,TInt aScreenMode); |
|
118 IMPORT_C void ExternalizeL(RWriteStream& aStream)const; |
|
119 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
120 public: |
|
121 /** The UID identifying the view. */ |
|
122 TUid iUid; |
|
123 /** The application caption. */ |
|
124 TApaAppCaption iViewCaption; |
|
125 TInt iScreenMode; |
|
126 private: |
|
127 TInt iTApaAppViewInfo_Reserved1; |
|
128 }; |
|
129 |
|
130 |
|
131 /** Defines an array of TApaAppViewInfo objects contained within a flat dynamic |
|
132 buffer. |
|
133 |
|
134 An array of this type is populated with TApaAppViewInfo objects in a call |
|
135 to RApaLsSession::GetAppViews(). |
|
136 |
|
137 @publishedAll |
|
138 @released */ |
|
139 typedef CArrayFixFlat<TApaAppViewInfo> CApaAppViewArray; |
|
140 |
|
141 |
|
142 /** Application capabilities. |
|
143 |
|
144 @publishedAll |
|
145 @released */ |
|
146 class TApaAppCapability |
|
147 { |
|
148 public: |
|
149 IMPORT_C static void CopyCapability(TDes8& aDest,const TDesC8& aSource); |
|
150 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
151 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
152 private: |
|
153 void DoInternalizeL(RReadStream& aStream, TBool& aLaunchInBackground, TApaAppGroupName& aGroupName); |
|
154 public: |
|
155 // |
|
156 /** Defines an application's support for embeddability. */ |
|
157 enum TEmbeddability { |
|
158 /** An application cannot be embedded. */ |
|
159 ENotEmbeddable=0, |
|
160 /** An application can be run embedded or standalone and can read/write embedded document-content. */ |
|
161 EEmbeddable=1, |
|
162 /** An application can only be run embedded and can read/write embedded document-content. */ |
|
163 EEmbeddableOnly=2, |
|
164 /** An application can be run embedded or standalone and cannot read/write embedded document-content. */ |
|
165 EEmbeddableUiOrStandAlone=5, |
|
166 /** An application can only be run embedded and cannot read/write embedded document-content. */ |
|
167 EEmbeddableUiNotStandAlone=6 }; |
|
168 /** Defines an application's attributes as a set of bit flags. */ |
|
169 enum TCapabilityAttribute |
|
170 { |
|
171 /** This functionality is deprecated from v9.5 onwards. |
|
172 @deprecated |
|
173 */ |
|
174 EBuiltAsDll = 0x00000001, |
|
175 /** If set, the application provides control panel functionality. */ |
|
176 EControlPanelItem = 0x00000002, |
|
177 /** If set, the application is not a native executable, and hence the "path" and "extension" (as well as the "name") must be provided in the app_file field of the APP_REGISTRATION_INFO resource. */ |
|
178 ENonNative = 0x00000004 |
|
179 }; |
|
180 public: |
|
181 /** Indicates the extent to which the application can be embedded. */ |
|
182 TEmbeddability iEmbeddability; |
|
183 /** Indicates whether the application is document-based and supports being asked |
|
184 to create a new file. */ |
|
185 TBool iSupportsNewFile; |
|
186 /** Indicates whether the existence of the application should be advertised to the |
|
187 user. If this is set to ETrue, the application does not appear on the Extras |
|
188 Bar (or equivalent). */ |
|
189 TBool iAppIsHidden; // not shown in the Shell etc. |
|
190 /** Allows the application to be launched in the foreground (when set to EFalse) |
|
191 or in the background (when set to ETrue). */ |
|
192 TBool iLaunchInBackground; // Series 60 extension to allow apps to be launched in the background |
|
193 /** Stores the application's logical group name. */ |
|
194 TApaAppGroupName iGroupName; // Series 60 extension to allow apps to be categorized according a logical group name, e.g. 'games' |
|
195 /** Indicates the application attributes. One or more values from TCapabilityAttribute may be specified. */ |
|
196 TUint iAttributes; |
|
197 private: |
|
198 // expandable class - add new members to the end, add them to the end of int/ext also, and increment the version no. |
|
199 // default value for all data members must be 0 |
|
200 enum { EVersion=4 }; |
|
201 private: |
|
202 TInt iTApaAppCapability_Reserved1; |
|
203 }; |
|
204 |
|
205 /** Packages the TApaAppCapability class. |
|
206 |
|
207 @publishedAll |
|
208 @released */ |
|
209 typedef TPckgBuf<TApaAppCapability> TApaAppCapabilityBuf; |
|
210 |
|
211 |
|
212 /** Filter used to define the subset of applications returned by RApaLsSession::GetNextApp() |
|
213 |
|
214 @publishedAll |
|
215 @released |
|
216 */ |
|
217 class TApaEmbeddabilityFilter |
|
218 { |
|
219 public: |
|
220 IMPORT_C TApaEmbeddabilityFilter(); |
|
221 IMPORT_C void AddEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability); |
|
222 IMPORT_C TBool MatchesEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability) const; |
|
223 private: |
|
224 TUint iEmbeddabilityFlags; |
|
225 private: |
|
226 TInt iTApaEmbeddabilityFilter_Reserved1; |
|
227 }; |
|
228 |
|
229 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
230 /** |
|
231 The uid for the Open service. |
|
232 |
|
233 @publishedPartner |
|
234 @released |
|
235 */ |
|
236 const TUid KOpenServiceUid = { 0x10208DCA }; |
|
237 |
|
238 /** Application service information. |
|
239 |
|
240 Encapsulates a service UID and associated opaque data. |
|
241 |
|
242 An instance of this class provides information about |
|
243 a specific implementation of the service identified by |
|
244 the encapsulated service UID. |
|
245 |
|
246 @publishedPartner |
|
247 @released |
|
248 */ |
|
249 class TApaAppServiceInfo |
|
250 { |
|
251 public: |
|
252 IMPORT_C TApaAppServiceInfo(); |
|
253 IMPORT_C TApaAppServiceInfo(TUid aUid, CArrayFixFlat<TDataTypeWithPriority>* aDataTypes, HBufC8* aOpaqueData); |
|
254 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
255 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
256 IMPORT_C void Release(); |
|
257 IMPORT_C CArrayFixFlat<TDataTypeWithPriority>& DataTypes(); |
|
258 IMPORT_C TUid Uid() const; |
|
259 IMPORT_C const CArrayFixFlat<TDataTypeWithPriority>& DataTypes() const; |
|
260 IMPORT_C const TDesC8& OpaqueData() const; |
|
261 private: |
|
262 TUid iUid; |
|
263 CArrayFixFlat<TDataTypeWithPriority>* iDataTypes; |
|
264 HBufC8* iOpaqueData; |
|
265 TInt iTApaAppServiceInfo; |
|
266 }; |
|
267 |
|
268 /** Application service information array. |
|
269 |
|
270 Owns an array of TApaAppServiceInfo objects. |
|
271 |
|
272 @see TApaAppServiceInfo |
|
273 @publishedPartner |
|
274 @released |
|
275 */ |
|
276 class CApaAppServiceInfoArray : public CBase |
|
277 { |
|
278 protected: |
|
279 IMPORT_C CApaAppServiceInfoArray(); |
|
280 public: |
|
281 /** Provides access to the encapsulated array of |
|
282 TApaAppServiceInfo objects. |
|
283 |
|
284 @return A generic array of TApaAppServiceInfo objects. */ |
|
285 virtual TArray<TApaAppServiceInfo> Array()=0; |
|
286 private: |
|
287 IMPORT_C virtual void CApaAppServiceInfoArray_Reserved1(); |
|
288 IMPORT_C virtual void CApaAppServiceInfoArray_Reserved2(); |
|
289 private: |
|
290 TInt iCApaAppServiceInfoArray_Reserved1; |
|
291 }; |
|
292 |
|
293 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
|
294 |
|
295 #endif |