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

Defines a single recipient of a Glympse. More...

#include <IInvite.h>

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

Public Member Functions

virtual int32 getType ()=0
 Gets the type of this recipient. More...
 
virtual GString getSubtype ()=0
 Gets the subtype of this recipient.
 
virtual GString getName ()=0
 Gets the display name of this recipient.
 
virtual GString getAddress ()=0
 Gets the email address or phone number of this recipient.
 
virtual void setBrand (const GString &brand)=0
 Sets brand parameter of the invite. More...
 
virtual void applyBrand (const GString &brand)=0
 This method is provided for convenience. More...
 
virtual GString getBrand ()=0
 Gets currently set brand for the invite or NULL, if brand is not set.
 
virtual void setVisible (bool visible)=0
 Overrides default invite visibility. More...
 
virtual bool isVisible ()=0
 Checks whether invite is visible. More...
 
virtual bool isCreateOnly ()=0
 Returns true it invite is supposed to be created by the platform but not delivered.
 
virtual void setCreateOnly (bool createOnly)=0
 Sets if the invite is supposed to be created by the platform but not delivered.
 
virtual GString getCode ()=0
 Gets the Glympse code that was sent to this recipient.
 
virtual GString getReference ()=0
 Gets the Glympse reference that should be used when accessing tickets through this invite.
 
virtual void setReference (const GString &reference)=0
 Sets the Glympse reference that should be used when accessing tickets through this invite.
 
virtual GString getUrl ()=0
 Gets the URL that was sent to this recipient.
 
virtual int32 getState ()=0
 Gets invite delivery state.
 
virtual int64 getCreatedTime ()=0
 Gets the epoch time (milliseconds since 1/1/1970) of when this invite was created.
 
virtual int64 getLastViewTime ()=0
 Gets the epoch time (milliseconds since 1/1/1970) of when this invite was last viewed.
 
virtual int32 getViewers ()=0
 Gets total amount of unique Glympse viewers. More...
 
virtual int32 getViewing ()=0
 Gets total amount of Glympse users currently viewing the Glympse through this invite code. More...
 
virtual GInviteViewers getViewerUsers ()=0
 Gets access to the collection of all distinct viewers of this invite. More...
 
virtual GInviteViewers getViewingUsers ()=0
 Gets access to the collection of currently active invite viewers. More...
 
virtual bool initiateClientSideSend ()=0
 The method should be invoked by client code, when the recipient state becomes GC::RECIPIENT_STATE_NEEDTOSEND. More...
 
virtual bool completeClientSideSend (bool succeeded)=0
 This method should be invoked, when invite delivery is complete, cancelled or failed. More...
 
virtual GString getText ()=0
 This method provides client with a message text to be sent to invite recipient. More...
 
virtual void setRequestTicket (const GTicket &requestTicket)=0
 This method attaches a request ticket to this ticket. More...
 
virtual GTicket getRequestTicket ()=0
 This method retrieves the request ticket attached to this ticket. More...
 
virtual GServerError getError ()=0
 This method returns error information received from the server in cases where the invite state is GC::INVITE_STATE_FAILED_TO_CREATE. More...
 
virtual GInvite clone ()=0
 Clones invite object including the following properties: More...
 
- Public Member Functions inherited from Glympse::IComparable
virtual bool isEqual (const GCommon &o)=0
 Compares this instance with the specified object and indicates if they are equal. 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

Defines a single recipient of a Glympse.

A recipient consists of a recipient type (email, SMS, etc.), an address string, a friendly name, the status of the invitation, and recipient viewing information.

Member Function Documentation

virtual void Glympse::IInvite::applyBrand ( const GString brand)
pure virtual

This method is provided for convenience.

It applies brand, only if it is not applied yet (getBrand() returns NULL).

virtual GInvite Glympse::IInvite::clone ( )
pure virtual

Clones invite object including the following properties:

  • type;
  • name;
  • address; (basically all properties required to deliver the invite).
Returns
Deep copy of the current invite object is returned.
virtual bool Glympse::IInvite::completeClientSideSend ( bool  succeeded)
pure virtual

This method should be invoked, when invite delivery is complete, cancelled or failed.

Recipient state is changed to either GC::RECIPIENT_STATE_SUCCEEDED or GC::RECIPIENT_STATE_FAILED_TO_SEND depending on the value of succeeded argument.

