1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
12 // |
12 // |
13 // Description: |
13 // Description: |
|
14 // apaid.h |
14 // |
15 // |
15 |
16 |
16 #ifndef __APAID_H__ |
17 #ifndef __APAID_H__ |
17 #define __APAID_H__ |
18 #define __APAID_H__ |
18 |
19 |
19 #if !defined(__E32BASE_H__) |
|
20 #include <e32base.h> |
20 #include <e32base.h> |
21 #endif |
|
22 #if !defined(__APADEF_H__) |
|
23 #include <apadef.h> |
21 #include <apadef.h> |
24 #endif |
22 #include <apmstd.h> // class TDataTypeWithPriority |
25 |
23 |
26 #include "apmstd.h" |
24 // classes referenced |
27 |
|
28 |
|
29 // classes defined: |
|
30 class TApaAppIdentifier; |
|
31 class TApaAppEntry; |
|
32 class CApaAppFinder; |
|
33 // |
|
34 // classes referenced: |
|
35 class RReadStream; |
25 class RReadStream; |
36 class RWriteStream; |
26 class RWriteStream; |
37 class RFs; |
27 class RFs; |
38 // |
28 |
39 |
|
40 |
|
41 class TApaAppIdentifier |
|
42 /** The identity of an application. |
29 /** The identity of an application. |
43 |
30 |
44 An object of this type contains two pieces of information: |
31 An object of this type contains two pieces of information: |
45 |
32 |
46 The application specific UID |
33 The application specific UID |
54 @released |
41 @released |
55 @see CApaProcess::ReadRootStreamLC() |
42 @see CApaProcess::ReadRootStreamLC() |
56 @see CApaProcess::WriteRootStreamL() |
43 @see CApaProcess::WriteRootStreamL() |
57 @see CApaProcess::ReadAppIdentifierL() |
44 @see CApaProcess::ReadAppIdentifierL() |
58 @see CApaProcess::WriteAppIdentifierL() */ |
45 @see CApaProcess::WriteAppIdentifierL() */ |
|
46 class TApaAppIdentifier |
59 { |
47 { |
60 public: |
48 public: |
61 IMPORT_C TApaAppIdentifier(); |
49 IMPORT_C TApaAppIdentifier(); |
62 IMPORT_C TApaAppIdentifier(TUid aAppUidType,const TFileName& aDllName); |
50 IMPORT_C TApaAppIdentifier(TUid aAppUidType,const TFileName& aDllName); |
63 IMPORT_C void ExternalizeL(RWriteStream& aStream)const; |
51 IMPORT_C void ExternalizeL(RWriteStream& aStream)const; |
64 IMPORT_C void InternalizeL(RReadStream& aStream); |
52 IMPORT_C void InternalizeL(RReadStream& aStream); |
65 |
|
66 public: |
53 public: |
67 /** The application-specific UID. */ |
54 /** The application-specific UID. */ |
68 TUid iAppUid; |
55 TUid iAppUid; |
69 /** The full path name of the application DLL. */ |
56 /** The full path name of the application DLL. */ |
70 TFileName iFullName; |
57 TFileName iFullName; |
71 |
|
72 private: |
58 private: |
73 TInt iTApaAppIdentifier_Reserved1; |
59 TInt iTApaAppIdentifier_Reserved1; |
74 }; |
60 }; |
75 |
61 |
76 |
62 |
77 class TApaAppEntry |
63 /** Application information. |
78 /** An application entry. |
64 |
79 |
65 An object of this type contains four pieces of information: |
80 An object of this type contains two pieces of information: |
66 |
|
67 the application specific UID |
81 |
68 |
82 the full path name of the application DLL |
69 the full path name of the application DLL |
83 |
70 |
84 the UID type (or compound identifier) of the application DLL. |
71 the application's caption |
85 |
72 |
86 @publishedAll |
73 a short caption; how this is used is up to the UI |
87 @released */ |
74 |
88 { |
75 @publishedAll |
89 public: |
76 @released */ |
90 IMPORT_C TApaAppEntry(); |
|
91 IMPORT_C TApaAppEntry(const TUidType& aAppUidType,const TFileName& aDllName); |
|
92 IMPORT_C void ExternalizeL(RWriteStream& aStream)const; |
|
93 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
94 public: |
|
95 /** The UID type (or compound identifier) of the application DLL. */ |
|
96 TUidType iUidType; |
|
97 /** The full path name of the application DLL. */ |
|
98 TFileName iFullName; |
|
99 private: |
|
100 TInt iTApaAppEntry_Reserved1; |
|
101 }; |
|
102 |
|
103 |
|
104 class TApaAppInfo |
77 class TApaAppInfo |
105 /** Application information. |
|
106 |
|
107 An object of this type contains four pieces of information: |
|
108 |
|
109 the application specific UID |
|
110 |
|
111 the full path name of the application DLL |
|
112 |
|
113 the application's caption |
|
114 |
|
115 a short caption; how this is used is up to the UI |
|
116 |
|
117 @publishedAll |
|
118 @released */ |
|
119 { |
78 { |
120 public: |
79 public: |
121 IMPORT_C TApaAppInfo(); |
80 IMPORT_C TApaAppInfo(); |
122 IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption); |
81 IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption); |
123 IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption,const TApaAppCaption& aShortCaption); |
82 IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption,const TApaAppCaption& aShortCaption); |
130 TFileName iFullName; |
89 TFileName iFullName; |
131 /** The caption for the application. */ |
90 /** The caption for the application. */ |
132 TApaAppCaption iCaption; |
91 TApaAppCaption iCaption; |
133 /** The short caption for the application. */ |
92 /** The short caption for the application. */ |
134 TApaAppCaption iShortCaption; |
93 TApaAppCaption iShortCaption; |
135 |
|
136 private: |
94 private: |
137 TInt iTApaAppInfo_Reserved1; |
95 TInt iTApaAppInfo_Reserved1; |
138 }; |
96 }; |
139 |
97 |
140 |
98 |
141 class TApaAppViewInfo |
|
142 /** Contains the basic information about an application view. |
99 /** Contains the basic information about an application view. |
143 |
100 |
144 An object of this type contains two pieces of information: |
101 An object of this type contains two pieces of information: |
145 |
102 |
146 The UID that identifies the view |
103 The UID that identifies the view |
179 @publishedAll |
137 @publishedAll |
180 @released */ |
138 @released */ |
181 typedef CArrayFixFlat<TApaAppViewInfo> CApaAppViewArray; |
139 typedef CArrayFixFlat<TApaAppViewInfo> CApaAppViewArray; |
182 |
140 |
183 |
141 |
|
142 /** Application capabilities. |
|
143 |
|
144 @publishedAll |
|
145 @released */ |
184 class TApaAppCapability |
146 class TApaAppCapability |
185 // expandable class - add new members to the end, add them to the end of int/ext also, and increment the version no. |
|
186 // default value for all data members must be 0 |
|
187 /** Application capabilities. |
|
188 |
|
189 @publishedAll |
|
190 @released */ |
|
191 { |
147 { |
192 public: |
148 public: |
193 IMPORT_C static void CopyCapability(TDes8& aDest,const TDesC8& aSource); |
149 IMPORT_C static void CopyCapability(TDes8& aDest,const TDesC8& aSource); |
194 IMPORT_C void InternalizeL(RReadStream& aStream); |
150 IMPORT_C void InternalizeL(RReadStream& aStream); |
195 IMPORT_C void Internalize7_0L(RReadStream& aStream); // deprecated |
|
196 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
151 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
197 private: |
152 private: |
198 IMPORT_C void Externalize7_0L(RWriteStream& aStream) const; // deprecated |
|
199 void DoInternalizeL(RReadStream& aStream, TBool& aLaunchInBackground, TApaAppGroupName& aGroupName); |
153 void DoInternalizeL(RReadStream& aStream, TBool& aLaunchInBackground, TApaAppGroupName& aGroupName); |
200 public: |
154 public: |
201 // |
155 // |
202 /** Defines an application's support for embeddability. */ |
156 /** Defines an application's support for embeddability. */ |
203 enum TEmbeddability { |
157 enum TEmbeddability { |
212 /** An application can only be run embedded and cannot read/write embedded document-content. */ |
166 /** An application can only be run embedded and cannot read/write embedded document-content. */ |
213 EEmbeddableUiNotStandAlone=6 }; |
167 EEmbeddableUiNotStandAlone=6 }; |
214 /** Defines an application's attributes as a set of bit flags. */ |
168 /** Defines an application's attributes as a set of bit flags. */ |
215 enum TCapabilityAttribute |
169 enum TCapabilityAttribute |
216 { |
170 { |
217 /** If set, the application was built as a DLL, otherwise it was built as an EXE. */ |
171 /** This functionality is deprecated from v9.5 onwards. |
|
172 @deprecated |
|
173 */ |
218 EBuiltAsDll = 0x00000001, |
174 EBuiltAsDll = 0x00000001, |
219 /** If set, the application provides control panel functionality. */ |
175 /** If set, the application provides control panel functionality. */ |
220 EControlPanelItem = 0x00000002, |
176 EControlPanelItem = 0x00000002, |
221 /** 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. */ |
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. */ |
222 ENonNative = 0x00000004 |
178 ENonNative = 0x00000004 |
237 /** Stores the application's logical group name. */ |
193 /** Stores the application's logical group name. */ |
238 TApaAppGroupName iGroupName; // Series 60 extension to allow apps to be categorized according a logical group name, e.g. 'games' |
194 TApaAppGroupName iGroupName; // Series 60 extension to allow apps to be categorized according a logical group name, e.g. 'games' |
239 /** Indicates the application attributes. One or more values from TCapabilityAttribute may be specified. */ |
195 /** Indicates the application attributes. One or more values from TCapabilityAttribute may be specified. */ |
240 TUint iAttributes; |
196 TUint iAttributes; |
241 private: |
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 |
242 enum { EVersion=4 }; |
200 enum { EVersion=4 }; |
243 private: |
201 private: |
244 TInt iTApaAppCapability_Reserved1; |
202 TInt iTApaAppCapability_Reserved1; |
245 }; |
203 }; |
246 |
204 |
266 TUint iEmbeddabilityFlags; |
224 TUint iEmbeddabilityFlags; |
267 private: |
225 private: |
268 TInt iTApaEmbeddabilityFilter_Reserved1; |
226 TInt iTApaEmbeddabilityFilter_Reserved1; |
269 }; |
227 }; |
270 |
228 |
271 |
229 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
272 class CApaAppFinder : public CBase |
|
273 /** |
|
274 @publishedPartner |
|
275 @deprecated |
|
276 */ |
|
277 { |
|
278 public: |
|
279 virtual void FindAllAppsL()=0; // sets up a scan for all apps |
|
280 virtual TBool NextL(TApaAppEntry& aEntry)=0; // increments a scan for all apps |
|
281 virtual TFileName FindAppL(const TDesC& aFileName,TUid aFileUid)=0; // searches for a particular app - should support wildcards in aFileName |
|
282 // |
|
283 virtual TFileName DefaultAppInfoFileName()const=0; // should return the full name, path and drive of the default icon file |
|
284 protected: |
|
285 IMPORT_C CApaAppFinder(); |
|
286 |
|
287 private: |
|
288 IMPORT_C virtual void CApaAppFinder_Reserved1(); |
|
289 IMPORT_C virtual void CApaAppFinder_Reserved2(); |
|
290 }; |
|
291 |
|
292 /** |
230 /** |
293 The uid for the Open service. |
231 The uid for the Open service. |
294 |
232 |
295 @publishedPartner |
233 @publishedPartner |
296 @released |
234 @released |
309 @released |
247 @released |
310 */ |
248 */ |
311 class TApaAppServiceInfo |
249 class TApaAppServiceInfo |
312 { |
250 { |
313 public: |
251 public: |
314 TApaAppServiceInfo(); |
252 IMPORT_C TApaAppServiceInfo(); |
315 TApaAppServiceInfo(TUid aUid, CArrayFixFlat<TDataTypeWithPriority>* aDataTypes, |
253 IMPORT_C TApaAppServiceInfo(TUid aUid, CArrayFixFlat<TDataTypeWithPriority>* aDataTypes, HBufC8* aOpaqueData); |
316 HBufC8* aOpaqueData); |
254 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
317 void ExternalizeL(RWriteStream& aStream) const; |
255 IMPORT_C void InternalizeL(RReadStream& aStream); |
318 void InternalizeL(RReadStream& aStream); |
256 IMPORT_C void Release(); |
319 void Release(); |
257 IMPORT_C CArrayFixFlat<TDataTypeWithPriority>& DataTypes(); |
320 CArrayFixFlat<TDataTypeWithPriority>& DataTypes(); |
|
321 IMPORT_C TUid Uid() const; |
258 IMPORT_C TUid Uid() const; |
322 IMPORT_C const CArrayFixFlat<TDataTypeWithPriority>& DataTypes() const; |
259 IMPORT_C const CArrayFixFlat<TDataTypeWithPriority>& DataTypes() const; |
323 IMPORT_C const TDesC8& OpaqueData() const; |
260 IMPORT_C const TDesC8& OpaqueData() const; |
324 private: |
261 private: |
325 TUid iUid; |
262 TUid iUid; |
337 @released |
274 @released |
338 */ |
275 */ |
339 class CApaAppServiceInfoArray : public CBase |
276 class CApaAppServiceInfoArray : public CBase |
340 { |
277 { |
341 protected: |
278 protected: |
342 CApaAppServiceInfoArray(); |
279 IMPORT_C CApaAppServiceInfoArray(); |
343 public: |
280 public: |
344 /** Provides access to the encapsulated array of |
281 /** Provides access to the encapsulated array of |
345 TApaAppServiceInfo objects. |
282 TApaAppServiceInfo objects. |
346 |
283 |
347 @return A generic array of TApaAppServiceInfo objects. */ |
284 @return A generic array of TApaAppServiceInfo objects. */ |
348 virtual TArray<TApaAppServiceInfo> Array()=0; |
285 virtual TArray<TApaAppServiceInfo> Array()=0; |
349 |
|
350 private: |
286 private: |
351 IMPORT_C virtual void CApaAppServiceInfoArray_Reserved1(); |
287 IMPORT_C virtual void CApaAppServiceInfoArray_Reserved1(); |
352 IMPORT_C virtual void CApaAppServiceInfoArray_Reserved2(); |
288 IMPORT_C virtual void CApaAppServiceInfoArray_Reserved2(); |
353 |
|
354 private: |
289 private: |
355 TInt iCApaAppServiceInfoArray_Reserved1; |
290 TInt iCApaAppServiceInfoArray_Reserved1; |
356 }; |
291 }; |
357 |
292 |
|
293 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
|
294 |
358 #endif |
295 #endif |