RApaLsSession Class Reference

#include <mw/apgcli.h>

Link against: apgrfx.lib

class RApaLsSession : public RSessionBase, public RSessionBase
Public Member Enumerations
enumTApaLsErrorCode { ENoMoreAppsInList, EAppListInvalid }
enumTLaunchType { ELaunchNewApp, ESwitchFiles }
Public Member Functions
RApaLsSession()
IMPORT_C TIntAppCount(TInt &)
IMPORT_C TIntAppForDataType(const TDataType &, TUid &)
IMPORT_C TIntAppForDataTypeAndService(const TDataType &, TUid, TUid &)
IMPORT_C TIntAppForDocument(const TDesC &, TUid &, TDataType &)
IMPORT_C TIntAppForDocument(const RFile &, TUid &, TDataType &)
IMPORT_C TIntAppForDocumentAndService(const TDesC &, TUid, TUid &, TDataType &)
IMPORT_C TIntAppForDocumentAndService(const RFile &, TUid, TUid &, TDataType &)
IMPORT_C TIntApplicationLanguage(TUid, TLanguage &)
IMPORT_C TIntCancelListPopulationCompleteObserver()
IMPORT_C voidCancelNotify()
IMPORT_C voidCancelNotifyOnDataMappingChange()
IMPORT_C voidCancelRecognizeFiles()
IMPORT_C TIntClearAppChangeStatus(const TUid)
IMPORT_C voidClearFsSession()
IMPORT_C voidClose()
IMPORT_C voidCommitNonNativeApplicationsUpdatesL()
IMPORT_C TIntConnect()
IMPORT_C TIntCreateDocument(const TDesC &, TUid, TThreadId &, TLaunchType)
IMPORT_C TIntDeleteDataMapping(const TDataType &)
IMPORT_C TIntDeleteDataMapping(const TDataType &, TUid)
IMPORT_C voidDeregisterNonNativeApplicationL(TUid)
IMPORT_C voidDeregisterNonNativeApplicationTypeL(TUid)
IMPORT_C TIntEmbeddableAppCount(TInt &)
IMPORT_C voidForceCommitNonNativeApplicationsUpdatesL()
IMPORT_C TIntForceRegistration(const RPointerArray< TDesC > &)
IMPORT_C RFs *FsSession()
IMPORT_C TIntGetAcceptedConfidence(TInt &)
IMPORT_C TIntGetAllApps()
IMPORT_C TIntGetAllApps(TInt)
IMPORT_C TIntGetAppByDataType(const TDataType &, TUid, TUid &)
IMPORT_C TIntGetAppCapability(TDes8 &, TUid)
IMPORT_C TIntGetAppIcon(TUid, TInt, CApaMaskedBitmap &)
IMPORT_C TIntGetAppIcon(TUid, TSize, CApaMaskedBitmap &)
IMPORT_C TIntGetAppIcon(TUid, HBufC *&)
IMPORT_C TIntGetAppIcon(TUid, RFile &)
IMPORT_C TIntGetAppIconSizes(TUid, CArrayFixFlat< TSize > &)
IMPORT_C TIntGetAppInfo(TApaAppInfo &, TUid)
IMPORT_C TIntGetAppOwnedFiles(CDesCArray &, TUid)
IMPORT_C CApaAppServiceInfoArray *GetAppServiceOpaqueDataLC(TUid, TUid)
IMPORT_C voidGetAppServicesL(TUid, CArrayFixFlat< TUid > &)
IMPORT_C CApaAppServiceInfoArray *GetAppServicesLC(TUid)
IMPORT_C TIntGetAppType(TUid &, TUid)
IMPORT_C TIntGetAppViewIcon(TUid, TUid, const TSize &, CApaMaskedBitmap &)
IMPORT_C TIntGetAppViewIcon(TUid, TUid, HBufC *&)
IMPORT_C TIntGetAppViews(CApaAppViewArray &, TUid)
IMPORT_C TIntGetDefaultScreenNumber(TInt &, TUid)
IMPORT_C TIntGetEmbeddableApps()
IMPORT_C TIntGetEmbeddableApps(TInt)
IMPORT_C TIntGetFilteredApps(const TApaEmbeddabilityFilter &)
IMPORT_C TIntGetFilteredApps(const TApaEmbeddabilityFilter &, TInt)
IMPORT_C TIntGetFilteredApps(TUint, TUint)
IMPORT_C TIntGetFilteredApps(TUint, TUint, TInt)
IMPORT_C TIntGetMaxDataBufSize(TInt &)
IMPORT_C TIntGetNextApp(TApaAppInfo &)
IMPORT_C TIntGetNextApp(TApaAppInfo &, TInt)
IMPORT_C TIntGetPreferredBufSize(TInt &)
IMPORT_C TIntGetServerApps(TUid)
IMPORT_C TIntGetServerApps(TUid, TInt)
IMPORT_C CApaAppServiceInfoArray *GetServiceImplementationsLC(TUid)
IMPORT_C CApaAppServiceInfoArray *GetServiceImplementationsLC(TUid, const TDataType &)
IMPORT_C TIntGetSupportedDataTypesL(CDataTypeArray &)
IMPORT_C TIntInsertDataMapping(const TDataType &, TDataTypePriority, TUid)
IMPORT_C TIntInsertDataMapping(const TDataType &, TDataTypePriority, TUid, TUid)
IMPORT_C TIntInsertDataMappingIfHigher(const TDataType &, TDataTypePriority, TUid, TBool &)
IMPORT_C TIntInstalledApps(const RPointerArray< TDesC > &)
IMPORT_C TIntIsAppChanged(const TUid, TBool &)
IMPORT_C TIntIsProgram(const TDesC &, TBool &)
IMPORT_C TIntMatchesSecurityPolicy(TBool &, TUid, const TSecurityPolicy &)
IMPORT_C voidNotifyOnDataMappingChange(TRequestStatus &)
IMPORT_C TIntNumberOfOwnDefinedIcons(TUid, TInt &)
IMPORT_C voidPrepareNonNativeApplicationsUpdatesL()
IMPORT_C TIntRecognizeData(const TDesC8 &, TDataRecognitionResult &)
IMPORT_C TIntRecognizeData(const TDesC &, const TDesC8 &, TDataRecognitionResult &)
IMPORT_C TIntRecognizeData(const RFile &, TDataRecognitionResult &)
IMPORT_C TIntRecognizeFilesL(const TDesC &, CDataRecognitionResultArray &)
IMPORT_C voidRecognizeFilesL(const TDesC &, CDataRecognitionResultArray &, TRequestStatus &)
IMPORT_C TIntRecognizeFilesL(const TDesC &, const TDesC8 &, CDataRecognitionResultArray &)
IMPORT_C voidRecognizeFilesL(const TDesC &, const TDesC8 &, CDataRecognitionResultArray &, TRequestStatus &)
IMPORT_C TIntRecognizeSpecificData(const TDesC &, const TDesC8 &, const TDataType &, TBool &)
IMPORT_C TIntRecognizeSpecificData(const RFile &, const TDataType &, TBool &)
IMPORT_C voidRegisterListPopulationCompleteObserver(TRequestStatus &)
IMPORT_C voidRegisterNonNativeApplicationL(TUid, const TDriveUnit &, CApaRegistrationResourceFileWriter &, CApaLocalisableResourceFileWriter *, const RFile *)
IMPORT_C voidRegisterNonNativeApplicationTypeL(TUid, const TDesC &)
IMPORT_C TIntRollbackNonNativeApplicationsUpdates()
IMPORT_C TIntSetAcceptedConfidence(TInt)
IMPORT_C TIntSetAppShortCaption(const TDesC &, TLanguage, TUid)
IMPORT_C voidSetFsSessionL(RFs &)
IMPORT_C TIntSetMaxDataBufSize(TInt)
IMPORT_C voidSetNotify(TBool, TRequestStatus &)
IMPORT_C TIntStartApp(const CApaCommandLine &)
IMPORT_C TIntStartApp(const CApaCommandLine &, TThreadId &)
IMPORT_C TIntStartApp(const CApaCommandLine &, TThreadId &, TRequestStatus *)
IMPORT_C TIntStartDocument(const TDesC &, TThreadId &, TLaunchType)
IMPORT_C TIntStartDocument(const TDesC &, const TDataType &, TThreadId &, TLaunchType)
IMPORT_C TIntStartDocument(const TDesC &, TUid, TThreadId &, TLaunchType)
IMPORT_C TIntStartDocument(RFile &, TThreadId &, TRequestStatus *)
IMPORT_C TIntStartDocument(RFile &, const TDataType &, TThreadId &, TRequestStatus *)
IMPORT_C TIntStartDocument(RFile &, TUid, TThreadId &, TRequestStatus *)
IMPORT_C TVersionVersion()
Inherited Attributes
RHandleBase::iHandle
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()

