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