Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: Lbs.h
Link against: lbsselflocate.lib

Class RPositionServer

class RPositionServer : public RSessionBase;

Description

This is generally the first interface class used by all client applications. It is used to make the primary connection to the location server. After the primary connection has been established, its handle is passed as a parameter of the Open methods of RPositioner to create a "sub-session".

The RPositionServer class can also be used to discover what position technology "modules" are available. However, this is only required if a client application actually needs to use a particular module.

Derivation

Members

Defined in RPositionServer:
CancelRequest(), Close(), Connect(), GetDefaultModuleId(), GetModuleInfoById(), GetModuleInfoByIndex(), GetModuleStatus(), GetNumModules(), NotifyModuleStatusEvent(), RPositionServer(), Version()

Inherited from RHandleBase:
Attributes(), Duplicate(), FullName(), Handle(), HandleInfo(), Name(), SetHandle(), SetHandleNC(), iHandle

Inherited from RSessionBase:
CreateSession(), EAutoAttach, EExplicitAttach, Open(), Send(), SendReceive(), SetReturnedHandle(), ShareAuto(), ShareProtected(), TAttachMode


Construction and destruction


RPositionServer()

IMPORT_C RPositionServer();

Description

Constructor for RPositionServer

[Top]


Member functions


Connect()

IMPORT_C TInt Connect();

Description

Creates a session with the positioning server. If there are no other sessions when this is called, the method will start the server.

Return value

TInt

Standard Symbian OS error code.


Close()

IMPORT_C void Close();

Description

Closes a session with the positioning server.


CancelRequest()

IMPORT_C TInt CancelRequest(TInt aRequestId);

Description

Cancels a previously issued asynchronous request. The TRequestStatus of the original request will be set to KErrCancel if the cancellation request was successful, or any other Symbian OS error code if CancelRequest was called too late.

Parameters

TInt aRequestId

is a number that uniquely identifies a client side method.

Return value

TInt

Standard Symbian OS error code.

Panic codes

KErrArgument

Unknown Id


Version()

IMPORT_C TVersion Version() const;

Description

Obtains the current version number of the location server.

Return value

TVersion

the version of the client API.


GetDefaultModuleId()

IMPORT_C TInt GetDefaultModuleId(TPositionModuleId &aModuleId) const;

Description

This method obtains the identifier of the systems' default positioning module. This module will be used if no criteria is specified when an RPositioner sub-session is created.

Parameters

TPositionModuleId &aModuleId

will be set, upon successful completion, to the ID of the module that the positioning server uses by default.

Return value

TInt

Standard Symbian OS error code.

See also:


GetNumModules()

IMPORT_C TInt GetNumModules(TUint &aNumModules) const;

Description

This method obtains the current number of available positioning modules.

Parameters

TUint &aNumModules

will be set, upon successful completion, to the number of positioning modules (PSYs) that are currently available.

Return value

TInt

Standard Symbian OS error code.


GetModuleInfoByIndex()

IMPORT_C TInt GetModuleInfoByIndex(TInt aModuleIndex, TPositionModuleInfoBase &aModuleInfo) const;

Description

Return details about a specified module.

Parameters

TInt aModuleIndex

a logical index (0..n) of a positioning module.

TPositionModuleInfoBase &aModuleInfo

contains, on successful completion, the information relating to the specified positioning module.

Return value

TInt

Standard Symbian OS error code.


GetModuleInfoById()

IMPORT_C TInt GetModuleInfoById(TPositionModuleId aModuleId, TPositionModuleInfoBase &aModuleInfo) const;

Description

Return details about a specified module.

Parameters

TPositionModuleId aModuleId

the unique identifier (UID) of a positioning module

TPositionModuleInfoBase &aModuleInfo

contains, on successful completion, the information relating to the specified positioning module.

Return value

TInt

Standard Symbian OS error code.


GetModuleStatus()

IMPORT_C TInt GetModuleStatus(TPositionModuleStatusBase &aPosModuleStatus, TPositionModuleId aModuleId) const;

Description

Obtains information about the specified positioning module.

Parameters

TPositionModuleStatusBase &aPosModuleStatus

contains, on successful completion, the status of the specified positioning module

TPositionModuleId aModuleId

the unique identifier (UID) of a positioning module

Return value

TInt

a Standard Symbian OS error code.


NotifyModuleStatusEvent()

IMPORT_C void NotifyModuleStatusEvent(TPositionModuleStatusEventBase &aStatusEvent, TRequestStatus &aStatus, const TPositionModuleId aModuleId=KPositionNullModuleId) const;

Description

This method reports status changes of either a single module or all positioning modules. If the parameter aModuleId is zero, then a status update is provided for all positioning modules. If aModuleId is supplied, then the client will only receive a status update for that specified module. After a notification has been received, the client application must re-issue the status change request if it wishes to obtain further updates.

Parameters

TPositionModuleStatusEventBase &aStatusEvent

contains, on successful completion, information regarding the status event and the new status of of the specified positioning module.

TRequestStatus &aStatus

returns the result code after the asynchronous call completes

const TPositionModuleId aModuleId

the unique identifier (UID) of a positioning module.