CMnMapViewServiceBase Class Reference

class CMnMapViewServiceBase : public CMnServiceBase

Provider Application must derive its MapView service class from this one. This base implementation hides IPC communication details and provides native methods for accessing various map parameters, specified by client.

Provider Application must return pointer to instance of its class, derived from this class, in response to CAknAppService::CreateServiceL() call, if given parameter is KMnAppMapViewService.

This class defines handlers of particular requests from client as pure virtual methods, which derived class must implement. The parameters, which client application may specify in CMnMapView are accessible via other methods of this class. Provider Application must obey these parameters and use them as specified in CMnMapView .

See parent CMnServiceBase class documentation for other details.

Since
3.1 mnservicelib.lib

Nested Classes and Structures

Public Member Functions
IMPORT_C TReal AreaRadius ()
IMPORT_C void CompleteSelectionRequest ( TInt )
IMPORT_C void CompleteSelectionRequest ( TPosLmItemId , TInt )
IMPORT_C void CompleteSelectionRequestL (const CPosLandmark &)
IMPORT_C CMnMapView::TCurrentLocationOption CurrentLocationOption ()
IMPORT_C void GetAreaCentralPoint ( TCoordinate &)
IMPORT_C TBool IsAreaCentralPointSet ()
IMPORT_C TArray < const CPosLandmark * > LandmarksToShow ()
IMPORT_C TArray < const HBufC * > LandmarksToShowDatabases ()
IMPORT_C TArray < TPosLmItemId > LinkedLandmarksToShow ( TInt )
IMPORT_C CMnMapView::TOptions Options ()
IMPORT_C TPtrC SelectionRequestText ()
Protected Member Functions
CMnMapViewServiceBase ()
~CMnMapViewServiceBase ()
IMPORT_C void BaseConstructL ()
void HandleSelectFromMapL ()
void HandleShowCurrentLocationL ()
void HandleShowMapL ()
IMPORT_C void ServiceL (const RMessage2 &)
Private Member Functions
void CleanSelectionResult ()
TInt FindDatabase (const TDesC &)
void HandleAddLandmarkIdsToShowL (const RMessage2 &)
void HandleAddLandmarksToShowL (const RMessage2 &)
void HandleGetSelectionResultDbUriL (const RMessage2 &)
void HandleGetSelectionResultLandmarkL (const RMessage2 &)
void ResetLandmarks ()
void UnpackOptionsL (const RMessage2 &)
void UnpackSelectionRequestTextL (const RMessage2 &)
void VerifySelectionRequestL ()
Inherited Functions
CAknAppServiceBase::CAknAppServiceBase()
CAknAppServiceBase::CreateL()
CAknAppServiceBase::~CAknAppServiceBase()
CApaAppServiceBase::CApaAppServiceBase()
CApaAppServiceBase::CountResources()
CApaAppServiceBase::Disconnect(const RMessage2 &)
CApaAppServiceBase::SecurityCheckL(const RMessage2 &,TInt &,TSecurityInfo &)
CApaAppServiceBase::SendAppServerExitNotification(TInt)
CApaAppServiceBase::~CApaAppServiceBase()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CMnServiceBase::CMnServiceBase()
CMnServiceBase::Complete(const RMessage2 &,TInt)
CMnServiceBase::CompleteRequest(TInt)
CMnServiceBase::CopyClientBuffer8LC(const RMessage2 &,const TInt)
CMnServiceBase::CopyClientBufferLC(const RMessage2 &,const TInt)
CMnServiceBase::CurrentAsyncRequest()
CMnServiceBase::DoCancel()
CMnServiceBase::HandleCancelRequestL(const RMessage2 &)
CMnServiceBase::IsAsyncRequestActive()
CMnServiceBase::PrepareAsyncRequestL(const RMessage2 &)
CMnServiceBase::ServiceError(const RMessage2 &,TInt)
CMnServiceBase::UnpackLandmarkLC(const RMessage2 &,TInt)
CMnServiceBase::~CMnServiceBase()
CSession2::CSession2()
CSession2::Extension_(TUint,TAny *&,TAny *)
CSession2::ResourceCountMarkEnd(const RMessage2 &)
CSession2::ResourceCountMarkStart()
CSession2::Server()const
CSession2::SetServer(const CServer2 *)
CSession2::~CSession2()
Inherited Enumerations
CSession2:TPanicNo
Private Attributes
TCoordinate iCentralPoint
CMnMapView::TCurrentLocationOption iCurrentLocationOption
RPointerArray < const CPosLandmark > iLandmarks
RPointerArray < CLinkedLandmarksList > iLinkedLandmarksLists
CMnMapView::TOptions iOptions
TReal iRadius
TInt iResultDbIndex
HBufC8 * iResultLandmark
HBufC * iSelectionRequestText
RPointerArray < const HBufC > iTempDatabaseList
Inherited Attributes
CMnServiceBase::iMessage

