CLbsRefLocationSourceBase Class Reference

class CLbsRefLocationSourceBase : public CBase

Defines the interface which needs to be implemented by the ECOM plugins which can return a reference position. The interface allows for a request to a reference position and for cancelling that request. The requests are asynchronous, the result being given through an observer interface. So when the implementation manages to obtain the reference position it returns it through the calls in MLbsRefLocationObserver. If there is an error retrieving the reference position then this error should be reported through the call-back. The interface allows also cancelling of the request made. If no request is outstanding nothing should be done. If a second request is made while one is already active then the second request can just be ignored (since the request doesn't really have any parameters and all it's doing is retrieving something that is stored, there is no need to pass through the second request when the first one is still outstanding).

The implementer of the interface needs to call the BaseConstructL() method as part of the construction procedure to ensure the object is build fully.

MLbsRefLocationObserver

Inherits from

  • CLbsRefLocationSourceBase

Constructor & Destructor Documentation

CLbsRefLocationSourceBase(MLbsRefLocationObserver &)

IMPORT_CCLbsRefLocationSourceBase(MLbsRefLocationObserver &aObserver)[protected]

Constructor

Parameters

MLbsRefLocationObserver & aObserverReference to the class that should receive all the callbacks

~CLbsRefLocationSourceBase()

IMPORT_C~CLbsRefLocationSourceBase()

Destructor

Member Functions Documentation

BaseConstructL()

IMPORT_C voidBaseConstructL()[protected]

Base 2nd stage constructor. The implementer of the interface needs to call this method as part of the construction procedure to ensure the object is build fully.

CancelRefPositionInfoRequest()

voidCancelRefPositionInfoRequest()[pure virtual]

Interface definition. This method is used to cancel a previous request for reference position information.

ExtendedInterface(TInt, TAny *, TAny *)

IMPORT_C TAny *ExtendedInterface(TIntaFunctionNumber,
TAny *aPtr1,
TAny *aPtr2
)[private, virtual]

This method is used to allow polymorphic extensions to the API without breaking BC.

Reserved for future expansion.

Parameters

TInt aFunctionNumbercontains the Id of the function to be invoked internally.
TAny * aPtr1a pointer to any data.
TAny * aPtr2a pointer to any data.

NewL(MLbsRefLocationObserver &, TUid)

IMPORT_C CLbsRefLocationSourceBase *NewL(MLbsRefLocationObserver &aObserver,
TUidaEcomModuleId
)[static]

Two-phase constructor that loads the right ECOM implementation of the interface and provides a pointer to it.

Parameters

MLbsRefLocationObserver & aObserverReference to the class that should receive all the callbacks
TUid aEcomModuleIdThe UID of the ECOM implementation that should be loaded

RequestRefPositionInfo()

voidRequestRefPositionInfo()[pure virtual]

Interface definition. This method is used to make a request for reference position information.

Making a request while another one is outstanding should not affect anything and can be ignored.

SetRequestorAddress(const TDesC &)

voidSetRequestorAddress(const TDesC &aAddress)[pure virtual]

Method used to set the address of the original requester of the reference location.

Parameters

const TDesC & aAddressThe adress of the originator of the request

Version()

IMPORT_C TVersionVersion()const

Method which shows which version of the interface the implementation is using

Member Data Documentation

TUid iDtor_ID_Key

TUid iDtor_ID_Key[private]

the ID key used for destroying the ECom interface

MLbsRefLocationObserver & iObserver

MLbsRefLocationObserver &iObserver[protected]

Observer which receives call-backs with the ref position information

TAny * iReserved

TAny *iReserved[private]

reserved for future use

TVersion iVersion

TVersion iVersion[private]

The version of the interface