Detailed Description

A session with the application architecture server.

The server provides access to a cached list of the applications on the device.

To use this class, clients first need to connect to the server.

Then, one of GetAllApps(), GetEmbeddableApps() or GetFilteredApps() needs to be called. These functions do some initialisation of server data in preparation for returning the application list (which is owned by the server).

Then, GetNextApp() is called in a loop. The first time around, it populates the session's application list and retrieves the first application in the list. Further calls to GetNextApp() retrieve the remaining applications in the list, until RApaLsSession::ENoMoreAppsInList is returned.

The session should be closed when it is no longer needed, before it goes out of scope.

Various functions in RApaLsSession need to access the application list, and may return RApaLsSession::EAppListInvalid to indicate that the function was called before the initial population of the list is complete. If this occurs, you could try again after a short delay.

This class provides many other functions, for instance launching applications, querying application-specific information, recognising data.

Member Enumeration Documentation

Enum TApaLsErrorCode

EnumeratorValueDescription
ENoMoreAppsInList1

A possible return value from GetNextApp(), to indicate that there are no more applications in the list.

EAppListInvalid

Indicates that an RApaLsSession member function was called before the session's application list is fully populated.

Enum TLaunchType

Defines the way an application is launched. This is no longer in use. Has no effect!

EnumeratorValueDescription
ELaunchNewApp1
ESwitchFiles

Constructor & Destructor Documentation

RApaLsSession ( )

IMPORT_CRApaLsSession()

Member Function Documentation

AppCount ( TInt & )

IMPORT_C TIntAppCount(TInt &aCount)const

Gets the total number of applications.

Control panel applications are excluded.

Parameters
aCountOn return, the total number of applications.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.

AppForDataType ( const TDataType &, TUid & )

IMPORT_C TIntAppForDataType(const TDataType &aDataType,
TUid &aAppUid
)const

Gets the UID of an application that can handle the specified data (MIME) type.

If no application can be found, the function returns the UID of the preferred default handler. If none of the default handlers can handle the data type, then a NULL UID is returned.

Parameters
aDataTypeThe data (MIME) type.
aAppUidOn return, the UID of the application that can handle the data (MIME) type; this may be NULL.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

AppForDataTypeAndService ( const TDataType &, TUid, TUid & )

IMPORT_C TIntAppForDataTypeAndService(const TDataType &aDataType,
TUidaServiceUid,
TUid &aAppUid
)const

Gets the UID of an application that can handle the specified data (MIME) type and service.

If no application can be found, the function returns the UID of the preferred default handler. If none of the default handlers can handle the combination of data type and service, then a NULL UID is returned in aAppUid.

Parameters
aDataTypeThe data (MIME) type.
aServiceUidThe service UID.
aAppUidOn return, the UID of the application that can handle the data (MIME) type and service; this may be NULL.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

AppForDocument ( const TDesC &, TUid &, TDataType & )

IMPORT_C TIntAppForDocument(const TDesC &aFileName,
TUid &aAppUid,
TDataType &aDataType
)const

Gets the data (MIME) type of the data in the specified file and gets the UID of an application that can handle this type.

Parameters
aFileNameThe name of the file containing the data.
aAppUidOn return, the UID of the application that can handle the data (MIME) type; this may be NULL.
aDataTypeOn return, the data (MIME) type.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

AppForDocument ( const RFile &, TUid &, TDataType & )

IMPORT_C TIntAppForDocument(const RFile &aFile,
TUid &aAppUid,
TDataType &aDataType
)const

Gets the data (MIME) type of the data in the specified file and gets the UID of an application that can handle this type.

Parameters
aFileThe file containing the data. Before this function can be called, the file server session which owns this file handle must first be marked as shareable by calling RFs::ShareProtected().
aAppUidOn return, the UID of the application that can handle the data (MIME) type; this may be NULL.
aDataTypeOn return, the data (MIME) type.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

AppForDocumentAndService ( const TDesC &, TUid, TUid &, TDataType & )

IMPORT_C TIntAppForDocumentAndService(const TDesC &aFileName,
TUidaServiceUid,
TUid &aAppUid,
TDataType &aDataType
)const

Gets the data (MIME) type of the data in the specified file and gets the UID of an application that can handle this type and service.

Parameters
aFileNameThe name of the file containing the data.
aServiceUidThe service UID
aDataTypeOn return, the data (MIME) type.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

AppForDocumentAndService ( const RFile &, TUid, TUid &, TDataType & )

IMPORT_C TIntAppForDocumentAndService(const RFile &aFile,
TUidaServiceUid,
TUid &aAppUid,
TDataType &aDataType
)const

Gets the data (MIME) type of the data in the specified file and gets the UID of an application that can handle this type and service.

Parameters
aFileThe file handle. Before this function can be called, the file server session which owns this file handle must first be marked as shareable by calling RFs::ShareProtected().
aServiceUidThe service UID.
aDataTypeOn return, the data (MIME) type.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

ApplicationLanguage ( TUid, TLanguage & )

IMPORT_C TIntApplicationLanguage(TUidaAppUid,
TLanguage &aLanguage
)const

Determines the current language an application is using to display its user interface.

Parameters
aAppUidThe application specific UID.
aLanguageOn return, the application language.
Return Value
KErrNone, if successful; KErrNotFound, if a matching application could not be found; otherwise one of the other system wide error codes.

CancelListPopulationCompleteObserver ( )

IMPORT_C TIntCancelListPopulationCompleteObserver()const

Cancels the observer registered with apparc server to notify when the initial population of applist is completed

Return Value
KErrNone, if successful; otherwise one of the system-wide error codes.

CancelNotify ( )

IMPORT_C voidCancelNotify()

CancelNotifyOnDataMappingChange ( )

IMPORT_C voidCancelNotifyOnDataMappingChange()

Cancellation of notification of changes in data-type mapping

This cancels the outstanding the NotifyOnDataTypeMappingChange issued by this client, if there is one outstanding. Otherwise it does nothing.

See also: NotifyOnDataTypeMappingChange

CancelRecognizeFiles ( )

IMPORT_C voidCancelRecognizeFiles()

Cancels any outstanding asynchronous recognition requests.

ClearAppChangeStatus ( const TUid )

IMPORT_C TIntClearAppChangeStatus(const TUidaUid)

Clears application change status. When an application launched, clients has to clear the change status of the application.

Parameters
aUidUID of the application.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

ClearFsSession ( )

IMPORT_C voidClearFsSession()[static]

Close ( )

IMPORT_C voidClose()

Reimplemented from RHandleBase::Close()

Closes the session. Needs to be called to avoid memory leaks.

CommitNonNativeApplicationsUpdatesL ( )

IMPORT_C voidCommitNonNativeApplicationsUpdatesL()

Commits the non-native application updates. This is a synchronous method which waits until the application list is updated.

See also: ForceCommitNonNativeApplicationsUpdatesL

Connect ( )

IMPORT_C TIntConnect()

Connects a client to the application architecture server, creating a session with it.

Return Value
KErrNone if successful; otherwise, one of the system-wide error codes.

CreateDocument ( const TDesC &, TUid, TThreadId &, TLaunchType )

IMPORT_C TIntCreateDocument(const TDesC &aDocFileName,
TUidaAppUid,
TThreadId &aThreadId,
TLaunchTypeaUnused = ELaunchNewApp
)

Launches the application identified by the specified UID and creates a new document.

To create a document file with the passed document name, the application needs to override the 3-parameter overload of ProcessCommandParametersL() to call the 2-parameter overload.

Otherwise, a document will be created with the default document name present in the application resource file. If default document name is empty or not provided, no document is created.

If the application resource file is not present, a document with application caption name is created.

See also: CEikAppUi::ProcessCommandParametersL().

Parameters
aDocFileNameThe document name.
aAppUidThe application specific UID.
aThreadIdOn return, the id of the main thread started.
Return Value
KErrNone, if successful; EAppListInvalid if the server's initial population of the list has not completed; KErrNotFound, if no suitable application can be found; KErrPermissionDenied, if the application is in the blacklisted list; otherwise one of the other system-wide error codes.

DeleteDataMapping ( const TDataType & )

IMPORT_C TIntDeleteDataMapping(const TDataType &aDataType)

Removes an existing user mapping between an application and data-type made through InsertDataMapping() or InsertDataMappingIfHigher().

See also: InsertDataMapping() InsertDataMappingIfHigher()

Parameters
aDataTypeData type whose mapping should be removed.
Return Value
KErrNone on success, or a system-wide error code.
Panic Codes
USER0 The specified data type cannot be found. Debug builds only.
Capability
WriteDeviceDataPrevent removal of data type mappings by malicious programs.

DeleteDataMapping ( const TDataType &, TUid )

IMPORT_C TIntDeleteDataMapping(const TDataType &aDataType,
TUidaServiceUid
)

Removes an existing data type mapping.

Parameters
aDataTypeData type whose mapping should be removed.
aServiceUidThe UID of the service.
Return Value
KErrNone on success, or a system-wide error code.
Panic Codes
USER0 The specified data type cannot be found. Debug builds only.
Capability
WriteDeviceDataPrevent removal of data type mappings by malicious programs.

DeregisterNonNativeApplicationL ( TUid )

IMPORT_C voidDeregisterNonNativeApplicationL(TUidaApplication)

DeregisterNonNativeApplicationTypeL ( TUid )

IMPORT_C voidDeregisterNonNativeApplicationTypeL(TUidaApplicationType)

EmbeddableAppCount ( TInt & )

IMPORT_C TIntEmbeddableAppCount(TInt &aCount)const

Gets the total number of embeddable applications.

Control panel applications are excluded.

Parameters
aCountOn return, the total number of embeddable applications.
Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

ForceCommitNonNativeApplicationsUpdatesL ( )

IMPORT_C voidForceCommitNonNativeApplicationsUpdatesL()

Commits the non-native application updates. This is an asynchronous method which will not wait until the application list is updated. CApaAppListNotifier class should be used to synchronize the completion of updating the application list.

See also: CommitNonNativeApplicationsUpdatesL CApaAppListNotifier

ForceRegistration ( const RPointerArray< TDesC > & )

IMPORT_C TIntForceRegistration(const RPointerArray< TDesC > &aRegFiles)

This function is only for use by Software Install.

As part of the fix for defect INC069526, we added a check in apparc. We check if the application has been installed before adding it to the apparc db. A side-effect of this fix is that it is not possible to launch applications that are being installed from the installation process itself. This is a regresssion.

To fix this regression we added this function. It allows Software Install to specify a list of registration files that need to be included in apparc's list even if they have not been marked as installed in the SISRegistry or JavaRegistry. The list of registration files is cleared once Software Install notifies (via P&S) the end of the installation (whether successful or not). The function also forces a rescan and only returns when this rescan is complete. This is because Software Install needs to be sure the registration files have been added to apparc's list before trying to launch the recently installed applications.

Parameters
aRegFilesThe list of registration files for which the SISRegistry check must be ignored.
Return Value
A standard error code.

FsSession ( )

IMPORT_C RFs *FsSession()[static]

GetAcceptedConfidence ( TInt & )

IMPORT_C TIntGetAcceptedConfidence(TInt &aConfidence)const

Gets the confidence threshold for successful data recognition.

This is the minimum acceptable confidence level that must be reported by a data recognizer for data to be accepted as of a given type.

Parameters
aConfidenceOn return, the confidence threshold.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

GetAllApps ( )

IMPORT_C TIntGetAllApps()const

Initialises the process of getting all applications in the cached list.

Control panel applications are excluded.

A call to this function is followed by subsequent and repeated calls to GetNextApp() to retrieve all applications in the cached list.

Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

GetAllApps ( TInt )

IMPORT_C TIntGetAllApps(TIntaScreenMode)const

Initialises the process of getting all applications in the cached list.

Control panel applications are excluded.

A call to this function is followed by subsequent and repeated calls to GetNextApp() to retrieve all applications supporting aScreenMode in the cached list.

Parameters
aScreenModeOnly applications which define a view supporting aScreenMode will be returned by subsequent calls to GetNextApp(). If an application does not define views in it's application information file, only screen mode 0 is supported.
Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

GetAppByDataType ( const TDataType &, TUid, TUid & )

IMPORT_C TIntGetAppByDataType(const TDataType &aDataType,
TUidaServiceUid,
TUid &aAppUid
)const

Gets the application associated with the data type and the service uid from the datatype store.

The function will only look into the datatype store and will not use the default type associations. This is different from the AppForDataTypeAndService() function.

Parameters
aDataTypeThe data (MIME) type.
aServiceUidThe UID of the service.
aAppUidOn return, the UID of the application that can handle the data (MIME) type; this may be NULL.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

GetAppCapability ( TDes8 &, TUid )

IMPORT_C TIntGetAppCapability(TDes8 &aCapabilityBuf,
TUidaAppUid
)const

Gets the capabilities of the application with the specified UID.

Parameters
aCapabilityBufA modifiable descriptor that, on return, contains the application's capability information. The data returned in the descriptor is mapped by the TApaAppCapability class. If no matching application is found, then the content of this descriptor is not changed.
aAppUidThe application specific UID.
Return Value
KErrNone, if successful; KErrNotFound, if no matching entry can be found; otherwise one of the other system wide error codes.

GetAppIcon ( TUid, TInt, CApaMaskedBitmap & )

IMPORT_C TIntGetAppIcon(TUidaAppUid,
TIntaSize,
CApaMaskedBitmap &aAppBitmap
)const

gets the bitmap handles from the Server, forms these up into a CApaMaskedBitmap

Sets aAppBitmap to be the small, medium or large app icon of the app with uid aAppUid, when aSize=0, 1 or 2 respectively. Panics the caller if a different index is specified. The overload which takes a TSize should be used instead.

Deprecated

Parameters
aAppUidThe application specific UID.
aSizeThe required size of the icon.
aAppBitmapOn return, the application icon.
Return Value
KErrNone, if successful; KErrNotFound, if a matching entry could not be found, or no icon equal to or smaller than the specified size can be found; KErrNotSupported, if the application provides icons in non-MBM format, otherwise one of the other system wide error codes.

GetAppIcon ( TUid, TSize, CApaMaskedBitmap & )

IMPORT_C TIntGetAppIcon(TUidaAppUid,
TSizeaSize,
CApaMaskedBitmap &aAppBitmap
)const

Gets the nearest matching application icon for the application with the specified UID.

The function gets the icon whose size matches the specified size. If there is no exact match, then the function gets the closest smaller icon.

This function should be used in preference to the TInt GetAppIcon(TUid,TInt,CApaMaskedBitmap&); overload.

Parameters
aAppUidThe application specific UID.
aSizeThe required size of the icon.
aAppBitmapOn return, the application icon.
Return Value
KErrNone, if successful; KErrNotFound, if a matching entry could not be found, or no icon equal to or smaller than the specified size can be found; KErrNotSupported, if the application provides icons in non-MBM format; otherwise one of the other system wide error codes.

