Class Jabber::XRoster
In: lib/xmpp4r/x/roster.rb
Parent: X
X XDelay XMuc XRoster XMucUser REXML::Element XRosterItem IqQuery XMLStanza IqVcard DiscoIdentity XMucUserItem DiscoItem Error RosterItem DiscoFeature IqQueryRoster IqQueryVersion IqQueryDiscoItems IqQueryDiscoInfo Message Presence Iq Singleton IdGenerator Connection Client Component Comparable JID RuntimeError ErrorException AuthenticationFailure RosterItem Stream StreamParser Roster Vcard Version lib/xmpp4r/authenticationfailure.rb lib/xmpp4r/iq/query/roster.rb lib/xmpp4r/idgenerator.rb lib/xmpp4r/iq/query/version.rb lib/xmpp4r/connection.rb lib/xmpp4r/x/mucuseritem.rb lib/xmpp4r/x/roster.rb lib/xmpp4r/iq.rb lib/xmpp4r/jid.rb lib/xmpp4r/iq/query.rb lib/xmpp4r/xmlstanza.rb lib/xmpp4r/x/delay.rb lib/xmpp4r/errorexception.rb lib/xmpp4r/client.rb lib/xmpp4r/stream.rb lib/xmpp4r/x/muc.rb lib/xmpp4r/streamparser.rb lib/xmpp4r/x.rb lib/xmpp4r/iq/vcard.rb lib/xmpp4r/iq/query/discoinfo.rb lib/xmpp4r/error.rb lib/xmpp4r/component.rb lib/xmpp4r/message.rb lib/xmpp4r/iq/query/discoitems.rb lib/xmpp4r/presence.rb lib/xmpp4r/helpers/roster.rb lib/xmpp4r/helpers/vcard.rb lib/xmpp4r/helpers/version.rb Helpers Jabber Module: Jabber

Implementation of JEP-0144 for <x xmlns=’jabber.org/protocol/rosterx’/> attached to <message/> stanzas

Should be backwards compatible to JEP-0093, as only action attribute of roster items are missing there. Pay attention to the namespace which is jabber:x:roster for JEP-0093!

Methods

new   typed_add  

Public Class methods

Initialize a new XRoster element

[Source]

    # File lib/xmpp4r/x/roster.rb, line 21
21:     def initialize
22:       super()
23:       add_namespace('http://jabber.org/protocol/rosterx')
24:     end

Public Instance methods

Add an element to the roster attachment

Converts <item/> elements to XRosterItem

[Source]

    # File lib/xmpp4r/x/roster.rb, line 30
30:     def typed_add(element)
31:       if element.kind_of?(REXML::Element) && (element.name == 'item')
32:         super(XRosterItem::new.import(element))
33:       else
34:         super(element)
35:       end
36:     end

[Validate]