Class Jabber::Roster::RosterItem
In: lib/jabber4r/roster.rb
Parent: Object

The RosterItem class embodies another Jabber user‘s status (from the local user‘s perspective). RosterItems contain Jabber::Roster::RosterItem::Resource objects for each resource location a foreign user is accessing through.

Methods

[]   add   delete   each_resource   get_vcard   new   to_s  

Classes and Modules

Class Jabber::Roster::RosterItem::Resource

Attributes

group  [RW]  The group name for this account
jid  [RW]  The Jabber ID (Jabber::JID)
name  [RW]  The (nick)name of this account
roster  [R]  The Jabber::Roster instance
subscription  [RW]  The subscription type

Public Class methods

Constructs a RosterItem

roster:[Jabber::Roster] The roster instance
subscription:[String] The subscription type
name:[String] The (nick)name
group:[String=nil] The group this account belongs to

Public Instance methods

Retrieves a resource object

resourceName:[String] The name of the resource
return:[Jabber::Roster:RosterItem::Resource] The Resource instance

Adds a new resource to the Roster item and notifies listeners

resourceName:[String] The name of the resource
show:[String] How the resource is to be viewed
status:[String] The status message
return:[Jabber::Roster:RosterItem::Resource] The new Resource instance

Deletes a resource from this roster item and notifies listeners

resourceName:[String] The name of the resource
return:[Jabber::Roster:RosterItem::Resource] The deleted Resource

Iterates over the list of available resources

yield:|Jabber::Roster:RosterItem::Resource| The resource instance

Retrieves the VCard for this (RosterItem) account. This method blocks until the the vcard is returned.

return:[Jabber::VCard] The VCard object for this account

Dumps the roster item

return:[String] The roster item dumped as a String

[Validate]