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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #include <apmstd.h> // class TDataTypeWithPriority
29 /** The identity of an application.
31 An object of this type contains two pieces of information:
33 The application specific UID
35 The file name and extension of the application DLL
37 All persisted documents associated with this application have a stream containing
42 @see CApaProcess::ReadRootStreamLC()
43 @see CApaProcess::WriteRootStreamL()
44 @see CApaProcess::ReadAppIdentifierL()
45 @see CApaProcess::WriteAppIdentifierL() */
46 class TApaAppIdentifier
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);
54 /** The application-specific UID. */
56 /** The full path name of the application DLL. */
59 TInt iTApaAppIdentifier_Reserved1;
63 /** Application information.
65 An object of this type contains four pieces of information:
67 the application specific UID
69 the full path name of the application DLL
71 the application's caption
73 a short caption; how this is used is up to the UI
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);
86 /** The application specific UID. */
88 /** The full path name of the application DLL. */
90 /** The caption for the application. */
91 TApaAppCaption iCaption;
92 /** The short caption for the application. */
93 TApaAppCaption iShortCaption;
95 TInt iTApaAppInfo_Reserved1;
99 /** Contains the basic information about an application view.
101 An object of this type contains two pieces of information:
103 The UID that identifies the view
105 The application's caption.
107 Objects of this type are returned in an array populated by a call to RApaLsSession::GetAppViews().
111 @see CApaAppViewArray
113 class TApaAppViewInfo
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);
121 /** The UID identifying the view. */
123 /** The application caption. */
124 TApaAppCaption iViewCaption;
127 TInt iTApaAppViewInfo_Reserved1;
131 /** Defines an array of TApaAppViewInfo objects contained within a flat dynamic
134 An array of this type is populated with TApaAppViewInfo objects in a call
135 to RApaLsSession::GetAppViews().
139 typedef CArrayFixFlat<TApaAppViewInfo> CApaAppViewArray;
142 /** Application capabilities.
146 class TApaAppCapability
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;
153 void DoInternalizeL(RReadStream& aStream, TBool& aLaunchInBackground, TApaAppGroupName& aGroupName);
156 /** Defines an application's support for embeddability. */
157 enum TEmbeddability {
158 /** An application cannot be embedded. */
160 /** An application can be run embedded or standalone and can read/write embedded document-content. */
162 /** An application can only be run embedded and can read/write embedded document-content. */
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
171 /** This functionality is deprecated from v9.5 onwards.
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
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. */
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
202 TInt iTApaAppCapability_Reserved1;
205 /** Packages the TApaAppCapability class.
209 typedef TPckgBuf<TApaAppCapability> TApaAppCapabilityBuf;
212 /** Filter used to define the subset of applications returned by RApaLsSession::GetNextApp()
217 class TApaEmbeddabilityFilter
220 IMPORT_C TApaEmbeddabilityFilter();
221 IMPORT_C void AddEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability);
222 IMPORT_C TBool MatchesEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability) const;
224 TUint iEmbeddabilityFlags;
226 TInt iTApaEmbeddabilityFilter_Reserved1;
229 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
231 The uid for the Open service.
236 const TUid KOpenServiceUid = { 0x10208DCA };
238 /** Application service information.
240 Encapsulates a service UID and associated opaque data.
242 An instance of this class provides information about
243 a specific implementation of the service identified by
244 the encapsulated service UID.
249 class TApaAppServiceInfo
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;
263 CArrayFixFlat<TDataTypeWithPriority>* iDataTypes;
265 TInt iTApaAppServiceInfo;
268 /** Application service information array.
270 Owns an array of TApaAppServiceInfo objects.
272 @see TApaAppServiceInfo
276 class CApaAppServiceInfoArray : public CBase
279 IMPORT_C CApaAppServiceInfoArray();
281 /** Provides access to the encapsulated array of
282 TApaAppServiceInfo objects.
284 @return A generic array of TApaAppServiceInfo objects. */
285 virtual TArray<TApaAppServiceInfo> Array()=0;
287 IMPORT_C virtual void CApaAppServiceInfoArray_Reserved1();
288 IMPORT_C virtual void CApaAppServiceInfoArray_Reserved2();
290 TInt iCApaAppServiceInfoArray_Reserved1;
293 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS