interreality.org [VOS]
[Home] [About]
[Screenshots]
[Download]
[News]
[Community]
[Documentation] [Manual]
[Bugs & Requests] [Wiki]

VOS::Avatar Class Reference
[libmetaobject_misc]

#include <vos/metaobjects/misc/avatar.hh>

Inheritance diagram for VOS::Avatar:

VOS::MetaObject VOS::Vobject VOS::Dispatchable VUtil::RefCounted List of all members.

Detailed Description

Indicates that this object represents a human or automated agent.

It is the representative of the human user or automated agent. In a 3D environment, will usually be used with an A3DL::Object3D type (such as A3DL::Model) It will also often be used with a Talkative metaobject.

Definition at line 42 of file avatar.hh.

Public Member Functions

Static Public Member Functions

Static Public Attributes

Presence Codes
This is a simple schema, that mirrors the four presence codes in the Jabber IM system. In the future there may be more. If you think something should be added, let us know.


Constructor & Destructor Documentation

VOS::Avatar::Avatar ( VobjectBase superobject  ) 

For internal use only.


Member Function Documentation

void VOS::Avatar::addInfoListener ( PropertyListener listener  ) 

Add PropertyListener to misc:info property.

void VOS::Avatar::addNickListener ( PropertyListener listener  ) 

Add a PropertyListener to the misc:nick property.

void VOS::Avatar::addPresenceListener ( PropertyListener listener  ) 

Add a PropertyListener to the misc:presence_code property.

std::string VOS::Avatar::getFullname (  ) 

Get the value of misc:fullname property (A text string containing the full name of the user or agent.

).

std::string VOS::Avatar::getFullnameDatatype (  ) 

Get the datatype of misc:fullname property.

VUtil::vRef<Property> VOS::Avatar::getFullnameObj (  ) 

Get the fullname Property object.

std::string VOS::Avatar::getInfo (  ) 

Get the value of misc:info property.

This is for More information about the user or agent, for example a FOAF document, a picture, a short biographical text, a URL to a web page or email address, or whatever. (Use the datatype of the property to distinguish; I recommend checking out FOAF)

Todo:
support multiple "info" properties.

std::string VOS::Avatar::getInfoDatatype (  ) 

Get the datatype of misc:info property.

VUtil::vRef<Property> VOS::Avatar::getInfoObj (  ) 

Get info Property object.

int VOS::Avatar::getLocalTimezone (  ) 

Get this user's local timezone's offset from GMT (UTC).

See also:
setLocalTimezone

std::string VOS::Avatar::getNick (  ) 

Get the value of avatar:nick property (A text string containing a short name that can be used to identify this avatar.

If this property is omitted, the object's contextual name may be used.).

VUtil::vRef<Property> VOS::Avatar::getNickObj (  ) 

Get Property object for nick.

unsigned short VOS::Avatar::getPresence (  ) 

Get a numeric code that represents the value of misc:presence_code property (A text std::string indicating the presence/status/availability of the user or agent.

) The returned value will match one of the constants Avatar::AVAILABLE Avatar::AWAY, Avatar::EXTENDEDAWAY, or Avatar::BUSY.

std::string VOS::Avatar::getPresenceDescription (  ) 

Get the value of misc:presence_description property (Text describing the presence/status/availability of the user or agent in a more free-form manner (e.g.

"Went to find more coffee. Back in a bit.")).

std::string VOS::Avatar::getPresenceDescriptionDatatype (  ) 

Get the datatype of misc:presence_description property.

VUtil::vRef<Property> VOS::Avatar::getPresenceDescriptionObj (  ) 

Get info Property object.

VUtil::vRef<Property> VOS::Avatar::getPresenceObj (  ) 

Get info Property object.

VUtil::vRef<Hypercard> VOS::Avatar::getSelectedHypercard (  ) 

Get "selected" hypercard.

See also:
setSelectedObj

VUtil::vRef<Vobject> VOS::Avatar::getSelectedObj (  ) 

Get "selected" object.

See also:
setSelectedObj

std::string VOS::Avatar::getUserId (  ) 

Get the user identifier (typically "user@host") This can be used by specialized applications to work with other external programs in a Unix or Unix-like network.

Basically not generally useful for much and will rarely be used :)

