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

Represents Glympse user on the system. More...

#include <IUser.h>

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

Public Member Functions

virtual GString getId ()=0
 Gets the internal user identifier of this user.
 
virtual bool isSelf ()=0
 
virtual GString getNickname ()=0
 Gets user nickname.
 
virtual GImage getAvatar ()=0
 Gets user avatar. More...
 
virtual GLocation getLocation ()=0
 Gets last known user location.
 
virtual GTicket getActive ()=0
 Gets active ticket for the user.
 
virtual GTicket getActiveStandalone ()=0
 Gets active standalone ticket.
 
virtual GArray< GTicket >::ptr getTickets ()=0
 Gets list of tickets for the user.
 
virtual GTicket findTicketByInviteCode (const GString &code)=0
 Gets the ITicket object that matches the given invite code. More...
 
virtual bool setNickname (const GString &nickname)=0
 Modifies nickname associated with self user profile. More...
 
virtual bool setAvatar (const GDrawable &avatar)=0
 Modifies avatar associated with self user profile. More...
 
virtual bool isUploadingAvatar ()=0
 Checks whether avatar is being uploaded at the moment. More...
 
virtual bool stopWatching ()=0
 Tells platform to stop watching all tickets received from this user. More...
 
Deprecated

Methods in this section are deprecated, and are not supposed to be called by host applications and will be removed in one of the next API versions.

virtual bool modify (const GString &nickname, const GDrawable &avatar)=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

Represents Glympse user on the system.

Member Function Documentation

virtual GTicket Glympse::IUser::findTicketByInviteCode ( const GString code)
pure virtual

Gets the ITicket object that matches the given invite code.

Parameters
codeInvite code of the ticket you would like to find.
Returns
The ITicket object that matches the given invite code, or NULL if the invite code was not found.
virtual GImage Glympse::IUser::getAvatar ( )
pure virtual

Gets user avatar.

This method never returns NULL. IImage contains no image, if avatar is not set.

virtual bool Glympse::IUser::isSelf ( )
pure virtual
Returns
true, if user represents self, false otherwise.
virtual bool Glympse::IUser::isUploadingAvatar ( )
pure virtual

Checks whether avatar is being uploaded at the moment.

Returns
true if platform is currently busy uploading new user avatar.
virtual bool Glympse::IUser::modify ( const GString nickname,
const GDrawable avatar 
)
pure virtual
Note
This method is deprecated as of Glympse API 2.6. Consider using setNickname() and setAvatar() instead.

Modifies nickname and/or avatar associated with self user profile. The operation can only be performed against self user (see isSelf()).

New nickname is synchronously propagated through the object model and becomes available through getNickname() right after modify() method completes with success. Avatar properties (new URL and drawable) become available through getAvatar() only upon receiving confirmation from server.

Only single avatar upload operation can be going on at a time. Subsequent calls to modify() will keep failing silently until previously scheduled operation completes. Use isUploadingAvatar() before calling modify() when passing new avatar drawable.

Parameters
nicknameNew user nickname or NULL if no changes are required.
avatarNew user avatar or NULL if no changes are required.
Returns
true if operation is scheduled successfully.
Deprecated:
This method is deprecated as of Glympse API 2.6.
virtual bool Glympse::IUser::setAvatar ( const GDrawable avatar)
pure virtual

Modifies avatar associated with self user profile.

The operation can only be performed against self user (see isSelf()).

Avatar properties (new URL and drawable) become available through getAvatar() only upon receiving confirmation from server.

Only single avatar upload operation can be going on at a time. Subsequent calls to modify() will keep failing silently until previously scheduled operation completes. Use isUploadingAvatar() before calling modify() when passing new avatar drawable.

Parameters
avatarNew user avatar.
Returns
true if operation is scheduled successfully.
virtual bool Glympse::IUser::setNickname ( const GString nickname)
pure virtual

Modifies nickname associated with self user profile.

The operation can only be performed against self user (see isSelf()).

New nickname is synchronously propagated through the object model and becomes available through getNickname() right after setNickname() method completes with success.

Parameters
nicknameNew user nickname.
Returns
true if operation is scheduled successfully.
virtual bool Glympse::IUser::stopWatching ( )
pure virtual

Tells platform to stop watching all tickets received from this user.

This also removes the user from the list (maintained by IUserManager). This method takes no effect, when invoked against self user.

Returns
true upon success.

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