Class Jabber::Discovery::Identity
In: lib/xmpp4r/discovery/iq/discoinfo.rb
Parent: XMPPElement

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 Identity

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

[Source]

    # File lib/xmpp4r/discovery/iq/discoinfo.rb, line 88
88:       def initialize(category=nil, iname=nil, type=nil)
89:         super()
90:         set_category(category)
91:         set_iname(iname)
92:         set_type(type)
93:       end

Public Instance methods

Get the identity‘s category or nil

result:[String]

[Source]

     # File lib/xmpp4r/discovery/iq/discoinfo.rb, line 98
 98:       def category
 99:         attributes['category']
100:       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/discovery/iq/discoinfo.rb, line 110
110:       def category=(val)
111:         attributes['category'] = val
112:       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/discovery/iq/discoinfo.rb, line 128
128:       def iname
129:         attributes['name']
130:       end

Set the identity‘s name

val:[String]

[Source]

     # File lib/xmpp4r/discovery/iq/discoinfo.rb, line 135
135:       def iname=(val)
136:         attributes['name'] = val
137:       end

Set the identity‘s category (chaining-friendly)

val:[String]

[Source]

     # File lib/xmpp4r/discovery/iq/discoinfo.rb, line 117
117:       def set_category(val)
118:         self.category = val
119:         self
120:       end

Set the identity‘s name (chaining-friendly)

val:[String]

[Source]

     # File lib/xmpp4r/discovery/iq/discoinfo.rb, line 142
142:       def set_iname(val)
143:         self.iname = val
144:         self
145:       end

Set the identity‘s type (chaining-friendly)

val:[String]

[Source]

     # File lib/xmpp4r/discovery/iq/discoinfo.rb, line 165
165:       def set_type(val)
166:         self.type = val
167:         self
168:       end

Get the identity‘s type or nil

result:[String]

[Source]

     # File lib/xmpp4r/discovery/iq/discoinfo.rb, line 150
150:       def type
151:         attributes['type']
152:       end

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

val:[String]

[Source]

     # File lib/xmpp4r/discovery/iq/discoinfo.rb, line 158
158:       def type=(val)
159:         attributes['type'] = val
160:       end

[Validate]