| Class | Jabber::Discovery::Identity |
| In: |
lib/xmpp4r/discovery/iq/discoinfo.rb
|
| Parent: | REXML::Element |
Service Discovery identity to add() to IqQueryDiscoInfo
Please note that JEP 0030 requires both category and type to occur
Initialize a new Identity
| category: | [String] Initial category or nil |
| iname: | [String] Initial identity name or nil |
| type: | [String] Initial type or nil |
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 103
103: def initialize(category=nil, iname=nil, type=nil)
104: super('identity')
105: set_category(category)
106: set_iname(iname)
107: set_type(type)
108: end
Get the identity’s category or nil
| result: | [String] |
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 113
113: def category
114: attributes['category']
115: 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] |
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 125
125: def category=(val)
126: attributes['category'] = val
127: 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] |
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 143
143: def iname
144: attributes['name']
145: end
Set the identity’s name
| val: | [String] |
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 150
150: def iname=(val)
151: attributes['name'] = val
152: end
Set the identity’s category (chaining-friendly)
| val: | [String] |
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 132
132: def set_category(val)
133: self.category = val
134: self
135: end
Set the identity’s name (chaining-friendly)
| val: | [String] |
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 157
157: def set_iname(val)
158: self.iname = val
159: self
160: end
Set the identity’s type (chaining-friendly)
| val: | [String] |
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 180
180: def set_type(val)
181: self.type = val
182: self
183: end
Get the identity’s type or nil
| result: | [String] |
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 165
165: def type
166: attributes['type']
167: end
Set the identity’s type (see www.jabber.org/registrar/disco-categories.html)
| val: | [String] |
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 173
173: def type=(val)
174: attributes['type'] = val
175: end