GetAppIcon ( TUid, HBufC *& )

IMPORT_C TIntGetAppIcon(TUidaAppUid,
HBufC *&aFullFileName
)const

Gets the full filename of a file containing application icons for the application with the specified UID.

An icon file can only be defined by applications providing an application registration file.

An icon file may be in any graphics format and contain one or more icons.

Parameters
aAppUidThe application specific UID.
aFullFileNameOn return, the full filename of a file containing one or more application icons. Returns a pointer to the filename and transfers ownership to the caller.
Return Value
KErrNone, if successful; KErrNotFound, if a matching application could not be found, or an icon filename was not defined; KErrNotSupported, if the application does not provide an application registration file; otherwise one of the other system wide error codes.

GetAppIcon ( TUid, RFile & )

IMPORT_C TIntGetAppIcon(TUidaAppUid,
RFile &aFile
)const

Gets an open shareable read only file handle to the application icon file for the application with the specified UID.

An icon file can only be defined by applications providing an application registration file.

An icon file may be in any graphics format and contain one or more icons.

On entering this function, aFile must be non-open. It is recommended that aFile is pushed onto the cleanup-stack (via CleanupClosePushL()) before this function is called.

See also: GetAppIcon

Parameters
aAppUidThe application specific UID.
aFileOn return, a read only open file handle to the icon file.
Return Value
KErrNone, if successful; KErrNotFound, if a matching application could not be found, or an icon filename was not defined; otherwise one of the other system wide error codes.

GetAppIconSizes ( TUid, CArrayFixFlat< TSize > & )

IMPORT_C TIntGetAppIconSizes(TUidaAppUid,
CArrayFixFlat< TSize > &aArrayToFill
)const

Gets the available icon sizes for the application with the specified UID.

Parameters
aAppUidThe application specific UID.
aArrayToFillOn return, the array contains all of the available icon sizes.
Return Value
KErrNone, if successful; KErrNotFound, if no matching application can be found; KErrNotSupported, if the application provides icons in non-MBM format; otherwise one of the other system wide error codes.

GetAppInfo ( TApaAppInfo &, TUid )

IMPORT_C TIntGetAppInfo(TApaAppInfo &aInfo,
TUidaAppUid
)const

Gets information about the application with the specified UID.

Parameters
aInfoOn return, contains the application information, if an application with the specified UID is found. If no matching application is found, then this object is not changed.
aAppUidThe application specific UID.
Return Value
KErrNone if successful; KErrNotFound if a matching entry could not be found; otherwise one of the other system wide error codes.

GetAppOwnedFiles ( CDesCArray &, TUid )

IMPORT_C TIntGetAppOwnedFiles(CDesCArray &aAppOwnedFiles,
TUidaAppUid
)const

Gets the list of file names for which the application with the specified UID claims ownership.

The list is written to a descriptor array supplied by the caller.

Note that if the function fails due to lack of memory, the array is left in an undefined state.

Parameters
aAppOwnedFilesOn return, the descriptor array contains the file names.
aAppUidThe application specific UID.
Return Value
KErrNone, if successful; KErrNotFound, if no matching application can be found; otherwise one of the other system wide error codes.

GetAppServiceOpaqueDataLC ( TUid, TUid )

IMPORT_C CApaAppServiceInfoArray *GetAppServiceOpaqueDataLC(TUidaAppUid,
TUidaServiceUid
)const

Gets the service implementation's opaque data for the specified application and service.

The specified application may provide more than one implementation of the specified service.

The returned CApaAppServiceInfoArray object contains an array of TApaAppServiceInfo objects, each of which provides information on an implementation.

For each TApaAppServiceInfo object, TApaAppServiceInfo::Uid() returns the specified service UID.

See also: CApaAppServiceInfoArray::Array() TApaAppServiceInfo

Parameters
aAppUidThe application specific UID.
aServiceUidThe service UID.
Return Value
A pointer to a CApaAppServiceInfoArray object left on the cleanup stack.
Leave Codes
KErrNotFoundNo matching application can be found, or a matching application does not implement the specified service.
KErrNotSupportedThe specified application does not provide an application registration file.
KErrNoMemoryThere is insufficient memory to perform the operation.

GetAppServicesL ( TUid, CArrayFixFlat< TUid > & )

IMPORT_C voidGetAppServicesL(TUidaAppUid,
CArrayFixFlat< TUid > &aServiceUids
)const

Gets the service UIDs implemented by the application with the specified UID.

Parameters
aAppUidThe application specific UID.
aServiceUidsOn return, contains the service UIDs implemented by the specified application UID.
Leave Codes
KErrNotFoundNo matching application can be found, or a matching application does not implement any services.
KErrNotSupportedThe specified application does not provide an application registration file.
KErrNoMemoryThere is insufficient memory to perform the operation.

GetAppServicesLC ( TUid )

IMPORT_C CApaAppServiceInfoArray *GetAppServicesLC(TUidaAppUid)const

Gets the services implemented by the application that has the specified application UID.

The returned CApaAppServiceInfoArray object contains an array of TApaAppServiceInfo objects.

Information on each service implementation is contained in a TApaAppServiceInfo object.

TApaAppServiceInfo::Uid() returns the service UID of the service implemented by the specified application UID.

See also: CApaAppServiceInfoArray::Array() TApaAppServiceInfo

Parameters
aAppUidThe application specific UID.
Return Value
A pointer to a CApaAppServiceInfoArray object left on the cleanup stack.
Leave Codes
KErrNotFoundNo matching application can be found, or a matching application does not implement any services.
KErrNotSupportedThe specified application does not provide an application registration file.
KErrNoMemoryThere is insufficient memory to perform the operation.

GetAppType ( TUid &, TUid )

IMPORT_C TIntGetAppType(TUid &aTypeUid,
TUidaAppUid
)const

Gets the application type of the application. For a native application the type is KNullUid.

Parameters
aTypeUidOn return contains the application's type
aAppUidThe application's UID passed into TIpcArgs
Return Value
A standard error code.

GetAppViewIcon ( TUid, TUid, const TSize &, CApaMaskedBitmap & )

IMPORT_C TIntGetAppViewIcon(TUidaAppUid,
TUidaViewUid,
const TSize &aSize,
CApaMaskedBitmap &aViewBitmap
)const

Gets the icon for the specified view published by the application that has the specified UID.

The icon returned is that which is closest in size to the specified size.

Parameters
aAppUidThe application specific UID.
aViewUidThe UID identifying the view.
aSizeThe requested size of the icon.
aViewBitmapOn return, the icon that is closest in size to the requested size.
Return Value
KErrNone, if successful; KErrNotFound, if no matching application nor matching view can be found; KErrNotSupported, if the application provides icons in non-MBM format; otherwise one of the other system wide error codes.

GetAppViewIcon ( TUid, TUid, HBufC *& )

IMPORT_C TIntGetAppViewIcon(TUidaAppUid,
TUidaViewUid,
HBufC *&aFullFileName
)const

Gets the full filename of a file containing view-specific icons for the application with the specified UID and view.

A file containing view-specific icons can only be defined by applications providing an application registration file.

A view icon file may be in any graphics format and contain one or more view icons.

Parameters
aAppUidThe application specific UID.
aViewUidThe UID identifying the view.
aFullFileNameOn return, the full filename of a file containing one or more view icons. Returns a pointer to the filename and transfers ownership to the caller.
Return Value
KErrNone, if successful; KErrNotFound, if no matching application nor matching view could be found, or a view icon filename was not defined; KErrNotSupported, if the application does not provide an application registration file; otherwise one of the other system wide error codes.

GetAppViews ( CApaAppViewArray &, TUid )

IMPORT_C TIntGetAppViews(CApaAppViewArray &aAppViews,
TUidaAppUid
)const

Gets the views published by the application that has the specified UID.

Information on each view is contained in a TApaAppViewInfo object, and this set of objects is put into the array supplied by the caller.

See also: TApaAppViewInfo

