#include <Lbs.h>
Link against:
lbs.lib
Link against:
lbsselflocate.lib
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
RSessionBase
-
Client-side handle to a session with a server.
RPositionServer
- This is generally the first interface class used by all client applications. It ...
Members
Defined in RPositionServer
:
Inherited from RHandleBase
:
Inherited from RSessionBase
:
CreateSession(RServer2,const TVersion &)
Creates a session with a server, specifying no message slots.
CreateSession(RServer2,const TVersion &,TInt)
Creates a session with a server.
CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
Creates a session with a server.
CreateSession(const TDesC &,const TVersion &)
Creates a session with a server, specifying no message slots.
CreateSession(const TDesC &,const TVersion &,TInt)
Creates a session with a server.
CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
Creates a session with a server.
CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
EAutoAttach
EExplicitAttach
Open(RMessagePtr2,TInt,TOwnerType)
Opens a handle to a session using a handle number sent by a client to a server.
Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
Opens a handle to a session using a handle number sent by a client to a server, ...
Open(TInt,TOwnerType)
Opens a handle to a session using a handle number passed as an environment data ...
Open(TInt,const TSecurityPolicy &,TOwnerType)
Opens a handle to a session using a handle number passed as an environment data ...
Send(TInt)const
Issues a blind request to the server with the specified function number, but wit...
Send(TInt,const TIpcArgs &)const
Issues a blind request to the server with the specified function number, and arg...
SendReceive(TInt)const
Issues a synchronous request to the server with the specified function number, b...
SendReceive(TInt,TRequestStatus &)const
Issues an asynchronous request to the server with the specified function number,...
SendReceive(TInt,const TIpcArgs &)const
Issues a synchronous request to the server with the specified function number an...
SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
Issues an asynchronous request to the server with the specified function number ...
SetReturnedHandle(TInt)
Sets the handle-number of this handle to the specified value.
SetReturnedHandle(TInt,RHandleBase &)
SetReturnedHandle(TInt,const TSecurityPolicy &)
Sets the handle-number of this session handle to the specified value after valid...
ShareAuto()
Creates a session that can be shared by other threads in the current process.
ShareProtected()
Creates a session handle that can be be passed via IPC to another process as wel...
TAttachMode
Indicates whether or not threads in the process are automatically attached to th...
Construction and destruction
IMPORT_C RPositionServer();
Description
Constructor for RPositionServer
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.
|
|
IMPORT_C void Close();
Description
Closes a session with the positioning server.
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. Currently only the value EPositionServerNotifyModuleStatusEvent
is supported.
|
|
Return value
TInt
|
Standard Symbian OS error code.
|
|
Panic codes
IMPORT_C TVersion Version() const;
Description
Obtains the current version number of the location server.
Return value
GetDefaultModuleId(TPositionModuleId &)const
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
TUid &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(TUint &)const
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(TInt,TPositionModuleInfoBase &)const
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(TPositionModuleId,TPositionModuleInfoBase &)const
IMPORT_C TInt GetModuleInfoById(TPositionModuleId aModuleId, TPositionModuleInfoBase &aModuleInfo) const;
Description
Return details about a specified module.
Parameters
TUid 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(TPositionModuleStatusBase &,TPositionModuleId)const
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
|
TUid aModuleId |
the unique identifier (UID) of a positioning module
|
|
Return value
TInt
|
a Standard Symbian OS error code.
|
|
NotifyModuleStatusEvent(TPositionModuleStatusEventBase &,TRequestStatus &,const TPositionModuleId)const
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 TUid aModuleId |
the unique identifier (UID) of a positioning module.
|
|