diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-90094016-7DAA-5643-9470-36DF324D5884.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-90094016-7DAA-5643-9470-36DF324D5884.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,53 @@ + + + + + +Opening a session that uses the Network PSYThis shows how to open a session using the Network PSY.

The Network PSY is used by the Location Server eposserver.exe to connect to positioning hardware using the Network Location Manager and a Network Protocol Module.

To use the Network PSY a Location Acquisition API client opens an RPositioner subsession using one of the following methods:

  • Explicitly using a PSY implementation UID

  • Implicitly (the Location Server uses the Default PSY)

These methods are described in more detail below.

To use the Network PSY explicitly, open a session using the Network PSY implementation UID. The Network PSY has an implementation UID = 0x10285abc. Open a session and subsession using the Location Acquisition API as shown below: #include <lbs.h> +#include <lbserrors.h> + +#define KNetPSYImplUid 0x10285abe + +... + +RPositionServer server; +RPositioner positioner; + +/Create a session with the location server +User::LeaveIfError(server.Connect()); +CleanupClosePushL(server); + +// Create a subsession with the Location Server using the Network PSY +User::LeaveIfError(positioner.Open(server, TUid::Uid(KNetPSYImplUid))); +CleanupClosePushL(positioner); + +// Use Location Acquisition API as normal - see API documentation for more details + +... + +// Close the session + +CleanupStack::PopAndDestroy(&positioner); +CleanupStack::PopAndDestroy(&server); + To use the Network PSY implicitly through the Default PSY, open a session without specifying a PSY UID. +... + +//Create a session with the location server +User::LeaveIfError(server.Connect()); +CleanupClosePushL(server); + +// Location Server uses the default PSY, which can use the Network PSY +User::LeaveIfError(positioner.Open(server); +CleanupClosePushL(positioner); + +// Use Location Acquisition API as normal... + +... + The Default PSY has a list of all available PSYs. If the Network PSY is installed it can be used by the Default PSY. The choice of which PSY is used is based on the priority and availability of the PSYs. See Positioning Plug-in Information API for more information about PSY settings. See Default PSY for information about how a PSY is selected.
Default + PSY Positioning Plug-in Information API Location Acquisition API
\ No newline at end of file