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

Exposes basic properties and a state of a card. More...

#include <ICard.h>

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

Public Member Functions

virtual GString getId ()=0
 Read only access functions. More...
 
virtual GString getTypeId ()=0
 Get the type identifier. More...
 
virtual GString getName ()=0
 Gets the card name. More...
 
virtual int32 getState ()=0
 Get the card state. More...
 
virtual GCardMember getSelfMember ()=0
 Get the card member representing the self user. More...
 
virtual GArray< GCardMember >::ptr getMembers ()=0
 Get the list of card members including the self user. More...
 
virtual GCardMember findMemberByMemberId (const GString &id)=0
 Search the card member list for a member with the given id. More...
 
virtual GCardMember findMemberByUserId (const GString &id)=0
 Search the card member list for a member with the given user id. More...
 
virtual GCardInvite findInviteByInviteId (const GString &id)=0
 Search the card member list for an invite with the given id. More...
 
virtual GArray< GCardInvite >::ptr getInvites ()=0
 Get the list of card invites. More...
 
virtual GArray< GCardObject >::ptr getObjects ()=0
 Get the list of card objects. More...
 
virtual GCardObject findObjectByObjectId (const GString &objectId)=0
 Search the card object list for an object with the given id. More...
 
virtual GCardActivity getActivity ()=0
 Get the card's activity object. More...
 
virtual int64 getCreatedTime ()=0
 Get the time the card was created. More...
 
virtual int64 getLastModifiedTime ()=0
 Get the time the card was last modified. More...
 
virtual bool sendCardInvite (const GCardInvite &invite)=0
 Card Membership Section. More...
 
virtual bool deleteCardInvite (const GCardInvite &invite)=0
 Removes pending invite to join a card. More...
 
virtual bool acceptCardRequest (const GCardInvite &request)=0
 Accepts request to join a card. More...
 
virtual bool deleteMember (const GCardMember &member)=0
 Removes a member from the card. More...
 
virtual bool updateName (const GString &name)=0
 Card Modification functions. More...
 
virtual bool startSharing (const GCardTicket &cardTicket)=0
 Starts location sharing with the given card ticket. More...
 
virtual bool stopSharing ()=0
 Stops location sharing in this card. More...
 
virtual bool shouldReply (const GCardTicket &cardTicket)=0
 Determines whether location request received within the card needs to be replied to. More...
 
virtual bool startRequesting (const GCardTicket &cardTicket)=0
 Starts a location request with the given ticket. More...
 
virtual bool stopRequesting ()=0
 Stops the previous card location request.
 
virtual bool declineRequest (const GCardTicket &cardTicket)=0
 Declines a request to share location received from another card member.
 
virtual bool isAcknowledged ()=0
 Checks to see if the most recent event has been acknowledged.
 
virtual void addObject (const GCardObject &cardObject)=0
 Adds a GCardObject to this card's list of card objects.
 
virtual void removeObject (const GCardObject &cardObject)=0
 Removes a GCardObject from this card's list of card objects.
 
virtual void createEvent (const GString &eventType, const GPrimitive &data)=0
 Creates and adds a custom event to this card's activity list.
 
- 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

Exposes basic properties and a state of a card.

Host application does not create or modify card objects directly. Instead it uses methods exposed by IGlympseCards.

Member Function Documentation

virtual bool Glympse::ICard::acceptCardRequest ( const GCardInvite request)
pure virtual

Accepts request to join a card.

Returns
true if card was in a state that can accept requests. false otherwise.
virtual bool Glympse::ICard::deleteCardInvite ( const GCardInvite invite)
pure virtual

Removes pending invite to join a card.

Parameters
invitePending card invite to be removed.
Returns
true if card invite removal was scheduled successfully.
virtual bool Glympse::ICard::deleteMember ( const GCardMember member)
pure virtual

Removes a member from the card.

Can also be used to leave a card by passing the self member.

Parameters
CardMember to remove.
Returns
true if the member can be removed. false otherwise.
virtual GCardInvite Glympse::ICard::findInviteByInviteId ( const GString id)
pure virtual

Search the card member list for an invite with the given id.