Parameters
aAppViewsOn return, the array contains information on all of the views published by the specified application.
aAppUidThe application specific UID.
Return Value
KErrNone, if successful; KErrNotFound, if no matching application can be found; otherwise one of the other system wide error codes.

GetDefaultScreenNumber ( TInt &, TUid )

IMPORT_C TIntGetDefaultScreenNumber(TInt &aDefaultScreenNumber,
TUidaAppUid
)const

Gets the default screen-number of the application with the specified UID.

Parameters
aDefaultScreenNumberOn return, contains the default screen-number, if an application with the specified UID is found. If no matching application is found, then this object is not changed.
aAppUidThe application specific UID.
Return Value
KErrNone if successful; KErrNotFound if a matching entry could not be found; otherwise one of the other system wide error codes.

GetEmbeddableApps ( )

IMPORT_C TIntGetEmbeddableApps()const

Initialises the process of getting all embeddable applications from the cached list.

Control panel applications are excluded.

A call to this function is followed by subsequent and repeated calls to GetNextApp() to retrieve embeddable applications in the cached list.

Only applications which specify KAppEmbeddable or KAppEmbeddableOnly in their application information file will be returned by subsequent calls to GetNextApp().

Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

GetEmbeddableApps ( TInt )

IMPORT_C TIntGetEmbeddableApps(TIntaScreenMode)const

Initialises the process of getting embeddable applications from the cached list that support the specified screen mode.

Control panel applications are excluded.

A call to this function is followed by subsequent and repeated calls to GetNextApp() to retrieve embeddable applications in the cached list.

Only applications which specify KAppEmbeddable or KAppEmbeddableOnly in their application information file will be returned by subsequent calls to GetNextApp().

Parameters
aScreenModeOnly embeddable applications which define a view supporting aScreenMode will be returned by subsequent calls to GetNextApp(). If an application does not define views in it's application information file, only screen mode 0 is supported.
Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

GetFilteredApps ( const TApaEmbeddabilityFilter & )

IMPORT_C TIntGetFilteredApps(const TApaEmbeddabilityFilter &aFilter)const

Initialises the process of getting all applications matching aFilter in the cached list.

Control panel applications are excluded.

A call to this function is followed by subsequent and repeated calls to GetNextApp() to retrieve all applications matching aFilter in the cached list.

Parameters
aFilterDefines the filter to be applied to the cached list.
Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

GetFilteredApps ( const TApaEmbeddabilityFilter &, TInt )

IMPORT_C TIntGetFilteredApps(const TApaEmbeddabilityFilter &aFilter,
TIntaScreenMode
)const

Initialises the process of getting all applications matching aFilter in the cached list.

Control panel applications are excluded.

A call to this function is followed by subsequent and repeated calls to GetNextApp() to retrieve all applications matching aFilter in the cached list.

Parameters
aFilterDefines the filter to be applied to the cached list.
aScreenModeOnly applications which define a view supporting aScreenMode will be returned by subsequent calls to GetNextApp(). If an application does not define views in it's application information file, only screen mode 0 is supported.
Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

GetFilteredApps ( TUint, TUint )

IMPORT_C TIntGetFilteredApps(TUintaCapabilityAttributeMask,
TUintaCapabilityAttributeValue
)const

Initialises the process of getting all applications matching the specified application attributes.

A call to this function is followed by subsequent and repeated calls to GetNextApp() to retrieve all applications matching the filter in the cached list.

Attributes are defined by TApaAppCapability::TCapabilityAttribute

See also: TCapabilityAttribute

Parameters
aCapabilityAttributeMaskSpecifies the attributes whose values will be used to filter the cached list. If the mask specifies more than one attribute, all associated attribute values must match.
aCapabilityAttributeValueSpecifies the attribute values for each attribute identified by the mask.
Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

GetFilteredApps ( TUint, TUint, TInt )

IMPORT_C TIntGetFilteredApps(TUintaCapabilityAttributeMask,
TUintaCapabilityAttributeValue,
TIntaScreenMode
)const

Initialises the process of getting all applications matching the specified application attributes.

A call to this function is followed by subsequent and repeated calls to GetNextApp() to retrieve all applications matching the filter in the cached list.

Attributes are defined by TApaAppCapability::TCapabilityAttribute

See also: TCapabilityAttribute

Parameters
aCapabilityAttributeMaskSpecifies the attributes whose values will be used to filter the cached list. If the mask specifies more than one attribute, all associated attribute values must match.
aCapabilityAttributeValueSpecifies the attribute values for each attribute identified by the mask.
aScreenModeOnly applications which define a view supporting aScreenMode will be returned by subsequent calls to GetNextApp(). If an application does not define views in it's application information file, only screen mode 0 is supported.
Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

GetMaxDataBufSize ( TInt & )

IMPORT_C TIntGetMaxDataBufSize(TInt &aBufSize)const

Gets the maximum size of the data that can be read from a file for the purpose of recognizing the data type.

To determine the size of buffer to pass to the 3-parameter overload of RecognizeData() or to the 4-parameter overload of RecognizeSpecificData(), use GetPreferredBufSize() rather than this function.

See also: SetMaxDataBufSize() GetPreferredBufSize()

Parameters
aBufSizeOn return, contains the maximum size.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

GetNextApp ( TApaAppInfo & )

IMPORT_C TIntGetNextApp(TApaAppInfo &aInfo)const

Gets information about the next application or embeddable application from the cached list.

A sequence of calls to this function must always be preceded by a call to one of GetAllApps(), GetEmbeddableApps() or GetFilteredApps().

Parameters
aInfoOn return, contains application information.
Return Value
KErrNone if successful; ENoMoreAppsInList, if there are no more applications in the list; EAppListInvalid if the server's initial population of the list has not completed; otherwise one of the other system wide error codes.

GetNextApp ( TApaAppInfo &, TInt )

IMPORT_C TIntGetNextApp(TApaAppInfo &aInfo,
TIntaScreenMode
)const

Gets information about the next application or embeddable application from the cached list.

A sequence of calls to this function must always be preceded by a call to one of GetAllApps(), GetEmbeddableApps() or GetFilteredApps().

Parameters
aInfoOn return, contains application information.
aScreenModeThis parameter is ignored.
Return Value
KErrNone if successful; ENoMoreAppsInList, if there are no more applications in the list; EAppListInvalid if the server's initial population of the list has not completed; otherwise one of the other system wide error codes.

GetPreferredBufSize ( TInt & )

IMPORT_C TIntGetPreferredBufSize(TInt &aPreferredBufSize)const

Gets the preferred number of bytes of data to read from a file for the purpose of recognizing the data type.

This should be used to determine the size of buffer to pass to the 3-parameter overload of RecognizeData() or to the 4-parameter overload of RecognizeSpecificData().

See also: GetMaxDataBufSize()

Parameters
aPreferredBufSizeOn return, contains either the largest buffer size required by any of the currently installed data-recognizers, or the value that would be returned by GetMaxDataBufSize(), whichever is less.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

GetServerApps ( TUid )

IMPORT_C TIntGetServerApps(TUidaServiceUid)const

Initialises the process of getting server applications in the cached list.

Control panel applications are excluded.

A call to this function is followed by subsequent and repeated calls to GetNextApp() to retrieve server applications in the cached list.

Only applications which specify one or more services in their application information file will be returned by subsequent calls to GetNextApp().

Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

GetServerApps ( TUid, TInt )

IMPORT_C TIntGetServerApps(TUidaServiceUid,
TIntaScreenMode
)const

Initialises the process of getting server applications in the cached list.

Control panel applications are excluded.

A call to this function is followed by subsequent and repeated calls to GetNextApp() to retrieve server applications in the cached list.

Only applications which specify one or more services in their application information file will be returned by subsequent calls to GetNextApp().

Parameters
aScreenModeOnly server applications which define a view supporting aScreenMode will be returned by subsequent calls to GetNextApp(). If an application does not define views in its application information file, only screen mode 0 is supported.
Return Value
KErrNone, if successful, otherwise one of the system-wide error codes.

