VisioMove-Sample  2.1.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
VgMyLocationManager Class Reference

This class provides access to the location services. More...

Inheritance diagram for VgMyLocationManager:
Inheritance graph

Public Member Functions

 ~VgMyLocationManager ()
 
VgMyLocationProvidergetProvider (const std::string &pName)
 Returns the information associated with the location provider of the given name, or null if no provider exists by that name. More...
 
std::vector< std::string > getProviders (bool pEnabledOnly=false)
 Returns a list of the names of all known location providers. More...
 
void addProvider (VgMyLocationProvider *pProvider)
 Adds the provider to the location manager. More...
 
void removeProvider (VgMyLocationProvider *pProvider)
 Removes the provider from the location manager. More...
 
void addListener (const std::string &pName, VgMyLocationListener *pListener)
 Adds the listener to the location manager and associates it with the provider name. More...
 
void removeListener (const std::string &pName, VgMyLocationListener *pListener)
 Removes the listener from the location manager. More...
 
void notifyPositionDidChange (const std::string &pProvider, const VgEngine::VgPosition &pPosition)
 Called when the location has changed. More...
 
void notifyFloorDidChange (const std::string &pProvider, const std::string &pFloor)
 Called when the floor has changed. More...
 
void notifyAccuracyDidChange (const std::string &pProvider, double pAccuracy)
 Called when the accuracy has changed. More...
 
void notifyContextDidChange (const std::string &pProvider, int pContext)
 Called when the context has changed. More...
 
void notifyHeadingDidChange (const std::string &pProvider, double pHeading)
 Called when the heading has changed. More...
 
void notifyStatusDidChange (const std::string &pProvider, int pStatus)
 Called when the status has changed. More...
 
void notifyLocationProviderEnabled (const std::string &pProvider)
 Called when the provider is enabled. More...
 
void notifyLocationProviderDisabled (const std::string &pProvider)
 Called when the provider is disabled. More...
 

Static Public Member Functions

static VgMyLocationManagergetInstance ()
 

Additional Inherited Members

- Protected Member Functions inherited from VgMyLocationListener
virtual ~VgMyLocationListener ()
 

Detailed Description

This class provides access to the location services.

These services allow applications to obtain periodic updates of the device's geographical location.

You do not instantiate this class directly; instead, retrieve it via the VgMyLocationManager::getInstance() method.

Constructor & Destructor Documentation

VgMyLocationManager::~VgMyLocationManager ( )

Member Function Documentation

void VgMyLocationManager::addListener ( const std::string &  pName,
VgMyLocationListener pListener 
)

Adds the listener to the location manager and associates it with the provider name.

It's possible to associate a listener with a provider name that hasn't been added to the location manager.

Parameters
pNameThe name of the provider
pListenerThe listener
void VgMyLocationManager::addProvider ( VgMyLocationProvider pProvider)

Adds the provider to the location manager.

If there are already associated listeners for this provider, they will be notified of the providers current state via either notifyLocationProviderEnabled() or notifyLocationProviderDisabled().

Parameters
pProviderThe provider

Referenced by VgMyNavigationProviderManager::notifyNavigationCreated().

Here is the caller graph for this function:

static VgMyLocationManager* VgMyLocationManager::getInstance ( )
static
VgMyLocationProvider* VgMyLocationManager::getProvider ( const std::string &  pName)

Returns the information associated with the location provider of the given name, or null if no provider exists by that name.

Parameters
pNameThe provider name
std::vector<std::string> VgMyLocationManager::getProviders ( bool  pEnabledOnly = false)

Returns a list of the names of all known location providers.

Parameters
pEnabledOnlyIf true then only the providers which are currently enabled are returned. By default is false.

Referenced by VgMyNavigationProviderManager::notifyNavigationCreated().

Here is the caller graph for this function:

void VgMyLocationManager::notifyAccuracyDidChange ( const std::string &  pProvider,
double  pAccuracy 
)
virtual

Called when the accuracy has changed.

Parameters
pProviderThe location provider responsible for sending the notification.
pAccuracyThe new accuracy

Implements VgMyLocationListener.

void VgMyLocationManager::notifyContextDidChange ( const std::string &  pProvider,
int  pContext 
)
virtual

Called when the context has changed.

Parameters
pProviderThe location provider responsible for sending the notification.
pContextThe new context

Implements VgMyLocationListener.

void VgMyLocationManager::notifyFloorDidChange ( const std::string &  pProvider,
const std::string &  pFloor 
)
virtual

Called when the floor has changed.

Parameters
pProviderThe location provider responsible for sending the notification.
pFloorThe new floor

Implements VgMyLocationListener.

void VgMyLocationManager::notifyHeadingDidChange ( const std::string &  pProvider,
double  pHeading 
)
virtual

Called when the heading has changed.

Heading is the horizontal direction of travel of this device, and is not related to the device orientation.

Parameters
pProviderThe location provider responsible for sending the notification.
pHeadingThe new heading. The valid range for the heading is [0.0, 360.0]. Where 0.0 is North, and increasing values starts towards the East.

Implements VgMyLocationListener.

void VgMyLocationManager::notifyLocationProviderDisabled ( const std::string &  pProvider)
virtual

Called when the provider is disabled.

Parameters
pProviderThe location provider responsible for sending the notification.

Implements VgMyLocationListener.

void VgMyLocationManager::notifyLocationProviderEnabled ( const std::string &  pProvider)
virtual

Called when the provider is enabled.

Parameters
pProviderThe location provider responsible for sending the notification.

Implements VgMyLocationListener.

void VgMyLocationManager::notifyPositionDidChange ( const std::string &  pProvider,
const VgEngine::VgPosition &  pPosition 
)
virtual

Called when the location has changed.

Parameters
pProviderThe location provider responsible for sending the notification
pPositionThe new position

Implements VgMyLocationListener.

void VgMyLocationManager::notifyStatusDidChange ( const std::string &  pProvider,
int  pStatus 
)
virtual

Called when the status has changed.

Parameters
pProviderThe location provider responsible for sending the notification.
pStatusThe new status. See for available values.

Implements VgMyLocationListener.

void VgMyLocationManager::removeListener ( const std::string &  pName,
VgMyLocationListener pListener 
)

Removes the listener from the location manager.

Parameters
pNameThe name of the provider
pListenerThe listener
void VgMyLocationManager::removeProvider ( VgMyLocationProvider pProvider)

Removes the provider from the location manager.

If the provider is enabled, then disable() will be called automatically. Listeners associated with the provider will remain registered.

Parameters
pProviderThe provider

Referenced by VgMyNavigationProviderManager::destroyNavigationLocationProvider().

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
VisioMove 2.1.3, Visioglobe® 2015