Constructor & Destructor Documentation

CMnMapViewServiceBase()

IMPORT_C CMnMapViewServiceBase ( ) [protected]

C++ constructor

~CMnMapViewServiceBase()

IMPORT_C ~CMnMapViewServiceBase ( ) [protected, virtual]

Destructor

Member Functions Documentation

AreaRadius()

IMPORT_C TReal AreaRadius ( )

Implementation has to obey this setting as long as this is within allowed range. If it is too low and cannot be used, the implementation must select lowest possible radius. If this value is KAutomaticRadius, it is considered not set.

BaseConstructL()

IMPORT_C void BaseConstructL ( ) [protected]

This method must be called from derived class' ConstructL to allow internal initialization of this class.

CleanSelectionResult()

void CleanSelectionResult ( ) [private]

CompleteSelectionRequest(TInt)

IMPORT_C void CompleteSelectionRequest ( TInt aLandmarkIndex )

Implementation must call this method to signal completion of Select From Map request. This override is used if one of not linked landmarks has been selected by user.

panic
"MnPanicServer"-KMnPanicArrayIndexOutOfBounds aLandmarkIndex is negative or greater than LandmarksToShow() .Count().

Parameters

TInt aLandmarkIndex Index of not linked landmark containing information about user-selected location. As much information as possible shall be set.

CompleteSelectionRequest(TPosLmItemId, TInt)

IMPORT_C void CompleteSelectionRequest ( TPosLmItemId aLandmarkId,
TInt aDbIndex
)

Implementation must call this method to signal completion of Select From Map request. This override is used if one of linked landmarks, passed by client has been selected by user.

panic
"MnPanicServer"-KMnPanicArrayIndexOutOfBounds aDbIndex is negative or greater than LandmarksToShowDatabases() .Count().

Parameters

TPosLmItemId aLandmarkId ID of landmark selected by user.
TInt aDbIndex Index of database where landmark specified by aLandmarkId belongs to.

CompleteSelectionRequestL(const CPosLandmark &)

IMPORT_C void CompleteSelectionRequestL ( const CPosLandmark & aLandmark )

Implementation must call this method to signal completion of Select From Map request. This override is used if free location from map has been selected by user.

leave
KErrArgument CMnMapView::EOptionRestrictSelection was specified by client.
Options() .

Parameters

const CPosLandmark & aLandmark Landmark containing information about user-selected location. As much information as possible shall be set.

CurrentLocationOption()

IMPORT_C CMnMapView::TCurrentLocationOption CurrentLocationOption ( )

This option must be utilized in request handlers as specified in CMnMapView .

FindDatabase(const TDesC &)

TInt FindDatabase ( const TDesC & aUri ) [private]

Parameters

const TDesC & aUri

GetAreaCentralPoint(TCoordinate &)

IMPORT_C void GetAreaCentralPoint ( TCoordinate & aCentralPoint )

If central point is not set, this coordinate has latitude and longitude set to NaN.

Parameters

TCoordinate & aCentralPoint Central point of map view area, specified by client.

HandleAddLandmarkIdsToShowL(const RMessage2 &)

void HandleAddLandmarkIdsToShowL ( const RMessage2 & aMessage ) [private]

Parameters

const RMessage2 & aMessage

HandleAddLandmarksToShowL(const RMessage2 &)

void HandleAddLandmarksToShowL ( const RMessage2 & aMessage ) [private]

Parameters

const RMessage2 & aMessage

HandleGetSelectionResultDbUriL(const RMessage2 &)

void HandleGetSelectionResultDbUriL ( const RMessage2 & aMessage ) [private]

Parameters

const RMessage2 & aMessage

HandleGetSelectionResultLandmarkL(const RMessage2 &)

void HandleGetSelectionResultLandmarkL ( const RMessage2 & aMessage ) [private]

Parameters

const RMessage2 & aMessage

HandleSelectFromMapL()

void HandleSelectFromMapL ( ) [protected, pure virtual]