GetServiceImplementationsLC ( TUid )

IMPORT_C CApaAppServiceInfoArray *GetServiceImplementationsLC(TUidaServiceUid)const

Gets the service implementations for the specified service UID.

The returned CApaAppServiceInfoArray object contains an array of TApaAppServiceInfo objects.

Information on each implementation is contained in a TApaAppServiceInfo object.

TApaAppServiceInfo::Uid() returns the UID of the application that implements the specified service UID.

See also: CApaAppServiceInfoArray::Array() TApaAppServiceInfo

Parameters
aServiceUidThe service UID.
Return Value
A pointer to a CApaAppServiceInfoArray object left on the cleanup stack.
Leave Codes
KErrNotFoundNo service implementations for the specified service UID can be found.
EAppListInvalidThe server's initial population of the list has not completed.
KErrNoMemoryThere is insufficient memory to perform the operation.

GetServiceImplementationsLC ( TUid, const TDataType & )

IMPORT_C CApaAppServiceInfoArray *GetServiceImplementationsLC(TUidaServiceUid,
const TDataType &aDataType
)const

Gets the service implementations for the specified service UID. The implementation must also be able to handle the data type given as argument.

The returned CApaAppServiceInfoArray object contains an array of TApaAppServiceInfo objects.

Information on each implementation is contained in a TApaAppServiceInfo object.

TApaAppServiceInfo::Uid() returns the UID of the application that implements the specified service UID.

See also: CApaAppServiceInfoArray::Array() TApaAppServiceInfo

Parameters
aServiceUidThe service UID.
aDataTypeThe data type that must be supported by the implementation.
Return Value
A pointer to a CApaAppServiceInfoArray object left on the cleanup stack.
Leave Codes
KErrNotFoundNo service implementations for the specified service UID can be found.
EAppListInvalidThe server's initial population of the list has not completed.
KErrNoMemoryThere is insufficient memory to perform the operation.

GetSupportedDataTypesL ( CDataTypeArray & )

IMPORT_C TIntGetSupportedDataTypesL(CDataTypeArray &aDataTypes)const

Gets a list of recognized data(MIME) types by all recognizers.

Parameters
aDataTypesThe array of data (MIME) types.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

InsertDataMapping ( const TDataType &, TDataTypePriority, TUid )

IMPORT_C TIntInsertDataMapping(const TDataType &aDataType,
TDataTypePriorityaPriority,
TUidaUid
)

Changes an existing data type mapping, or adds a new one.

If the data type is not currently mapped, a new mapping is added. If the data type is mapped, its mapping is replaced.

Parameters
aDataTypeA new or existing data type.
aPriorityThe priority with which the application handles the data type.
aUidThe UID of the application to associate with the data type.
Return Value
KErrNone on success, or a system-wide error code.
Capability
WriteDeviceDataPrevent addition of data type mappings by malicious programs.

InsertDataMapping ( const TDataType &, TDataTypePriority, TUid, TUid )

IMPORT_C TIntInsertDataMapping(const TDataType &aDataType,
TDataTypePriorityaPriority,
TUidaUid,
TUidaServiceUid
)

Changes an existing data type mapping, or adds a new one.

If the data type is not currently mapped, a new mapping is added. If the data type is mapped, its mapping is replaced.

Parameters
aDataTypeA new or existing data type.
aPriorityThe priority with which the application handles the data type.
aUidThe UID of the application to associate with the data type.
aServiceUidThe UID of the service.
Return Value
KErrNone on success, or a system-wide error code.
Capability
WriteDeviceDataPrevent addition of data type mappings by malicious programs.

InsertDataMappingIfHigher ( const TDataType &, TDataTypePriority, TUid, TBool & )

IMPORT_C TIntInsertDataMappingIfHigher(const TDataType &aDataType,
TDataTypePriorityaPriority,
TUidaUid,
TBool &aInserted
)

Changes an existing data type mapping, or adds a new one. If the data type is not currently mapped, it is added. If the data type is mapped with a priority lower than aPriority, the new mapping replaces the existing one. Otherwise, no change is made.

Parameters
aDataTypeA new or existing data type.
aPriorityThe priority with which the application handles the data type.
aUidThe UID of the application to associate with the data type.
aInsertedNon-zero if the new mapping was added or an existing mapping replaced, zero otherwise.
Return Value
KErrNone on success, or a system-wide error code.
Capability
WriteDeviceDataPrevent addition of data type mappings by malicious programs.

InstalledApps ( const RPointerArray< TDesC > & )

IMPORT_C TIntInstalledApps(const RPointerArray< TDesC > &aRegFiles)

This function is only for use by Software Install.

Installers can provide modified applications registration resource files, so that apparc can mark those applications as changed by adding into the central repository.

Parameters
aRegFilesThe List of application registration resource files.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

IsAppChanged ( const TUid, TBool & )

IMPORT_C TIntIsAppChanged(const TUidaUid,
TBool &aAppChanged
)

Provides application change status i.e., wheather the app is present in the central repository or not.

Parameters
aUidUID of the application.
aAppChangedOn return, true, if the application is changed; false, otherwise.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

IsProgram ( const TDesC &, TBool & )

IMPORT_C TIntIsProgram(const TDesC &aFileName,
TBool &aProgram
)const

Tests whether the file is a native executable (DLL or EXE).

Parameters
aFileNameThe name of the file containing the data.
aProgramOn return, true, if the file contains application code; false, otherwise.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

MatchesSecurityPolicy ( TBool &, TUid, const TSecurityPolicy & )

IMPORT_C TIntMatchesSecurityPolicy(TBool &aMatches,
TUidaAppUid,
const TSecurityPolicy &aSecurityPolicy
)const

Tests whether the given TSecurityPolicy matches with the application TSecurityPolicy.

See also: TSecurityPolicy

Parameters
aMatchesOn return, contains the result. ETrue if the application TSecurityPolicy matches the given TSecurityPolicy or else EFalse
aAppUidUid of the application for which the security policy has to be matched
aSecurityPolicyTSecurityPolicy to test whether the application with given uid matches with its TSecurityPolicy or not.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

NotifyOnDataMappingChange ( TRequestStatus & )

IMPORT_C voidNotifyOnDataMappingChange(TRequestStatus &aRequestStatus)

Notification of changes in data-type mapping

This asynchronous function (whose corresponding "cancel" operation is CancelNotifyOnDataTypeMappingChange) completes when any data-type / application-UID association changes, i.e. when the default application handling a particular MIME-type changes.

See also: CancelNotifyOnDataTypeMappingChange

Parameters
aRequestStatusAs is normal for an asynchronous operation, this object is set to something other than KRequestPending when the asynchronous operation that has been triggered by this function completes.

NumberOfOwnDefinedIcons ( TUid, TInt & )

IMPORT_C TIntNumberOfOwnDefinedIcons(TUidaAppUid,
TInt &aCount
)const

Gets the number of icons defined by the app that has the specified UID

Applications that don't define icons in their application information file will return an aCount value of zero when this function is called.

Parameters
aAppUidThe application specific UID
aCountOn return, contains the number of icons defined by the application
Return Value
KErrNone, if successful; KErrNotFound, if a matching application could not be found; KErrNotSupported, if the application provides icons in non-MBM format; otherwise one of the other system-wide error codes.

PrepareNonNativeApplicationsUpdatesL ( )

IMPORT_C voidPrepareNonNativeApplicationsUpdatesL()

RecognizeData ( const TDesC8 &, TDataRecognitionResult & )

IMPORT_C TIntRecognizeData(const TDesC8 &aBuffer,
TDataRecognitionResult &aDataType
)const

Gets the data (MIME) type of data passed by buffer.

See also: RApaLsSession::GetPreferredBufSize()

Parameters
aBufferA buffer containing data; Provide preferred size of buffer. If MIME type could not be recognized using this buffer, provide a buffer of larger size.
aDataTypeOn return, contains the result of the attempt to recognize data.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

