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