CDefaultAppClient Class Reference
class CDefaultAppClient : public CBase
|
Client API for setting the default application.
This class defines the API that applications should use to trigger the launch of the Default Application Server, that asks the user to select default applications for those Service & MIME pairs for which the client application is a candidate.
A client application should first instantiate the service, using eithe
NewL()
or
NewLC()
The client application can check first if the sercive is available in the system (by using the
ServiceAvailable()
function. The client application may also check if there is anything to display (if there is any Service & MIME that the client application supports for which there is at least another application supporting the pair). If there is no such pair, then launching the server would display an empty list). This checking is performed using the
PairsToDisplayL()
function.
After the above checkings are done, the client application can ask the server to change defaults by calling the
ChangeDefaultsL()
function.
defaultappclient.dll
-
Since
-
S60 v5.0
Constructor & Destructor Documentation
CDefaultAppClient()
CDefaultAppClient
|
(
|
)
|
[private]
|
~CDefaultAppClient()
IMPORT_C
|
~CDefaultAppClient
|
(
|
)
|
[virtual]
|
Member Functions Documentation
ChangeDefaultsL(TInt)
IMPORT_C void
|
ChangeDefaultsL
|
(
|
TInt
|
aFlags = 0
|
)
|
|
This function launches the server, as a chained application. The client application will not be available to the user until the server does not exit. When the server exits, the client application gains control again. The observer (if specified during instantiation (NewL) is notified that the server has exited.
Parameters
TInt
aFlags = 0
|
service flags
|
ConstructL(MAknServerAppExitObserver *)
GetServiceParamsL(TUid *)
void
|
GetServiceParamsL
|
(
|
TUid
*
|
aServerAppUid
|
)
|
[private, static]
|
This function finds out the uid of the Default Application Server (the application registered to handle the DefaultApp service)
Parameters
TUid
* aServerAppUid
|
If parameter is non-NULL, it returns the Uid of the server there
|
NewL(MAknServerAppExitObserver *)
Symbian OS two-phased constructor
NewLC(MAknServerAppExitObserver *)
Symbian OS two-phased constructor
PairsToDisplayL()
IMPORT_C
TInt
|
PairsToDisplayL
|
(
|
)
|
|
Function to check the number of Service & MIME pairs the server would display if the
ChangeDefaultsL()
would be called. The purpose of this function is to allow the client application not to display an entry for starting the server, in the Options menu, in case the Server's list of Service & MIME pairs is empty.
Please note that the function may return a higher number than the actual number of pairs, because it does not check for MIMEs with System priority (that would not be displayed).
ServiceAvailable(TInt &)
IMPORT_C
TBool
|
ServiceAvailable
|
(
|
TInt
&
|
aErrorCode
|
)
|
[static]
|
Function to check if a server is present in the system. If the server is present, the subsequent functions should not fail due to server unavailability.
Member Enumerations Documentation
Enum TFlags
flags used to modify the service behaviour
Enumerators
EFlagNoObserver = 1
|
|
EFlagReserved1 = 2
|
|
EFlagReserved2 = 4
|
|
Member Data Documentation
CApaServerAppExitMonitor * iMonitor
Monitor object that calls the iObserver when the server has exited. Owned.
MAknServerAppExitObserver * iObserver
Pointer to the Observer to call after the operation initiated by ChangeDefaultsAsyncL() has finished. Not Owned.
TUid
iServerAppUid
TUid
|
iServerAppUid
|
[private]
|
The UID of the server application (we discover the server)
RDefaultAppService * iService
Pointer to the service class. Own.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.