CPosModules Class Reference
class CPosModules : public CBase
|
The main interface to location settings.
This class is used for accessing positioning plug-ins attributes using
GetModuleInfoL()
and accessing and managing priority list of PSYs (see methods
ModuleIdListL()
and
SetModulePriorityL()
). A positioning plug-in (or "module") is referenced by its unique
TUid
value.
All PSYs are ordered into priority list, which is used by Location Server in fallback situations (when used via RPositioner::Open() without parameters). Note however, that modules with visibility attribute set to 0 are not used in these cases and have no priority assigned. Whenever client attempts to get or set priority of such a module, the appropriate methods leave with KErrNotFound. Module must be set visible before its priority can be retrieved or modified, see
CPosModuleUpdate::SetUpdateVisibility()
.
A client can also listen for changes in location settings by setting an observer via
SetObserverL()
.
Private Attributes
|
CPosModulesEngine *
|
iEngine
|
Constructor & Destructor Documentation
CPosModules()
CPosModules
|
(
|
)
|
[private]
|
CPosModules(const CPosModules &)
~CPosModules()
IMPORT_C
|
~CPosModules
|
(
|
)
|
[virtual]
|
Member Functions Documentation
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
GetModuleInfoL(TPositionModuleId, TPositionModuleInfoBase &)
Retrieves the attributes of a module.
If the supplied position module info class is not supported, this method will leave with code KErrNotSupported. Currently only
TPositionModuleInfo
is supported.
-
leave
-
KErrNotSupported Not supported module info class object is is supplied as parameter.
-
leave
-
KErrNotFound No module with given ID is installed.
IsModuleInstalled(TPositionModuleId)
Verifies if a module is installed in the system.
IsModuleVisibleL(TPositionModuleId)
Returns visibility attribute of a module.
-
leave
-
KErrNotFound No module with given ID is found in the system.
IsModuleInstalledL()
Parameters
TPositionModuleId
aModuleId
|
The ID of the module, which visibility attribute is to be checked.
|
ModuleIdListL()
Retrieves a list of the existing modules in priority order. Client takes ownership of returned object.
Modules marked as invisible are not included in this list.
ModuleIdListLC()
ModuleIdListLC()
Retrieves a list of the existing modules in priority order and leaves it in cleanup stack. Client takes ownership of returned object.
Modules marked as invisible are not included in this list.
ModuleIdListL()
PriorityL(TPositionModuleId)
Retrieves the priority of a positioning module. 0 is the highest priority.
Note that modules with visibility attribute set to 0 have no priority.
-
leave
-
KErrNotFound No module with specified ID is found in priority list.
RemoveObserver()
IMPORT_C void
|
RemoveObserver
|
(
|
)
|
|
SetModulePrioritiesL(const CPosModuleIdList &)
Changes the priority of modules. The modules priorities will be set to reflect the module order in the list.
-
leave
-
KErrLocked Several clients are accessing location settings simultaneously.
-
leave
-
KErrArgument Module ID list is missing some module IDs or has module IDs not found in the system.
Parameters
const
CPosModuleIdList
& aModuleIdList
|
[in] The module list including the new priority order List must have the same set of module IDs as would be returned by ModuleIdListL().
|
SetModulePriorityL(TPositionModuleId, TInt)
Changes the priority of a module. The priority of the other modules will be shifted so that each module has a unique priority between 0 and number of modules - 1. 0 is the highest priority.
Note that modules with visibility attribute set to 0 have no priority.
-
leave
-
KErrLocked Several clients are accessing location settings simultaneously.
-
leave
-
KErrNotFound No module with specified ID is found in priority list.
-
leave
-
KErrArgument Priority value is out of bounds.
Parameters
TPositionModuleId
aModuleId
|
The ID of the module to set priority for.
|
TInt
aNewPriority
|
The new priority for the module. Priority must be a number between 0 and number of modules - 1.
|
SetModulePriorityL(TInt, TInt)
IMPORT_C void
|
SetModulePriorityL
|
(
|
TInt
|
aOldPriority,
|
|
TInt
|
aNewPriority
|
|
)
|
|
Changes the priority of a module. The priority of the other modules will be shifted so that each module has a unique priority between 0 and number of modules - 1. 0 is the highest priority.
-
leave
-
KErrLocked Several clients are accessing location settings simultaneously.
-
leave
-
KErrArgument Priority value is out of bounds.
Parameters
TInt
aOldPriority
|
The module's old priority. Priority must be a number between 0 and number of modules - 1.
|
TInt
aNewPriority
|
The new priority for the module. Priority must be a number between 0 and number of modules - 1.
|
SetObserverL(MPosModulesObserver &)
Sets listener for location settings changes.
Listening can be stopped by calling
RemoveObserver()
.
-
leave
-
KErrNoMemory No memory available to install observer.
-
panic
-
LocationSettings EPosLocSetPanicObserverIsAlreadySet If observer is already set.
RemoveObserver()
UpdateModuleL(TPositionModuleId, const CPosModuleUpdate &)
Updates changeable attributes of a positioning module.
-
leave
-
KErrLocked Several clients are accessing location settings simultaneously.
-
leave
-
KErrNotFound No module with given ID is installed.
operator=(const CPosModules &)
Member Data Documentation
CPosModulesEngine * iEngine
CPosModulesEngine *
|
iEngine
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.