Parameters
idThe id of the card invite to find.
Returns
CardInvite with the given id or null if none was found.
virtual GCardMember Glympse::ICard::findMemberByMemberId ( const GString id)
pure virtual

Search the card member list for a member with the given id.

Parameters
idThe id of the card member to find.
Returns
CardMember with the given id or null if none was found.
virtual GCardMember Glympse::ICard::findMemberByUserId ( const GString id)
pure virtual

Search the card member list for a member with the given user id.

Parameters
idThe id of the glympse user to find.
Returns
CardMember with the given id or null if none was found.
virtual GCardObject Glympse::ICard::findObjectByObjectId ( const GString objectId)
pure virtual

Search the card object list for an object with the given id.

Parameters
idThe id of the card object to find.
Returns
GCardObject with the given id or null if none was found.
virtual GCardActivity Glympse::ICard::getActivity ( )
pure virtual

Get the card's activity object.

Returns
CardActivity object for this card.
virtual int64 Glympse::ICard::getCreatedTime ( )
pure virtual

Get the time the card was created.

Returns
Card creation time in Epoch ms.
virtual GString Glympse::ICard::getId ( )
pure virtual

Read only access functions.

Get the unique card identifier.

Returns
Unique card identifier.
virtual GArray<GCardInvite>::ptr Glympse::ICard::getInvites ( )
pure virtual

Get the list of card invites.

Returns
CardInvite list
virtual int64 Glympse::ICard::getLastModifiedTime ( )
pure virtual

Get the time the card was last modified.

Returns
Card last modified time in Epoch ms.
virtual GArray<GCardMember>::ptr Glympse::ICard::getMembers ( )
pure virtual

Get the list of card members including the self user.

Returns
CardMember list including the self user.
virtual GString Glympse::ICard::getName ( )
pure virtual

Gets the card name.

Returns
Card Name
virtual GArray<GCardObject>::ptr Glympse::ICard::getObjects ( )
pure virtual

Get the list of card objects.

Returns
CardObject list
virtual GCardMember Glympse::ICard::getSelfMember ( )
pure virtual

Get the card member representing the self user.

Returns
CardMember representing the self user.
virtual int32 Glympse::ICard::getState ( )
pure virtual

Get the card state.

See GC::CARD_STATE_* for valid states.

Returns
The current card state.
virtual GString Glympse::ICard::getTypeId ( )
pure virtual

Get the type identifier.

Returns
Card type identifier.
virtual bool Glympse::ICard::sendCardInvite ( const GCardInvite invite)
pure virtual

Card Membership Section.

Send an invite to the card.

Parameters
inviteGCardInvite with fields set to indicate delivery.
Returns
true if card was in a state that can send the invite or buffer it. false otherwise.
virtual bool Glympse::ICard::shouldReply ( const GCardTicket cardTicket)
pure virtual

Determines whether location request received within the card needs to be replied to.

The decision is made based on whether self member shared location to the card since the moment when request had been generated.

Parameters
cardTicketCard location request received from another card member.
Returns
true if location request still needs to be addressed.
virtual bool Glympse::ICard::startRequesting ( const GCardTicket cardTicket)
pure virtual

Starts a location request with the given ticket.

Ticket should describe the information that will be filled in on the receiver's side when creating a ticket. i.e. destination, duration.

Parameters
cardTicketCard Ticket to use for requesting. Must have GTicket filled in.
virtual bool Glympse::ICard::startSharing ( const GCardTicket cardTicket)
pure virtual

Starts location sharing with the given card ticket.

Ticket should be created and passed in. This function will handle creating an invite, activating the ticket and sharing it into the card.

Parameters
cardTicketCard Ticket to use for sharing. Must have GTicket filled in.
requestTicketOriginal Card Ticket being used to reply. Can be null.
virtual bool Glympse::ICard::stopSharing ( )
pure virtual

Stops location sharing in this card.

If location sharing is not active or expired, this call does nothing.

virtual bool Glympse::ICard::updateName ( const GString name)
pure virtual

Card Modification functions.

Update a cards name.

Parameters
nameThe name of the card to be set.
Returns
true if the name of this card can be updated. false otherwise.

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