This method does not send any events to ticket subscribers, as the action is initiated by client.

Parameters
succeededIndicates invite delivery success.
Returns
true on success. The method returnes false, when it has no effect due to being called on inappropriate recipient.
virtual GServerError Glympse::IInvite::getError ( )
pure virtual

This method returns error information received from the server in cases where the invite state is GC::INVITE_STATE_FAILED_TO_CREATE.

Returns
Error details, or NULL if no details are available or no error occurred.
virtual GTicket Glympse::IInvite::getRequestTicket ( )
pure virtual

This method retrieves the request ticket attached to this ticket.

When generating a reply to a ticket use this function to see if the originator of the ticket has populated it with a preferred method of reply.

Returns
A ticket prepopulated with the preferred data to respond to this ticket.
virtual GString Glympse::IInvite::getText ( )
pure virtual

This method provides client with a message text to be sent to invite recipient.

The use of this function is optional, but it is highly recommended. However, when formating the message you must include invite URL (returned by getUrl method). It is not required to do, when using this method (formatForSMS).

Returns
Invite text including URL for viewing, user display name (optional) and message (optional). NULL is returned, if invite should not be delivered by client.
virtual int32 Glympse::IInvite::getType ( )
pure virtual

Gets the type of this recipient.

See GlympseConstants for complete list of all valid recipient types.

virtual int32 Glympse::IInvite::getViewers ( )
pure virtual

Gets total amount of unique Glympse viewers.

The following objects could act as unique Glympse viewers:

  • Browser instance (or set of browsers sharing the same cookies space);
  • Glympse application (or any other application build on top of Glympse Client API). This means that page refresh or even browser restart does not lead to increasing views count.

This count is forever increasing. It does not represent current amount of viewers. It is possible that nobody views Glympse at the moment, but the value returned by this method remains high. getLastViewTime() should be used to get adequate information on how long ago the invite was viewed last time.

virtual GInviteViewers Glympse::IInvite::getViewerUsers ( )
pure virtual

Gets access to the collection of all distinct viewers of this invite.

Returns
An object of GInviteViewers type or NULL if viewer tracking is not enabled.
virtual int32 Glympse::IInvite::getViewing ( )
pure virtual

Gets total amount of Glympse users currently viewing the Glympse through this invite code.

Returned valur goes up and down over time.

virtual GInviteViewers Glympse::IInvite::getViewingUsers ( )
pure virtual

Gets access to the collection of currently active invite viewers.

Returns
An object of GInviteViewers type or NULL if viewer tracking is not enabled.
virtual bool Glympse::IInvite::initiateClientSideSend ( )
pure virtual

The method should be invoked by client code, when the recipient state becomes GC::RECIPIENT_STATE_NEEDTOSEND.

Recipient state is changed to GC::RECIPIENT_STATE_CLIENTSENDING.

This method does not send any events to ticket subscribers, as the action is initiated by client.

Returns
true on success. The method returnes false, when it has no effect due to being called on inappropriate recipient.
virtual bool Glympse::IInvite::isVisible ( )
pure virtual

Checks whether invite is visible.

See setVisible() for more details.

virtual void Glympse::IInvite::setBrand ( const GString brand)
pure virtual

Sets brand parameter of the invite.

Brand belongs to API key and is used to customize invite appearance and viewing experience.

The method is optional. By default invite derives all its properties from API key.

This method makes effect only if invoked before invite is actually created.

virtual void Glympse::IInvite::setRequestTicket ( const GTicket requestTicket)
pure virtual

This method attaches a request ticket to this ticket.

This function should be used to attach a ticket representing the ticket which should be sent as a response to the ticket being attached to.

Parameters
requestTicketThe request ticket to be attached.
virtual void Glympse::IInvite::setVisible ( bool  visible)
pure virtual

Overrides default invite visibility.

Invite visibility flag indicates whether recipient information associated with this invite (invite type, name and address) is exposed through other invites belonging to the same outgoing ticket.

Most of these invites are sent to named groups ('!'-groups). In which case all other invitees see the list of groups mentioned on the same ticket. The idea behind public invites sent to named groups is similar to the concept of hashtags actively adopted in microblogging.

All invites are invisible by default.


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