All Classes Functions Variables Typedefs Friends Pages
List of all members
Glympse::IConfig Struct Referenceabstract

IConfig provides a way to configure behavior of Glympse API. More...

#include <IConfig.h>

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

Public Member Functions

Basic Properties

Setters and getters for the most commonly used properties.

virtual void setExpireOnArrival (int32 mode)=0
 Overrides default platform behaviour on arrival to the destination. More...
 
virtual int32 getExpireOnArrival ()=0
 Gets current expire on arrival mode. More...
 
virtual void setXoaProfile (const GPrimitive &profile)=0
 Sets profile for customizing XoA logic. More...
 
virtual GPrimitive getXoaProfile ()=0
 Gets current profile for customized XoA logic. More...
 
virtual void allowLocationSharing (bool allow)=0
 Enables location sharing. More...
 
virtual bool isSharingLocation ()=0
 Checks whether location sharing is enabled.
 
virtual void allowSpeedSharing (bool allow)=0
 Enables speed sharing. More...
 
virtual bool isSharingSpeed ()=0
 Checks whether speed sharing is enabled.
 
virtual void setAutoWatchPublicGroup (bool watch)=0
 Enables watching public group automatically after sending invite to it.
 
virtual bool isPublicGroupAutoWatched ()=0
 Check whether public group will be watched automatically after sending invite to it.
 
virtual void setTrackTrimmingEnabled (bool enabled)=0
 Enables automatic trimming of GTrack length.
 
virtual bool isTrackTrimmingEnabled ()=0
 Check whether automatic trimming of the length of a GTrack is enabled.
 
virtual int64 getTrackTrimLength ()=0
 Return length of time (in milliseconds) that tracks will be trimmined to. More...
 
virtual int64 getAccountCreationTime ()=0
 Returns the unix date at which the stored user account was created. More...
 
virtual int64 getInviteLifetime ()=0
 Returns amount of time during which invite can be decoded.
 
virtual int64 getMaximumTicketDuration ()=0
 Returns the maximum duration of a ticket in milliseconds. More...
 
virtual int32 getPostRatePeriod ()=0
 Returns the duration of transition period between "watched" and "not watched" states in milliseconds.
 
virtual int32 getMaximumNicknameLength ()=0
 Returns the maximum length of a user's nickname, in characters. More...
 
virtual GString getDeviceId ()=0
 Returns Glympse specific device ID. More...
 
virtual bool setDirectionsProvider (const GPrimitive &provider)=0
 Overrides default directions provider configuration (for directions calculated on sender side).
 
virtual GPrimitive getDirectionsProvider ()=0
 Returns directions provider configuration.
 
virtual void setCardsEnabled (bool enabled)=0
 Sets whether card handling should be enabled.
 
virtual bool areCardsEnabled ()=0
 Returns if cards are enabled.
 
virtual void setPoisEnabled (bool enabled)=0
 Sets whether POI handling should be enabled.
 
virtual bool arePoisEnabled ()=0
 Returns if POIs are enabled.
 
Advanced Section

Advanced controls for configuration management.

virtual GPrimitive getContents ()=0
 Provides access to raw collection of all configurable properties. More...
 
virtual void save ()=0
 Saves in-memory representation of platform configuration to persistent storage.
 
Debug Section

Tools for manipulating debug settings.

virtual void setDebug (bool debug)=0
 Enables debug mode. More...
 
virtual bool isDebug ()=0
 Checks whether debug mode is enabled.
 
- 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

IConfig provides a way to configure behavior of Glympse API.

All settings are persisted locally. So you can only set it once.

Member Function Documentation

virtual void Glympse::IConfig::allowLocationSharing ( bool  allow)
pure virtual

Enables location sharing.

This feature is enabled by default. In practice, this option does not affect anything except location updates. Users will still be able to send tickets even if location sharing is disabled.

virtual void Glympse::IConfig::allowSpeedSharing ( bool  allow)
pure virtual

Enables speed sharing.

This feature is enabled by default. In practice, this option does not affect anything except speed property of outgoing locations.

virtual int64 Glympse::IConfig::getAccountCreationTime ( )
pure virtual

Returns the unix date at which the stored user account was created.

This method may return 0 if the value has not been set by the server.

virtual GPrimitive Glympse::IConfig::getContents ( )
pure virtual

Provides access to raw collection of all configurable properties.

Returned object provides read/write access to the collection. Platform maintains and relies on very specific structure of the data stored in this collection. Host application is not allowed neither to remove nore to make any changes to existing properties.

Host application is allowed to add its own section as it is shown below. /ROOT /app

Made changes do not get persisted right away. save() method is exposed to host application for the purpose of saving changes on demand.

Returns
GPrimitive representation of underlying storage.
virtual GString Glympse::IConfig::getDeviceId ( )
pure virtual

Returns Glympse specific device ID.

This value is associated with the device, user account and application bundle lifetime. The value changes if

  • user account is wiped;
  • application is uninstalled.
virtual int32 Glympse::IConfig::getExpireOnArrival ( )
pure virtual

Gets current expire on arrival mode.

Returns
Returns current mode.
virtual int32 Glympse::IConfig::getMaximumNicknameLength ( )
pure virtual

Returns the maximum length of a user's nickname, in characters.

Longer nicknames will be truncated to this number of characters.

virtual int64 Glympse::IConfig::getMaximumTicketDuration ( )
pure virtual

Returns the maximum duration of a ticket in milliseconds.

Tickets created with a duration in excess of this value will fail. Tickets modified with a duration in excess of this value will be capped at this maximum ticket duration.

virtual int64 Glympse::IConfig::getTrackTrimLength ( )
pure virtual

Return length of time (in milliseconds) that tracks will be trimmined to.

This value is affected by wether normal track trimming is enabled or not.

virtual GPrimitive Glympse::IConfig::getXoaProfile ( )
pure virtual

Gets current profile for customized XoA logic.

Returns
Returns GPrimitive containing configuration values for customized XoA.
virtual void Glympse::IConfig::setDebug ( bool  debug)
pure virtual

Enables debug mode.

Most debugging features will not be enabled right away. It is required to restart platform to leverage advantages of debug mode.

virtual void Glympse::IConfig::setExpireOnArrival ( int32  mode)
pure virtual

Overrides default platform behaviour on arrival to the destination.

This feature is only applied to outgoing tickets with destination specified. Glympse API is capable to notify ticket subscriber, that user is arrived to destination (via GE::TICKET_ARRIVED). There is also a chance to expire ticket automatically. See GC::EXPIRE_ON_ARRIVAL_* for more details.

You should consider referring this method, when there are no outgoing tickets. It is not strict requirement, but it allows to achieve best results.

Glympse API operates in GC::EXPIRE_ON_ARRIVAL_NOTIFY mode by default.

Parameters
modeNew expire on arrival mode.
virtual void Glympse::IConfig::setXoaProfile ( const GPrimitive profile)
pure virtual

Sets profile for customizing XoA logic.

Parameters
profileGPrimitive containing configuration values for XoA.

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