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

Main interface for manipulating Glympse Cards. More...

#include <ICardManager.h>

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

Public Member Functions

virtual GArray< GCard >::ptr getCards ()=0
 Get the list of cards. More...
 
virtual GCardType findCardTypeById (const GString &id)=0
 Get the card type for the given card type ID. More...
 
virtual GArray< GCardType >::ptr getCardTypes ()=0
 Gets the list of card types. More...
 
virtual bool createCard (const GCard &card)=0
 Create a card locally and on the server. More...
 
virtual bool joinCard (const GCard &card)=0
 Accept invite to joing card. More...
 
virtual GCard findCardByCardId (const GString &id)=0
 Get the card corresponding to a particular id. More...
 
virtual GCardMember findCardMemberByTicketId (const GString &ticketId, bool isSelf)=0
 Get the member sharing ticket with given ID. More...
 
virtual bool isSynced ()=0
 Determine if the cardmanager is synced with the server. More...
 
virtual int32 startTracking (const GCard &card)=0
 Start pulling updates for the card on regular basis. More...
 
virtual int32 stopTracking (const GCard &card)=0
 Stop pulling updates for the card. More...
 
virtual int32 getNumTrackers (const GCard &card)=0
 Returns a number of application components that are currently tracking the card. More...
 
virtual GEnumeration< GCard >::ptr getTracking ()=0
 Returns the subset of cards, whos information is pulled from server on regular basis.
 
virtual bool anyActiveTracked ()=0
 
- 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

Main interface for manipulating Glympse Cards.

Member Function Documentation

virtual bool Glympse::ICardManager::anyActiveTracked ( )
pure virtual
Returns
true if any of initialized cards are being tracked.
virtual bool Glympse::ICardManager::createCard ( const GCard card)
pure virtual

Create a card locally and on the server.

The current user will automatically be added to the card.

Parameters
cardThe card to create.
Returns
false if the card can't be added to the card list, otherwise true.
virtual GCard Glympse::ICardManager::findCardByCardId ( const GString id)
pure virtual

Get the card corresponding to a particular id.

Parameters
idId of the card to return
Returns
The card with the given id or NULL if not present.
virtual GCardMember Glympse::ICardManager::findCardMemberByTicketId ( const GString ticketId,
bool  isSelf 
)
pure virtual

Get the member sharing ticket with given ID.

Parameters
ticketIdId of the ticket shared to the card.
isSelfFlag indicating whether ticket is shared by self user.
Returns
The card member or NULL if not present.
virtual GCardType Glympse::ICardManager::findCardTypeById ( const GString id)
pure virtual

Get the card type for the given card type ID.

New card type is created and is registered on the list if specified ID is not found.

Parameters
idcard type identifier
Returns
Filled in card type structure
virtual GArray<GCard>::ptr Glympse::ICardManager::getCards ( )
pure virtual

Get the list of cards.

Returns
List of cards on the system.
virtual GArray<GCardType>::ptr Glympse::ICardManager::getCardTypes ( )
pure virtual

Gets the list of card types.

Returns
List of card types on the system.
virtual int32 Glympse::ICardManager::getNumTrackers ( const GCard card)
pure virtual

Returns a number of application components that are currently tracking the card.

Each of these components called startTracking(GUser) or startTrackingAll(), but has not called stopTracking(GUser) or stopTrackingAll() yet. In other words returned value says how many times stopTracking(GCard) needs to be called in order to stop pulling updates for this card.

Parameters
cardCard object that is potentially being tracked.
Returns
One of the following values is returned:
  • Positive integer value indicates how many components of host application are still tracking the card.
  • -1 means that the card is not tracked at the moment.
virtual bool Glympse::ICardManager::isSynced ( )
pure virtual

Determine if the cardmanager is synced with the server.

Returns
True if the card manager has synced with the server.
virtual bool Glympse::ICardManager::joinCard ( const GCard card)
pure virtual

Accept invite to joing card.

Parameters
cardPreview of a card to be accepted.
virtual int32 Glympse::ICardManager::startTracking ( const GCard card)
pure virtual

Start pulling updates for the card on regular basis.

The logic behind startTracking()/stopTracking() is back ended by reference counter (not a boolean flag), which allows multiple components of the same application to start and stop tracking independently.

Returns
A number of components currently tracking the card (including the one that has just made the call).
virtual int32 Glympse::ICardManager::stopTracking ( const GCard card)
pure virtual

Stop pulling updates for the card.

This actually decrements a counter associated with the particular card. Platform stops pulling updates, when the counter goes down to 0.

Returns
A number of components that are still tracking the card (excluding the one that has just made the call). One of the following values can also be returned:
  • 0 means that card manager was tracking the card before this method was invoked, and now the card is not tracked anymore.
  • -1 means that card was not tracked even before the method was invoked.

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