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

Controls the behavior of ETA/directions unit. More...

#include <IDirectionsManager.h>

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

Public Member Functions

virtual void enableActivityRecognition (bool enable)=0
 Enables automatic device activity recognition. More...
 
virtual bool isActivityRecognitionEnabled ()=0
 
virtual int32 getDeviceActivity ()=0
 Gets the most recently recognized device activity. More...
 
virtual bool isDeviceStationary ()=0
 Determines if device is stationary. More...
 
virtual void setTravelMode (int32 mode)=0
 Overrides currently applied travel mode. More...
 
virtual int32 getTravelMode ()=0
 Gets the most recently applied travel mode. More...
 
virtual void setEtaQueryMode (int32 mode)=0
 Determines when etas and routes should be queried for outgoing tickets. More...
 
virtual int32 getEtaQueryMode ()=0
 Gets the currently set eta/route query mode. More...
 
virtual GDirections queryDirections (const GLatLng &origin, const GLatLng &destination, int32 travelMode)=0
 Initiates a request for directions. 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

Controls the behavior of ETA/directions unit.

The functionality exposed by IDirectionsManager is enabled only when platform is responsible for calculting directions (GC::ETA_MODE_INTERNAL mode is set through IGlympse::setEtaMode()).

Member Function Documentation

virtual void Glympse::IDirectionsManager::enableActivityRecognition ( bool  enable)
pure virtual

Enables automatic device activity recognition.

The feature is disabled by default.

Supported platforms:

  • iOS 7.0+
  • Android 2.3+ with Google Play Services 4.x+
Note
This method does not trigger directions to be recalculated instantaneously. It only affects the behavior of activity recognition unit, which can in turn stimulate route update.
Activity recognition remains enabled only for the duration of sharing.
Parameters
enableFlag indicating whether activity recognition should be enabled.
virtual int32 Glympse::IDirectionsManager::getDeviceActivity ( )
pure virtual

Gets the most recently recognized device activity.

Returns
Current device activity, which will be one of the CC::ACTIVITY_* constants.
virtual int32 Glympse::IDirectionsManager::getEtaQueryMode ( )
pure virtual

Gets the currently set eta/route query mode.

Returns
Eta/route query mode, which will be one of the GC::ETA_QUERY_MODE_* constants.
virtual int32 Glympse::IDirectionsManager::getTravelMode ( )
pure virtual

Gets the most recently applied travel mode.

Returns
Travel mode, which will be one of the GC::TRAVEL_MODE_* constants.
virtual bool Glympse::IDirectionsManager::isActivityRecognitionEnabled ( )
pure virtual
Returns
true if automatic activity recognition is enabled.
virtual bool Glympse::IDirectionsManager::isDeviceStationary ( )
pure virtual

Determines if device is stationary.

Activity recognition must be enabled.

Returns
true if device is being held still.
virtual GDirections Glympse::IDirectionsManager::queryDirections ( const GLatLng origin,
const GLatLng destination,
int32  travelMode 
)
pure virtual

Initiates a request for directions.

A listener should be set on the returned Directions object to listen for the response.

Parameters
originStarting point for directions.
destinationEnding point for directions.
travelModeTravel Mode to be used for the directions. See GC::TRAVEL_MODE_*
Returns
Directions object with results. Set a listener on value to determine when results are ready. If the returned value is NULL, then there was an issue with the parameters and the query was not performed.
virtual void Glympse::IDirectionsManager::setEtaQueryMode ( int32  mode)
pure virtual

Determines when etas and routes should be queried for outgoing tickets.

Parameters
modeDesired query mode, one of the GC::ETA_QUERY_MODE_* constants.
virtual void Glympse::IDirectionsManager::setTravelMode ( int32  mode)
pure virtual

Overrides currently applied travel mode.

The mode can only be overridden if all of the following criteria are met:

The following travel modes are supported by this method:

Note
Calling this method causes routes to all destinations to be recalculated for all active tickets.
Parameters
modeTravel mode to be used for querying directions.

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