Class Jabber::IqQueryDiscoInfo
In: lib/xmpp4r/iq/query/discoinfo.rb
Parent: IqQuery
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

Class for handling Service Discovery queries, info (JEP 0030)

This <query/> may contain multiple DiscoIdentity and DiscoFeature elements, describing the type and the supported namespaces of the service.

Methods

new   node   node=   set_node   typed_add  

Public Class methods

Create a new query with namespace jabber.org/protocol/disco#info

[Source]

    # File lib/xmpp4r/iq/query/discoinfo.rb, line 20
20:     def initialize
21:       super
22:       add_namespace('http://jabber.org/protocol/disco#info')
23:     end

Public Instance methods

Get the queried Service Discovery node or nil

See IqQueryDiscoItems#node for a small explanation of this.

[Source]

    # File lib/xmpp4r/iq/query/discoinfo.rb, line 51
51:     def node
52:       attributes['node']
53:     end

Get the queried Service Discovery node or nil

val:[String]

[Source]

    # File lib/xmpp4r/iq/query/discoinfo.rb, line 58
58:     def node=(val)
59:       attributes['node'] = val
60:     end

Get the queried Service Discovery node or nil (chaining-friendly)

val:[String]

[Source]

    # File lib/xmpp4r/iq/query/discoinfo.rb, line 66
66:     def set_node(val)
67:       self.node = val
68:       self
69:     end

Add a children element

Converts <identity/> elements to [DiscoIdentity] and <feature/> elements to [DiscoFeature]

[Source]

    # File lib/xmpp4r/iq/query/discoinfo.rb, line 30
30:     def typed_add(element)
31:       if element.kind_of?(REXML::Element)
32: 
33:         if element.name == 'identity'
34:           super(DiscoIdentity::new.import(element))
35:         elsif element.name == 'feature'
36:           super(DiscoFeature::new.import(element))
37:         else
38:           super(element)
39:         end
40: 
41:       else
42:         super(element)
43:       end
44:     end

[Validate]