Class Jabber::Discovery::Identity
In: lib/xmpp4r/discovery/iq/discoinfo.rb
Parent: REXML::Element
XMLStanza Message Presence Iq REXML::Element X IqQuery Error StreamHost IqSiFileRange IqSiFile StreamHostUsed IqSi XRosterItem RosterItem IqFeature XMUCUserItem XMUCUserInvite Feature Identity Item XDataField XDataReported XDataTitle XDataInstructions IqVcard Singleton IdGenerator Connection Client Component Comparable JID RuntimeError ErrorException AuthenticationFailure SOCKS5Error Stream SOCKS5Bytestreams SOCKS5BytestreamsTarget SOCKS5BytestreamsInitiator SOCKS5BytestreamsServerStreamHost TCPSocket SOCKS5Socket IqQuery IqQueryBytestreams IqQueryVersion IqQueryRoster IqQueryDiscoItems IqQueryDiscoInfo IBB IBBTarget IBBInitiator Responder SimpleResponder X XRoster XMUCUser XMUC XDelay XData MUCClient SimpleMUCClient Base DigestMD5 Plain FileSource StreamParser SOCKS5BytestreamsPeer SOCKS5BytestreamsServer IBBQueueItem Helper MUCBrowser Helper Helper lib/xmpp4r/authenticationfailure.rb lib/xmpp4r/idgenerator.rb lib/xmpp4r/connection.rb lib/xmpp4r/iq.rb lib/xmpp4r/jid.rb lib/xmpp4r/xmlstanza.rb lib/xmpp4r/errorexception.rb lib/xmpp4r/stream.rb lib/xmpp4r/client.rb lib/xmpp4r/streamparser.rb lib/xmpp4r/x.rb lib/xmpp4r/error.rb lib/xmpp4r/component.rb lib/xmpp4r/query.rb lib/xmpp4r/message.rb lib/xmpp4r/presence.rb lib/xmpp4r/bytestreams/helper/ibb/initiator.rb lib/xmpp4r/bytestreams/iq/si.rb lib/xmpp4r/bytestreams/iq/bytestreams.rb lib/xmpp4r/bytestreams/helper/socks5bytestreams/base.rb lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb lib/xmpp4r/bytestreams/helper/socks5bytestreams/server.rb lib/xmpp4r/bytestreams/helper/socks5bytestreams/socks5.rb lib/xmpp4r/bytestreams/helper/socks5bytestreams/initiator.rb lib/xmpp4r/bytestreams/helper/ibb/base.rb lib/xmpp4r/bytestreams/helper/ibb/target.rb Bytestreams lib/xmpp4r/version/iq/version.rb lib/xmpp4r/version/helper/responder.rb lib/xmpp4r/version/helper/simpleresponder.rb Version lib/xmpp4r/roster/helper/roster.rb lib/xmpp4r/roster/iq/roster.rb lib/xmpp4r/roster/x/roster.rb Roster lib/xmpp4r/feature_negotiation/iq/feature.rb FeatureNegotiation lib/xmpp4r/muc/x/muc.rb lib/xmpp4r/muc/helper/mucclient.rb lib/xmpp4r/muc/x/mucuseritem.rb lib/xmpp4r/muc/helper/mucbrowser.rb lib/xmpp4r/muc/x/mucuserinvite.rb lib/xmpp4r/muc/helper/simplemucclient.rb MUC lib/xmpp4r/sasl.rb SASL lib/xmpp4r/delay/x/delay.rb Delay lib/xmpp4r/bytestreams/helper/filetransfer.rb TransferSource FileTransfer lib/xmpp4r/discovery/iq/discoinfo.rb lib/xmpp4r/discovery/iq/discoitems.rb Discovery lib/xmpp4r/dataforms/x/data.rb Dataforms lib/xmpp4r/vcard/helper/vcard.rb lib/xmpp4r/vcard/iq/vcard.rb Vcard 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 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 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

Public Instance methods

Get the identity’s category or nil

result:[String]

[Source]

     # 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]

[Source]

     # 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]

[Source]

     # File lib/xmpp4r/discovery/iq/discoinfo.rb, line 143
143:       def iname
144:         attributes['name']
145:       end

Set the identity’s name

val:[String]

[Source]

     # 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]

[Source]

     # 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]

[Source]

     # 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]

[Source]

     # 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]

[Source]

     # 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]

[Source]

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

[Validate]