Host application implements ILocationProvider to supply Glympse API with location information aquired from proprietary source (external location API or service). More...
#include <ILocationProvider.h>

Public Member Functions | |
| virtual void | setLocationListener (const GLocationListener &locationListener)=0 |
| Attaches location listener to the provider. | |
| virtual void | start ()=0 |
| Starts the provider. | |
| virtual void | stop ()=0 |
| Stops the provider. | |
| virtual bool | isStarted ()=0 |
| Checks if provider is started. | |
| virtual GLocation | getLastKnownLocation ()=0 |
| Returns the last known location acquired by underlying location provider, or NULL if no location has ever been acquired from the device. | |
| virtual void | applyProfile (const GLocationProfile &profile)=0 |
| Tells provider to apply specified profile. More... | |
Public Member Functions inherited from Glympse::ICommon | |
| virtual int32 | retain ()=0 |
| Add a reference to our object in a COM-like way. | |
| virtual int32 | release ()=0 |
| Release a reference to our object in a COM-like way. | |
| virtual int32 | hold ()=0 |
| Add a reference to our object in a COM-like way. | |
| virtual int32 | unhold ()=0 |
| Release a reference to our object in a COM-like way. | |
| virtual int32 | hashCode ()=0 |
| Returns an integer hash code for this object. | |
| virtual bool | equals (const GCommonObj &o)=0 |
| Compares this instance with the specified object and indicates if they are equal. More... | |
| virtual GString | toString ()=0 |
| Returns a string containing a concise, human-readable description of this object. More... | |
| virtual void | attachObject (const GCommon &obj)=0 |
| Asociates arbitrary object with the instance. | |
| virtual GCommon | extractObject ()=0 |
| Extracts associated object or NULL if no association is established. | |
Additional Inherited Members | |
Protected Member Functions inherited from Glympse::ICommon | |
| virtual | ~ICommon () |
| Destructor is protected to deny explicit object deallocation. More... | |
Host application implements ILocationProvider to supply Glympse API with location information aquired from proprietary source (external location API or service).
Location manager expects to receive updates (through ILocationListener interface) between calls to start() and stop() methods.
Location manager never pulls location points on its own. It always relies on location provider to call ILocationListener::locationChanged(const GLocation&), when new location point is available.
Here is how to set external provider. It is only allowed to call IGlympse::getLocationManager() method after starting the platform (by calling IGlympse::start()).
Custom location provider implementation can optionally support location profiles dictated by location manager. Profiles are applied through applyProfile().
|
pure virtual |
Tells provider to apply specified profile.
Location provider can either access profile properties or apply configuration based on profile ID (see ILocationProfile::getProfile()).
ILocationProfile::isEnabled() property should be ignored by the provider. Location manager starts and stops location provider independently from applying profiles.
Location provider should be able to handle NULL value, which means that provider should restore its state to original settings (best accuracy in most cases).
| profile | Location profile object or NULL. |
1.8.4