Class Jabber::DiscoIdentity
In: lib/xmpp4r/iq/query/discoinfo.rb
Parent: REXML::Element

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]