1.1 --- a/epoc32/include/apaid.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/apaid.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,358 @@
1.4 -apaid.h
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef __APAID_H__
1.21 +#define __APAID_H__
1.22 +
1.23 +#if !defined(__E32BASE_H__)
1.24 +#include <e32base.h>
1.25 +#endif
1.26 +#if !defined(__APADEF_H__)
1.27 +#include <apadef.h>
1.28 +#endif
1.29 +
1.30 +#include "apmstd.h"
1.31 +
1.32 +
1.33 +// classes defined:
1.34 +class TApaAppIdentifier;
1.35 +class TApaAppEntry;
1.36 +class CApaAppFinder;
1.37 +//
1.38 +// classes referenced:
1.39 +class RReadStream;
1.40 +class RWriteStream;
1.41 +class RFs;
1.42 +//
1.43 +
1.44 +
1.45 +class TApaAppIdentifier
1.46 +/** The identity of an application.
1.47 +
1.48 +An object of this type contains two pieces of information:
1.49 +
1.50 +The application specific UID
1.51 +
1.52 +The file name and extension of the application DLL
1.53 +
1.54 +All persisted documents associated with this application have a stream containing
1.55 +this information.
1.56 +
1.57 +@publishedAll
1.58 +@released
1.59 +@see CApaProcess::ReadRootStreamLC()
1.60 +@see CApaProcess::WriteRootStreamL()
1.61 +@see CApaProcess::ReadAppIdentifierL()
1.62 +@see CApaProcess::WriteAppIdentifierL() */
1.63 + {
1.64 +public:
1.65 + IMPORT_C TApaAppIdentifier();
1.66 + IMPORT_C TApaAppIdentifier(TUid aAppUidType,const TFileName& aDllName);
1.67 + IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
1.68 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.69 +
1.70 +public:
1.71 + /** The application-specific UID. */
1.72 + TUid iAppUid;
1.73 + /** The full path name of the application DLL. */
1.74 + TFileName iFullName;
1.75 +
1.76 +private:
1.77 + TInt iTApaAppIdentifier_Reserved1;
1.78 + };
1.79 +
1.80 +
1.81 +class TApaAppEntry
1.82 +/** An application entry.
1.83 +
1.84 +An object of this type contains two pieces of information:
1.85 +
1.86 +the full path name of the application DLL
1.87 +
1.88 +the UID type (or compound identifier) of the application DLL.
1.89 +
1.90 +@publishedAll
1.91 +@released */
1.92 + {
1.93 +public:
1.94 + IMPORT_C TApaAppEntry();
1.95 + IMPORT_C TApaAppEntry(const TUidType& aAppUidType,const TFileName& aDllName);
1.96 + IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
1.97 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.98 +public:
1.99 + /** The UID type (or compound identifier) of the application DLL. */
1.100 + TUidType iUidType;
1.101 + /** The full path name of the application DLL. */
1.102 + TFileName iFullName;
1.103 +private:
1.104 + TInt iTApaAppEntry_Reserved1;
1.105 + };
1.106 +
1.107 +
1.108 +class TApaAppInfo
1.109 +/** Application information.
1.110 +
1.111 +An object of this type contains four pieces of information:
1.112 +
1.113 +the application specific UID
1.114 +
1.115 +the full path name of the application DLL
1.116 +
1.117 +the application's caption
1.118 +
1.119 +a short caption; how this is used is up to the UI
1.120 +
1.121 +@publishedAll
1.122 +@released */
1.123 + {
1.124 +public:
1.125 + IMPORT_C TApaAppInfo();
1.126 + IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption);
1.127 + IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption,const TApaAppCaption& aShortCaption);
1.128 + IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
1.129 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.130 +public:
1.131 + /** The application specific UID. */
1.132 + TUid iUid;
1.133 + /** The full path name of the application DLL. */
1.134 + TFileName iFullName;
1.135 + /** The caption for the application. */
1.136 + TApaAppCaption iCaption;
1.137 + /** The short caption for the application. */
1.138 + TApaAppCaption iShortCaption;
1.139 +
1.140 +private:
1.141 + TInt iTApaAppInfo_Reserved1;
1.142 + };
1.143 +
1.144 +
1.145 +class TApaAppViewInfo
1.146 +/** Contains the basic information about an application view.
1.147 +
1.148 +An object of this type contains two pieces of information:
1.149 +
1.150 +The UID that identifies the view
1.151 +
1.152 +The application's caption.
1.153 +
1.154 +Objects of this type are returned in an array populated by a call to RApaLsSession::GetAppViews().
1.155 +
1.156 +@publishedAll
1.157 +@released
1.158 +@see CApaAppViewArray
1.159 +@see TUid */
1.160 + {
1.161 +public:
1.162 + IMPORT_C TApaAppViewInfo();
1.163 + IMPORT_C TApaAppViewInfo(TUid aViewUid,const TApaAppCaption& aViewCaption,TInt aScreenMode);
1.164 + IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
1.165 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.166 +public:
1.167 + /** The UID identifying the view. */
1.168 + TUid iUid;
1.169 + /** The application caption. */
1.170 + TApaAppCaption iViewCaption;
1.171 + TInt iScreenMode;
1.172 +private:
1.173 + TInt iTApaAppViewInfo_Reserved1;
1.174 + };
1.175 +
1.176 +
1.177 +/** Defines an array of TApaAppViewInfo objects contained within a flat dynamic
1.178 +buffer.
1.179 +
1.180 +An array of this type is populated with TApaAppViewInfo objects in a call
1.181 +to RApaLsSession::GetAppViews().
1.182 +
1.183 +@publishedAll
1.184 +@released */
1.185 +typedef CArrayFixFlat<TApaAppViewInfo> CApaAppViewArray;
1.186 +
1.187 +
1.188 +class TApaAppCapability
1.189 +// expandable class - add new members to the end, add them to the end of int/ext also, and increment the version no.
1.190 +// default value for all data members must be 0
1.191 +/** Application capabilities.
1.192 +
1.193 +@publishedAll
1.194 +@released */
1.195 + {
1.196 +public:
1.197 + IMPORT_C static void CopyCapability(TDes8& aDest,const TDesC8& aSource);
1.198 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.199 + IMPORT_C void Internalize7_0L(RReadStream& aStream); // deprecated
1.200 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.201 +private:
1.202 + IMPORT_C void Externalize7_0L(RWriteStream& aStream) const; // deprecated
1.203 + void DoInternalizeL(RReadStream& aStream, TBool& aLaunchInBackground, TApaAppGroupName& aGroupName);
1.204 +public:
1.205 + //
1.206 + /** Defines an application's support for embeddability. */
1.207 + enum TEmbeddability {
1.208 + /** An application cannot be embedded. */
1.209 + ENotEmbeddable=0,
1.210 + /** An application can be run embedded or standalone and can read/write embedded document-content. */
1.211 + EEmbeddable=1,
1.212 + /** An application can only be run embedded and can read/write embedded document-content. */
1.213 + EEmbeddableOnly=2,
1.214 + /** An application can be run embedded or standalone and cannot read/write embedded document-content. */
1.215 + EEmbeddableUiOrStandAlone=5,
1.216 + /** An application can only be run embedded and cannot read/write embedded document-content. */
1.217 + EEmbeddableUiNotStandAlone=6 };
1.218 + /** Defines an application's attributes as a set of bit flags. */
1.219 + enum TCapabilityAttribute
1.220 + {
1.221 + /** If set, the application was built as a DLL, otherwise it was built as an EXE. */
1.222 + EBuiltAsDll = 0x00000001,
1.223 + /** If set, the application provides control panel functionality. */
1.224 + EControlPanelItem = 0x00000002,
1.225 + /** 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. */
1.226 + ENonNative = 0x00000004
1.227 + };
1.228 +public:
1.229 + /** Indicates the extent to which the application can be embedded. */
1.230 + TEmbeddability iEmbeddability;
1.231 + /** Indicates whether the application is document-based and supports being asked
1.232 + to create a new file. */
1.233 + TBool iSupportsNewFile;
1.234 + /** Indicates whether the existence of the application should be advertised to the
1.235 + user. If this is set to ETrue, the application does not appear on the Extras
1.236 + Bar (or equivalent). */
1.237 + TBool iAppIsHidden; // not shown in the Shell etc.
1.238 + /** Allows the application to be launched in the foreground (when set to EFalse)
1.239 + or in the background (when set to ETrue). */
1.240 + TBool iLaunchInBackground; // Series 60 extension to allow apps to be launched in the background
1.241 + /** Stores the application's logical group name. */
1.242 + TApaAppGroupName iGroupName; // Series 60 extension to allow apps to be categorized according a logical group name, e.g. 'games'
1.243 + /** Indicates the application attributes. One or more values from TCapabilityAttribute may be specified. */
1.244 + TUint iAttributes;
1.245 +private:
1.246 + enum { EVersion=4 };
1.247 +private:
1.248 + TInt iTApaAppCapability_Reserved1;
1.249 + };
1.250 +
1.251 +/** Packages the TApaAppCapability class.
1.252 +
1.253 +@publishedAll
1.254 +@released */
1.255 +typedef TPckgBuf<TApaAppCapability> TApaAppCapabilityBuf;
1.256 +
1.257 +
1.258 +/** Filter used to define the subset of applications returned by RApaLsSession::GetNextApp()
1.259 +
1.260 +@publishedAll
1.261 +@released
1.262 +*/
1.263 +class TApaEmbeddabilityFilter
1.264 + {
1.265 +public:
1.266 + IMPORT_C TApaEmbeddabilityFilter();
1.267 + IMPORT_C void AddEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability);
1.268 + IMPORT_C TBool MatchesEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability) const;
1.269 +private:
1.270 + TUint iEmbeddabilityFlags;
1.271 +private:
1.272 + TInt iTApaEmbeddabilityFilter_Reserved1;
1.273 + };
1.274 +
1.275 +
1.276 +class CApaAppFinder : public CBase
1.277 +/**
1.278 +@publishedPartner
1.279 +@deprecated
1.280 +*/
1.281 + {
1.282 +public:
1.283 + virtual void FindAllAppsL()=0; // sets up a scan for all apps
1.284 + virtual TBool NextL(TApaAppEntry& aEntry)=0; // increments a scan for all apps
1.285 + virtual TFileName FindAppL(const TDesC& aFileName,TUid aFileUid)=0; // searches for a particular app - should support wildcards in aFileName
1.286 + //
1.287 + virtual TFileName DefaultAppInfoFileName()const=0; // should return the full name, path and drive of the default icon file
1.288 +protected:
1.289 + IMPORT_C CApaAppFinder();
1.290 +
1.291 +private:
1.292 + IMPORT_C virtual void CApaAppFinder_Reserved1();
1.293 + IMPORT_C virtual void CApaAppFinder_Reserved2();
1.294 + };
1.295 +
1.296 +/**
1.297 +The uid for the Open service.
1.298 +
1.299 +@publishedPartner
1.300 +@released
1.301 +*/
1.302 +const TUid KOpenServiceUid = { 0x10208DCA };
1.303 +
1.304 +/** Application service information.
1.305 +
1.306 +Encapsulates a service UID and associated opaque data.
1.307 +
1.308 +An instance of this class provides information about
1.309 +a specific implementation of the service identified by
1.310 +the encapsulated service UID.
1.311 +
1.312 +@publishedPartner
1.313 +@released
1.314 +*/
1.315 +class TApaAppServiceInfo
1.316 + {
1.317 +public:
1.318 + TApaAppServiceInfo();
1.319 + TApaAppServiceInfo(TUid aUid, CArrayFixFlat<TDataTypeWithPriority>* aDataTypes,
1.320 + HBufC8* aOpaqueData);
1.321 + void ExternalizeL(RWriteStream& aStream) const;
1.322 + void InternalizeL(RReadStream& aStream);
1.323 + void Release();
1.324 + CArrayFixFlat<TDataTypeWithPriority>& DataTypes();
1.325 + IMPORT_C TUid Uid() const;
1.326 + IMPORT_C const CArrayFixFlat<TDataTypeWithPriority>& DataTypes() const;
1.327 + IMPORT_C const TDesC8& OpaqueData() const;
1.328 +private:
1.329 + TUid iUid;
1.330 + CArrayFixFlat<TDataTypeWithPriority>* iDataTypes;
1.331 + HBufC8* iOpaqueData;
1.332 + TInt iTApaAppServiceInfo;
1.333 + };
1.334 +
1.335 +/** Application service information array.
1.336 +
1.337 +Owns an array of TApaAppServiceInfo objects.
1.338 +
1.339 +@see TApaAppServiceInfo
1.340 +@publishedPartner
1.341 +@released
1.342 +*/
1.343 +class CApaAppServiceInfoArray : public CBase
1.344 + {
1.345 +protected:
1.346 + CApaAppServiceInfoArray();
1.347 +public:
1.348 + /** Provides access to the encapsulated array of
1.349 + TApaAppServiceInfo objects.
1.350 +
1.351 + @return A generic array of TApaAppServiceInfo objects. */
1.352 + virtual TArray<TApaAppServiceInfo> Array()=0;
1.353 +
1.354 +private:
1.355 + IMPORT_C virtual void CApaAppServiceInfoArray_Reserved1();
1.356 + IMPORT_C virtual void CApaAppServiceInfoArray_Reserved2();
1.357 +
1.358 +private:
1.359 + TInt iCApaAppServiceInfoArray_Reserved1;
1.360 + };
1.361 +
1.362 +#endif