class Jabber::Bytestreams::IqQueryBytestreams
Class for accessing <query/> elements with xmlns='jabber.org/protocol/bytestreams' in <iq/> stanzas.
Public Class Methods
new(sid=nil, mode=nil)
click to toggle source
Initialize such a <query/>
- sid
- String
-
Session-ID
- mode
- Symbol
-
:tcp or :udp
Calls superclass method
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 20 def initialize(sid=nil, mode=nil) super() self.sid = sid self.mode = mode end
Public Instance Methods
activate()
click to toggle source
Get the text of the <activate/> child
- result
- JID
-
or [nil]
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 68 def activate j = first_element_text('activate') j ? JID.new(j) : nil end
activate=(s)
click to toggle source
Set the text of the <activate/> child
- s
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 76 def activate=(s) replace_element_text('activate', s ? s.to_s : nil) end
mode()
click to toggle source
Transfer mode
- result
-
:tcp or :udp
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 41 def mode case attributes['mode'] when 'udp' then :udp else :tcp end end
mode=(m)
click to toggle source
Set the transfer mode
- m
-
:tcp or :udp
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 51 def mode=(m) case m when :udp then attributes['mode'] = 'udp' else attributes['mode'] = 'tcp' end end
sid()
click to toggle source
Session-ID
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 28 def sid attributes['sid'] end
sid=(s)
click to toggle source
Set Session-ID
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 34 def sid=(s) attributes['sid'] = s end
streamhost_used()
click to toggle source
Get the <streamhost-used/> child
- result
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 61 def streamhost_used first_element('streamhost-used') end