Derived class must implement this method obeying specification of CMnMapView::SelectFromMapL and if KMnSvcFeatureSelectFromMap feature is specified in its SERVICE_INFO.

Landmarks returned by LandmarksToShow and LinkedLandmarksToShow shall be shown on map.

This is asynchronous request. It must be completed (in successful case) with one of CompleteSelectionRequest overloads.

leave
KErrNotSupported Should leave if this feature is not supported.

HandleShowCurrentLocationL()

void HandleShowCurrentLocationL ( ) [protected, pure virtual]

Derived class must implement this method obeying specification of CMnMapView::ShowCurrentLocationL and if KMnSvcFeatureShowMap feature is specified in its SERVICE_INFO.

Landmarks returned by LandmarksToShow and LinkedLandmarksToShow shall be shown on map.

This is synchronous request. Client's request will be completed when this method exits, therefore it should exit immediately after map view is shown.

leave
KErrNotSupported Should leave if this feature is not supported.

HandleShowMapL()

void HandleShowMapL ( ) [protected, pure virtual]

Derived class must implement this method obeying specification of CMnMapView::ShowMapL and if KMnSvcFeatureShowMap feature is specified in its SERVICE_INFO.

Landmarks returned by LandmarksToShow and LinkedLandmarksToShow shall be shown on map.

This is synchronous request. Client's request will be completed when this method exits, therefore it should exit immediately after map view is shown.

leave
KErrNotSupported Should leave if this feature is not supported.

IsAreaCentralPointSet()

IMPORT_C TBool IsAreaCentralPointSet ( )

If central point is not set, GetAreaCentralPoint returns coordinate with latitude and longitude set to NaN.

LandmarksToShow()

IMPORT_C TArray < const CPosLandmark * > LandmarksToShow ( )

All these landmarks shall be shown on map.

LandmarksToShowDatabases()

IMPORT_C TArray < const HBufC * > LandmarksToShowDatabases ( )

LinkedLandmarksToShow(TInt)

IMPORT_C TArray < TPosLmItemId > LinkedLandmarksToShow ( TInt aDbIndex )

All these landmarks shall be shown on map.

panic
"MnPanicServer"-KMnPanicArrayIndexOutOfBounds aDbIndex not valid for the list of databases.

Parameters

TInt aDbIndex Index of landmark database, which contains returned landmarks. Must be valid for array returned from LandmarksToShowDatabases() .

Options()

IMPORT_C CMnMapView::TOptions Options ( )

These options must be utilized in request handlers as specified in CMnMapView .

ResetLandmarks()

void ResetLandmarks ( ) [private]

SelectionRequestText()

IMPORT_C TPtrC SelectionRequestText ( )

This text is used in HandleSelectFromMapL() .

ServiceL(const RMessage2 &)

IMPORT_C void ServiceL ( const RMessage2 & aMessage ) [protected, virtual]

Override of CSession2::ServiceL() . If further overridden, this function must be base-called.

Parameters

const RMessage2 & aMessage The client message

UnpackOptionsL(const RMessage2 &)

void UnpackOptionsL ( const RMessage2 & aMsg ) [private]

Parameters

const RMessage2 & aMsg

UnpackSelectionRequestTextL(const RMessage2 &)

void UnpackSelectionRequestTextL ( const RMessage2 & aMsg ) [private]

Parameters

const RMessage2 & aMsg

VerifySelectionRequestL()

void VerifySelectionRequestL ( ) [private]

Member Data Documentation

TCoordinate iCentralPoint

TCoordinate iCentralPoint [private]

CMnMapView::TCurrentLocationOption iCurrentLocationOption

CMnMapView::TCurrentLocationOption iCurrentLocationOption [private]

RPointerArray< const CPosLandmark > iLandmarks

RPointerArray < const CPosLandmark > iLandmarks [private]

RPointerArray< CLinkedLandmarksList > iLinkedLandmarksLists

RPointerArray < CLinkedLandmarksList > iLinkedLandmarksLists [private]

CMnMapView::TOptions iOptions

CMnMapView::TOptions iOptions [private]

TReal iRadius

TReal iRadius [private]

TInt iResultDbIndex

TInt iResultDbIndex [private]

HBufC8 * iResultLandmark

HBufC8 * iResultLandmark [private]

HBufC * iSelectionRequestText

HBufC * iSelectionRequestText [private]

RPointerArray< const HBufC > iTempDatabaseList

RPointerArray < const HBufC > iTempDatabaseList [private]