All Classes Functions Variables Typedefs Friends Pages
Public Member Functions | List of all members
Glympse::ILocationManager Struct Referenceabstract

Provides a chance to control and customize location subsystem. More...

#include <ILocationManager.h>

Inheritance diagram for Glympse::ILocationManager:
Inheritance graph
[legend]

Public Member Functions

virtual GLocation getLocation ()=0
 Provides the most recent location.
 
virtual int32 startLocation ()=0
 Enables tracking user's location, when there are no outgoing tickets. More...
 
virtual int32 stopLocation (bool forced)=0
 Stops location updates previously started by startLocation(). More...
 
virtual void setLocationProvider (const GLocationProvider &locationProvider)=0
 Overrides default location provider.
 
virtual void setProximityProvider (const GProximityProvider &proximityProvider)=0
 Overrides default proximity provider.
 
virtual int32 getLocationState ()=0
 Gets current location state. More...
 
virtual void enableProfiles (bool enable)=0
 Controls the use of location profiles. More...
 
virtual bool areProfilesEnabled ()=0
 Checks if profiles are enabled.
 
virtual bool updateProfile (const GLocationProfile &profile)=0
 Provides manager with externally configured location profile. More...
 
virtual GLocationProfile getCurrentProfile ()=0
 Gets currently applied location profile. More...
 
virtual GLocationProfile getProfile (int profileId)=0
 Gets currently applied profile via identifier. More...
 
virtual void enableFiltering (bool enable)=0
 Client API performs location filtering to ignore knowingly bogus points. More...
 
virtual bool isFilteringEnabled ()=0
 Checks is local filtering is enabled.
 
virtual void handleGeofence (const GString &regionId, int32 transition)=0
 Notifies the platform that geofence transition occurred while platform was not running. More...
 
- Public Member Functions inherited from Glympse::IEventSink
virtual bool addListener (const GEventListener &eventListener)=0
 Registeres event listener on the sink. More...
 
virtual bool removeListener (const GEventListener &eventListener)=0
 Unsubscribes listener from events coming from this sink.
 
virtual GArray< GEventListener >
::ptr 
getListeners ()=0
 Provides access to the collection of current listeners. More...
 
virtual bool hasContext (int64 key)=0
 Checks, where user context identified by key is already associated with the object.
 
virtual void associateContext (int64 key, const GCommonObj &value)=0
 Associates specific context (user data) with the sink. More...
 
virtual GCommonObj getContext (int64 key)=0
 Returns context associated with the sink, or NULL, if it is not found.
 
virtual void clearContext (int64 key)=0
 Clears context identified by key argument.
 
virtual GEnumeration< GLong >::ptr getContextKeys ()=0
 Gets enumeration of all context keys associated with the sink.
 
virtual void deriveContext (const GEventSink &sink)=0
 Derives context from another sink object.
 
- Public Member Functions inherited from Glympse::IEventListener
virtual void eventsOccurred (const GGlympse &glympse, int32 listener, int32 events, const GCommonObj &obj)=0
 This method is invoked each time, when sink object notifies subscriber on an event. 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...
 

Detailed Description

Provides a chance to control and customize location subsystem.

Member Function Documentation

virtual void Glympse::ILocationManager::enableFiltering ( bool  enable)
pure virtual

Client API performs location filtering to ignore knowingly bogus points.

This method can be used to enable/disable the feature.

Filtering is ebabled by default.

Parameters
enableFiltering mode.
virtual void Glympse::ILocationManager::enableProfiles ( bool  enable)
pure virtual

Controls the use of location profiles.

This feature is disabled by default.

virtual GLocationProfile Glympse::ILocationManager::getCurrentProfile ( )
pure virtual

Gets currently applied location profile.

Returns
Profile object or NULL if profiles are disabled.
virtual int32 Glympse::ILocationManager::getLocationState ( )
pure virtual

Gets current location state.

See CoreConstants for more details.

virtual GLocationProfile Glympse::ILocationManager::getProfile ( int  profileId)
pure virtual

Gets currently applied profile via identifier.

Parameters
profileIdProfile identifier. See CC::LOCATION_PROFILE_* for details.
Returns
Profile object or NULL if profiles are disabled on profile ID is incorrect.
virtual void Glympse::ILocationManager::handleGeofence ( const GString regionId,
int32  transition 
)
pure virtual

Notifies the platform that geofence transition occurred while platform was not running.

Parameters
regionIdIdentifier of geofencing region.
transitionType of transition. Can be one of CC::GEOFENCE_TRANSITION_* values.
virtual int32 Glympse::ILocationManager::startLocation ( )
pure virtual

Enables tracking user's location, when there are no outgoing tickets.

This feature is useful to display user on the map, even if he/she is not broadcasting a location. It is also useful to have a chance to turn this feature off, when user location is not required any more (or not required at all for UI purposes). See stopLocation() for details.

Calling this method several times in succession result in increasing internal counter of consumers of location updates. Corresponding amount of calls to stopLocation() should be made to disable location updates completely.

This option does not override global location sharing preference. It is still possible to send a ticket and upload locations, even if this feature is turned off.

Glympse API only keep location services started when application is running in the foreground (taking into account that there are no active outgoing tickets). This mechanism in not intended to provide host application with location updates when running in the background.

Location services are disabled by default.

Returns
Returns a number of times stopLocation() needs to be called to stop location updates.
virtual int32 Glympse::ILocationManager::stopLocation ( bool  forced)
pure virtual

Stops location updates previously started by startLocation().

It is required to make this call as many times as startLocation() was called to stop location updates completely.

Location manager will keep up and running, if there are any active outgoing tickets on the system.

Parameters
forcedAllows to stop underlying location provider unconditionally (indifferently from a number of preceding calls to startLocation()).
Returns
Returns how many more invocations of stopLocation() are required to stop location updates.
virtual bool Glympse::ILocationManager::updateProfile ( const GLocationProfile profile)
pure virtual

Provides manager with externally configured location profile.

Location profile object refers to specific profile identifier.

This profile is not applied to location provder right away. Location manager pick correct profile to apply based on library state. This method is only used to update profile properties for specific profile identifier.

Parameters
Locationprofile to be updated.
Returns
true on success.

The documentation for this struct was generated from the following file: