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

Service Discovery identity to add() to IqQueryDiscoInfo

Please note that JEP 0030 requires both category and type to occur

Methods

category   category=   iname   iname=   new   set_category   set_iname   set_type   type   type=  

Public Class methods

Initialize a new DiscoIdentity

category:[String] Initial category or nil
iname:[String] Initial identity name or nil
type:[String] Initial type or nil

[Source]

    # File lib/xmpp4r/iq/query/discoinfo.rb, line 84
84:     def initialize(category=nil, iname=nil, type=nil)
85:       super('identity')
86:       set_category(category)
87:       set_iname(iname)
88:       set_type(type)
89:     end

Public Instance methods

Get the identity’s category or nil

result:[String]

[Source]

    # File lib/xmpp4r/iq/query/discoinfo.rb, line 94
94:     def category
95:       attributes['category']
96:     end

Set the identity’s category

Service Discovery categories should be somewhat standardized by some registry, so clients may represent specific categories by specific icons… (see www.jabber.org/registrar/disco-categories.html)

val:[String]

[Source]

     # File lib/xmpp4r/iq/query/discoinfo.rb, line 106
106:     def category=(val)
107:       attributes['category'] = val
108:     end

Get the identity’s name or nil

This has been renamed from <name/> to "iname" here to keep REXML::Element#name accessible

result:[String]

[Source]

     # File lib/xmpp4r/iq/query/discoinfo.rb, line 124
124:     def iname
125:       attributes['name']
126:     end

Set the identity’s name

val:[String]

[Source]

     # File lib/xmpp4r/iq/query/discoinfo.rb, line 131
131:     def iname=(val)
132:       attributes['name'] = val
133:     end

Set the identity’s category (chaining-friendly)

val:[String]

[Source]

     # File lib/xmpp4r/iq/query/discoinfo.rb, line 113
113:     def set_category(val)
114:       self.category = val
115:       self
116:     end

Set the identity’s name (chaining-friendly)

val:[String]

[Source]

     # File lib/xmpp4r/iq/query/discoinfo.rb, line 138
138:     def set_iname(val)
139:       self.iname = val
140:       self
141:     end

Set the identity’s type (chaining-friendly)

val:[String]

[Source]

     # File lib/xmpp4r/iq/query/discoinfo.rb, line 161
161:     def set_type(val)
162:       self.type = val
163:       self
164:     end

Get the identity’s type or nil

result:[String]

[Source]

     # File lib/xmpp4r/iq/query/discoinfo.rb, line 146
146:     def type
147:       attributes['type']
148:     end

Set the identity’s type (see www.jabber.org/registrar/disco-categories.html)

val:[String]

[Source]

     # File lib/xmpp4r/iq/query/discoinfo.rb, line 154
154:     def type=(val)
155:       attributes['type'] = val
156:     end

[Validate]