RecognizeData ( const TDesC &, const TDesC8 &, TDataRecognitionResult & )

IMPORT_C TIntRecognizeData(const TDesC &aName,
const TDesC8 &aBuffer,
TDataRecognitionResult &aDataType
)const

Gets the data (MIME) type for data taken from a file with a specified name.

See also: RApaLsSession::GetPreferredBufSize()

Parameters
aNameThe full filename, including drive and path, of the file containing the data.
aBufferA buffer containing data taken from the specified file; Provide preferred size of buffer from beginning of the file. If MIME type could not be recognized using this buffer, provide a buffer of larger size.
aDataTypeOn return, contains the result of the attempt to recognize data.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

RecognizeData ( const RFile &, TDataRecognitionResult & )

IMPORT_C TIntRecognizeData(const RFile &aFile,
TDataRecognitionResult &aDataType
)const

Gets the data (MIME) type for data in a file passed by handle.

Parameters
aFileThe file containing the data. Before this function can be called, the file server session which owns this file handle must first be marked as shareable by calling RFs::ShareProtected().
aDataTypeOn return, contains the result of the attempt to recognize data.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

RecognizeFilesL ( const TDesC &, CDataRecognitionResultArray & )

IMPORT_C TIntRecognizeFilesL(const TDesC &aPath,
CDataRecognitionResultArray &aResult
)const

Gets the data (MIME) type for files in a specified directory. Because this call may take a long time to complete, the asynchronous version is strongly recommended. Furthermore, it is not possible to use this synchronous function while an asynchronous request is still active.

Parameters
aPathA valid path. Note that the path must end with a backslash.
aResultIf the call was successful, this parameter contains the recognition result.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

RecognizeFilesL ( const TDesC &, CDataRecognitionResultArray &, TRequestStatus & )

IMPORT_C voidRecognizeFilesL(const TDesC &aPath,
CDataRecognitionResultArray &aResult,
TRequestStatus &aStatus
)

Gets the data (MIME) type for files in a specified directory.

Parameters
aPathA valid path. Note that the path must end with a backslash.
aResultIf the call was successful, this parameter contains the recognition result.
aStatusA request status object.

RecognizeFilesL ( const TDesC &, const TDesC8 &, CDataRecognitionResultArray & )

IMPORT_C TIntRecognizeFilesL(const TDesC &aPath,
const TDesC8 &aDataType,
CDataRecognitionResultArray &aResult
)const

Gets the data (MIME) type for files in a specified directory. Because this call may take a long time to complete, the asynchronous version is strongly recommended. Furthermore, it is not possible to use this synchronous function while an asynchronous request is still active.

Parameters
aPathA valid path. Note that the path must end with a backslash.
aDataTypeA data type filter. Wildcards are allowed. For example, "text*" would also add "text/plain" data types to the result.
aResultIf the call was successful, this parameter contains the recognition result.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

RecognizeFilesL ( const TDesC &, const TDesC8 &, CDataRecognitionResultArray &, TRequestStatus & )

IMPORT_C voidRecognizeFilesL(const TDesC &aPath,
const TDesC8 &aDataType,
CDataRecognitionResultArray &aResult,
TRequestStatus &aStatus
)

Gets the data (MIME) type for files in a specified directory.

Parameters
aPathA valid path. Note that the path must end with a backslash.
aDataTypeA data type filter. Wildcards are allowed. For example, "text*" would also add "text/plain" data types to the result.
aResultIf the call was successful, this parameter contains the recognition result.
aStatusA request status object

RecognizeSpecificData ( const TDesC &, const TDesC8 &, const TDataType &, TBool & )

IMPORT_C TIntRecognizeSpecificData(const TDesC &aName,
const TDesC8 &aBuffer,
const TDataType &aDataType,
TBool &aResult
)const

Tests whether data taken from a named file has the specified data (MIME) type.

See also: RApaLsSession::GetPreferredBufSize()

Parameters
aNameThe name of the file containing the data.
aBufferA buffer containing data taken from the specified file; Provide preferred size of buffer from beginning of the file. If MIME type could not be recognized using this buffer, provide a buffer of larger size.
aDataTypeThe data (MIME) type.
aResultOn return, contains the result of the test.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

RecognizeSpecificData ( const RFile &, const TDataType &, TBool & )

IMPORT_C TIntRecognizeSpecificData(const RFile &aFile,
const TDataType &aDataType,
TBool &aResult
)const

Tests whether data taken from a file passed by handle has the specified data (MIME) type.

Parameters
aFileThe file containing the data. Before this function can be called, the file server session which owns this file handle must first be marked as shareable by calling RFs::ShareProtected().
aDataTypeThe data (MIME) type.
aResultOn return, contains the result of the test.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

RegisterListPopulationCompleteObserver ( TRequestStatus & )

IMPORT_C voidRegisterListPopulationCompleteObserver(TRequestStatus &aStatus)const

Registers an observer with apparc server to notify when the initial population of applist is completed

See also: CancelListPopulationCompleteObserver()

Parameters
aStatusRequest status object. On successful completion contains KErrNone, otherwise one of the system-wide error codes.

RegisterNonNativeApplicationL ( TUid, const TDriveUnit &, CApaRegistrationResourceFileWriter &, CApaLocalisableResourceFileWriter *, const RFile * )

IMPORT_C voidRegisterNonNativeApplicationL(TUidaApplicationType,
const TDriveUnit &aDrive,
CApaRegistrationResourceFileWriter &aRegistrationResourceFile,
CApaLocalisableResourceFileWriter *aLocalisableResourceFile,
const RFile *aIconFile
)

RegisterNonNativeApplicationTypeL ( TUid, const TDesC & )

IMPORT_C voidRegisterNonNativeApplicationTypeL(TUidaApplicationType,
const TDesC &aNativeExecutable
)

RollbackNonNativeApplicationsUpdates ( )

IMPORT_C TIntRollbackNonNativeApplicationsUpdates()

Rolls back all changes made to the list of installed non-native applications since the last call to PrepareNonNativeApplicationsUpdatesL().

This function can be called even if PrepareNonNativeApplicationsUpdatesL() hasn't been called before (in which case it does nothing).

SetAcceptedConfidence ( TInt )

IMPORT_C TIntSetAcceptedConfidence(TIntaConfidence)

Sets the confidence threshold for successful data recognition.

This is the minimum acceptable confidence level that must be reported by a data recognizer for data to be accepted as of a given type.

Parameters
aConfidenceThe confidence threshold. Although this is an integer value, data recognizers use the discrete values defined by the CApaDataRecognizerType::TRecognitionConfidence enumeration.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.
Capability
WriteDeviceData

SetAppShortCaption ( const TDesC &, TLanguage, TUid )

IMPORT_C TIntSetAppShortCaption(const TDesC &aShortCaption,
TLanguageaLanguage,
TUidaAppUid
)

Sets the short caption of the application.

Overrides the short caption specified in the localizable resource file for this application. Short captions set using this API will only take effect until the next device reset.

Parameters
aShortCaptionThe short caption of the application. The maximum length allowed is KApaMaxAppCaption.
aLanguageThe language corresponding to the caption. If this is ELangNone the caption is used for all languages for which a language specific short caption has not been set.
aAppUidThe uid of the application.
Return Value
KErrNone if successful, otherwise one of the system wide error codes.

SetFsSessionL ( RFs & )

IMPORT_C voidSetFsSessionL(RFs &aFsSession)[static]

SetMaxDataBufSize ( TInt )

IMPORT_C TIntSetMaxDataBufSize(TIntaBufSize)

Sets the maximum size of the data that can be read from a file for the purpose of recognizing the data type.

The value is not used when the client explicitly supplies a buffer, for example in calls to RecognizeData() and RecognizeSpecificData(), but is used in the implementation of functions such as StartDocument() and CreateDocument().

Unless explicitly set, a default value of KApaAppListServMaxBuffer is used.

See also: CreateDocument() StartDocument() RecognizeData() RecognizeSpecificData()