Exceptions:
NoSuchObjectError No user-id property exitst
bad_cast user-id subobject is not a Property.

const std::string VOS::Avatar::getVOSType (  )  [virtual]

Return type string ("misc:avatar").

Reimplemented from VOS::MetaObject.

static MetaObject* VOS::Avatar::new_Avatar ( VobjectBase s,
const std::string &  t 
) [static]

For internal use only.

void VOS::Avatar::removeInfoListener ( PropertyListener listener  ) 

Remove a PropertyListener from misc:info property.

void VOS::Avatar::removeNickListener ( PropertyListener listener  ) 

Remove a PropertyListener from the misc:nick property.

void VOS::Avatar::removePresenceListener ( PropertyListener listener  ) 

Remove a PropertyListener from the misc:presence_code property.

void VOS::Avatar::setFullname ( const std::string &  value,
const std::string &  datatype = "?" 
)

Set misc:fullname property.

Parameters:
value The new value
datatype The new datatype: if omitted, then the existing datatype will be preserved

void VOS::Avatar::setFullnameObj ( Property obj  ) 

Set the fullname object.

void VOS::Avatar::setInfo ( const std::string &  value,
const std::string &  datatype = "?" 
)

Set misc:info property.

Parameters:
value The new value
datatype The new datatype: if omitted, then the existing datatype will be preserved.

void VOS::Avatar::setInfoObj ( Property obj  ) 

Set info Property object.

void VOS::Avatar::setLocalTimezone ( int  tz  ) 

Set this user's local timezone's offset from GMT (UTC).

E.g. if you are in GMT use 0. If you are in US Eastern standard without daylight savings, use -5, etc.

void VOS::Avatar::setNick ( const std::string &  value  ) 

Set misc:nick property.

Parameters:
value The new value. Should be a short string of plain text.

void VOS::Avatar::setNickObj ( Property obj  ) 

Set Property object for nick.

void VOS::Avatar::setPresence ( unsigned short  code  ) 

Set misc:presence_code property according to the parameter code.

Parameters:
code The new numeric code. See above for list of constants.

void VOS::Avatar::setPresenceDescription ( const std::string &  value,
const std::string &  datatype = "?" 
)

Set misc:presence_description property.

Parameters:
value The new value
datatype The new datatype: if omitted, then the existing datatype will be preserved.

void VOS::Avatar::setPresenceDescriptionObj ( Property obj  ) 

Set info Property object.

void VOS::Avatar::setPresenceObj ( Property obj  ) 

Set info Property object.

void VOS::Avatar::setSelectedHypercard ( Hypercard hc  ) 

Set "selected" hypercard.

See also:
setSelectedObj

void VOS::Avatar::setSelectedObj ( Vobject obj  ) 

Set object currently "selected" by this avatar.

This can be used as a pointer or indicator to an object of interest, which can therefore be used by other users or applications.

Parameters:
obj The selected object. If 0, then any existing object is removed. Otherwise: If there is no "misc:selected-object" child, then a new Hypercard will be created linking to 'obj' and added. If such a child does exist and is a hypercard, then its link will be replaced with obj.

void VOS::Avatar::setUserId ( const std::string &  userid  ) 

Set the user identifier (typically "user@host").

This can be used by specialized applications to work with other external programs in a Unix or Unix-like network. Basically not generally useful for much and will rarely be used.


Member Data Documentation

const unsigned short VOS::Avatar::AVAILABLE [static]

for "chat"

Definition at line 54 of file avatar.hh.

const unsigned short VOS::Avatar::AWAY [static]

for "away"

Definition at line 55 of file avatar.hh.

const unsigned short VOS::Avatar::BUSY [static]

for "dnd"

Definition at line 57 of file avatar.hh.

const unsigned short VOS::Avatar::EXTENDEDAWAY [static]

for "xa"

Definition at line 56 of file avatar.hh.


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