CMnServiceBase Class Reference
class CMnServiceBase : public CAknAppServiceBase
|
Its only purpose is to provide common base functionality for Map and Navigation service classes.
There are both synchronous and asynchronous request handlers defined in derived service base classes. Implementations of handlers shall behave as follows.
-
For Synchronous requests:
-
For Asynchronous requests:
-
Exit normally as soon as possible. Call dedicated Complete method to report successful completion
-
Leave with error code to report error found during execution of Handle method
-
Call CompleteRequest method with error code to report error found after execution of Handle method
-
Call CancelRequest method to report that user has cancelled execution
Following error codes shall be used by implementation to report specific cases:
-
KErrCancel - If user has cancelled operation.
-
KErrArgument - If given argument cannot be used for operation. For example, landmark has no coordinate or address and cannot be shown on map or address information is not sufficient for geocoding.
-
KErrNotSupported - If service feature is not supported, or cannot be executed with given parameters. For example, map content not available for specified area etc.
-
Since
-
3.1 mnservicelib.lib
Constructor & Destructor Documentation
CMnServiceBase()
CMnServiceBase
|
(
|
)
|
[protected]
|
~CMnServiceBase()
~CMnServiceBase
|
(
|
)
|
[protected]
|
Member Functions Documentation
BaseConstructL()
void
|
BaseConstructL
|
(
|
)
|
[protected]
|
Complete(const RMessage2 &, TInt)
void
|
Complete
|
(
|
const
RMessage2
&
|
aMsg,
|
|
TInt
|
aResult
|
|
)
|
[protected]
|
CompleteRequest(TInt)
IMPORT_C void
|
CompleteRequest
|
(
|
TInt
|
aResult
|
)
|
|
Called by implementations to complete client's request. Used by service implementations to report errors during execution of asynchronous requests. To report successful completion, special methods defined by service base classes should be used (e.g.
CMnMapViewServiceBase::CompleteSelectionRequest
)
For synchronous requests, handler should just leave if error is detected.
-
panic
-
"MnPanicServer"-KMnPanicAttemptToCompleteNoRequest This method called during execution of synchronous request.
CopyClientBuffer8LC(const RMessage2 &, const TInt)
HBufC8
*
|
CopyClientBuffer8LC
|
(
|
const
RMessage2
&
|
aMessage,
|
|
const
TInt
|
aClientBufferParam
|
|
)
|
[protected, static]
|
CopyClientBufferLC(const RMessage2 &, const TInt)
HBufC
*
|
CopyClientBufferLC
|
(
|
const
RMessage2
&
|
aMessage,
|
|
const
TInt
|
aClientBufferParam
|
|
)
|
[protected, static]
|
CurrentAsyncRequest()
TInt
|
CurrentAsyncRequest
|
(
|
)
|
[protected]
|
DoCancel()
void
|
DoCancel
|
(
|
)
|
[protected, pure virtual]
|
Called by framework to report that request was cancelled by client application. Service implementations must implement this method. It is not needed to call
CompleteRequest()
in this case.
HandleCancelRequestL(const RMessage2 &)
void
|
HandleCancelRequestL
|
(
|
const
RMessage2
&
|
aMsg
|
)
|
[protected]
|
IsAsyncRequestActive()
TBool
|
IsAsyncRequestActive
|
(
|
)
|
[protected]
|
PrepareAsyncRequestL(const RMessage2 &)
void
|
PrepareAsyncRequestL
|
(
|
const
RMessage2
&
|
aMessage
|
)
|
[protected]
|
ServiceError(const RMessage2 &, TInt)
IMPORT_C void
|
ServiceError
|
(
|
const
RMessage2
&
|
aMessage,
|
|
TInt
|
aError
|
|
)
|
[protected, virtual]
|
Parameters
const
RMessage2
& aMessage
|
The client message.
|
TInt
aError
|
The error code to which occured during message servicing
|
UnpackLandmarkLC(const RMessage2 &, TInt)
Member Data Documentation
TInt
iCurrentRequest
TInt
|
iCurrentRequest
|
[private]
|
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.