Parameters
aBufSizeThe maximum size of data to be read.
Return Value
KErrNone, if successful; otherwise one of the other system-wide error codes.

SetNotify ( TBool, TRequestStatus & )

IMPORT_C voidSetNotify(TBoolaCompleteImmediatelyIfNoScanImpendingOrInProgress,
TRequestStatus &aStatus
)

StartApp ( const CApaCommandLine & )

IMPORT_C TIntStartApp(const CApaCommandLine &aCommandLine)

Starts an application defined by the specified command line information. This is an asynchronous method which doesn't wait for the process creation to complete. To be informed of the process creation success, then appropriate overloaded method taking a TRequestStatus parameter should be used.

This is only recommended for non document based applications.

View based applications are usually started by activating a specific view using CCoeAppUi::ActivateViewL. Alternatively, using StartApp() to start a view based application will activate the application's default view.

See also: CCoeAppUi::ActivateViewL()

Parameters
aCommandLineThe command line.
Return Value
KErrNone, if successful; KErrNotFound, if the application cannot be found; KErrPermissionDenied, if application is in the blacklisted list; otherwise one of the other system-wide error codes.

StartApp ( const CApaCommandLine &, TThreadId & )

IMPORT_C TIntStartApp(const CApaCommandLine &aCommandLine,
TThreadId &aThreadId
)

Starts an application defined by the specified command line information. This is an asynchronous method which doesn't wait for the process creation to complete. To be informed of the process creation success, then appropriate overloaded method taking a TRequestStatus parameter should be used.

This is only recommended for non document based applications.

View based applications are usually started by activating a specific view using CCoeAppUi::ActivateViewL. Alternatively, using StartApp() to start a view based application will activate the application's default view.

See also: CCoeAppUi::ActivateViewL()

Parameters
aCommandLineThe command line.
aThreadIdOn return, the id of the main thread started.
Return Value
KErrNone, if successful; KErrNotFound, if the application cannot be found; KErrPermissionDenied, if application is in the blacklisted list; otherwise one of the other system-wide error codes.

StartApp ( const CApaCommandLine &, TThreadId &, TRequestStatus * )

IMPORT_C TIntStartApp(const CApaCommandLine &aCommandLine,
TThreadId &aThreadId,
TRequestStatus *aRequestStatusForRendezvous
)

Starts an application defined by the specified command line information.

This is only recommended for non document based applications.

View based applications are usually started by activating a specific view using CCoeAppUi::ActivateViewL. Alternatively, using StartApp() to start a view based application will activate the application's default view.

See also: CCoeAppUi::ActivateViewL()

Parameters
aCommandLineThe command line.
aThreadIdOn return, the id of the main thread started.
aRequestStatusForRendezvousIf not NULL, the asynchronous RProcess::Rendezvous() function is called (being passed this TRequestStatus object) before RProcess::Resume() is called on the new application process. If this function does not return KErrNone, RProcess::Rendezvous() will not be called passing aRequestStatusForRendezvous, so in this case the caller must not wait on aRequestStatusForRendezvous.
Return Value
KErrNone, if successful; KErrNotFound, if the application cannot be found; KErrPermissionDenied, if application is in the blacklisted list; otherwise one of the other system-wide error codes.

StartDocument ( const TDesC &, TThreadId &, TLaunchType )

IMPORT_C TIntStartDocument(const TDesC &aDocFileName,
TThreadId &aThreadId,
TLaunchTypeaUnused = ELaunchNewApp
)

Finds and launches an application to handle the document contained in the specified file.

Parameters
aDocFileNameThe document name.
aThreadIdOn return, the id of the main thread started.
Return Value
KErrNone, if successful; EAppListInvalid, if the server's initial population of the list has not completed; KErrNotFound, if a matching entry could not be found; KErrPermissionDenied, if atleast there is a suitable application but that application is in the blacklisted list; otherwise one of the other system-wide error codes.

StartDocument ( const TDesC &, const TDataType &, TThreadId &, TLaunchType )

IMPORT_C TIntStartDocument(const TDesC &aDocFileName,
const TDataType &aDataType,
TThreadId &aThreadId,
TLaunchTypeaUnused = ELaunchNewApp
)

Launches an application that can handle the specified data (MIME) type.

The application handles the document contained in the specified file.

Parameters
aDocFileNameThe document name.
aDataTypeThe data (MIME) type.
aThreadIdOn return, the id of the main thread started.
Return Value
KErrNone, if successful; EAppListInvalid if the server's initial population of the list has not completed; KErrNotFound, if no suitable application can be found;KErrPermissionDenied, if atleast there is a suitable application but that application is in the blacklisted list; otherwise one of the other system-wide error codes.

StartDocument ( const TDesC &, TUid, TThreadId &, TLaunchType )

IMPORT_C TIntStartDocument(const TDesC &aDocFileName,
TUidaAppUid,
TThreadId &aThreadId,
TLaunchTypeaUnused = ELaunchNewApp
)

Launches the application identified by the specified UID.

The application handles the document contained in the specified file.

Parameters
aDocFileNameThe document name.
aAppUidThe application specific UID.
aThreadIdOn return, the id of the main thread started.
Return Value
KErrNone, if successful; EAppListInvalid if the server's initial population of the list has not completed; KErrNotFound, if no suitable application can be found; KErrPermissionDenied, if atleast there is a suitable application but that application is in the blacklisted list; otherwise one of the other system-wide error codes.

StartDocument ( RFile &, TThreadId &, TRequestStatus * )

IMPORT_C TIntStartDocument(RFile &aDocFile,
TThreadId &aThreadId,
TRequestStatus *aRequestStatusForRendezvous = NULL
)

Finds and launches an application to handle the document contained in the specified file

Parameters
aThreadIdOn return, the id of the main thread started.
aRequestStatusForRendezvousIf not NULL, the asynchronous RProcess::Rendezvous() function is called (being passed this TRequestStatus object) before RProcess::Resume() is called on the new application process.
Return Value
KErrNone, if successful; KErrNotFound, if no suitable application can be found; KErrPermissionDenied, if atleast there is a suitable application but that application is in the blacklisted list; otherwise one of the other system-wide error codes.

StartDocument ( RFile &, const TDataType &, TThreadId &, TRequestStatus * )

IMPORT_C TIntStartDocument(RFile &aDocFile,
const TDataType &aDataType,
TThreadId &aThreadId,
TRequestStatus *aRequestStatusForRendezvous = NULL
)

Finds and launches an application to handle the document contained in the specified file

Parameters
aDocFileThe file handle.
aDataTypeThe data (MIME) type.
aThreadIdOn return, the id of the main thread started.
aRequestStatusForRendezvousIf not NULL, the asynchronous RProcess::Rendezvous() function is called (being passed this TRequestStatus object) before RProcess::Resume() is called on the new application process.
Return Value
KErrNone, if successful; KErrNotFound, if no suitable application can be found;KErrPermissionDenied, if atleast there is a suitable application but that application is in the blacklisted list; otherwise one of the other system-wide error codes.

StartDocument ( RFile &, TUid, TThreadId &, TRequestStatus * )

IMPORT_C TIntStartDocument(RFile &aDocFile,
TUidaAppUid,
TThreadId &aThreadId,
TRequestStatus *aRequestStatusForRendezvous = NULL
)

Finds and launches an application to handle the document contained in the specified file

Parameters
aDocFileThe file handle.
aAppUidThe application specific UID.
aThreadIdOn return, the id of the main thread started.
aRequestStatusForRendezvousIf not NULL, the asynchronous RProcess::Rendezvous() function is called (being passed this TRequestStatus object) before RProcess::Resume() is called on the new application process.
Return Value
KErrNone, if successful; KErrNotFound, if no suitable application can be found; KErrPermissionDenied, if atleast there is a suitable application but that application is in the blacklisted list; otherwise one of the other system-wide error codes.

Version ( )

IMPORT_C TVersionVersion()const

Gets the version of the application architecture server.

Return Value
The version number.