Class for accessing <query/> elements with xmlns='jabber.org/protocol/bytestreams' in <iq/> stanzas.
Initialize such a <query/>
Session-ID
:tcp or :udp
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 20 def initialize(sid=nil, mode=nil) super() self.sid = sid self.mode = mode end
Get the text of the <activate/> child
or [nil]
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 68 def activate j = first_element_text('activate') j ? JID.new(j) : nil end
Set the text of the <activate/> child
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 76 def activate=(s) replace_element_text('activate', s ? s.to_s : nil) end
Transfer mode
: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
Set the transfer mode
: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
Session-ID
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 28 def sid attributes['sid'] end
Set Session-ID
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 34 def sid=(s) attributes['sid'] = s end
Get the <streamhost-used/> child
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 61 def streamhost_used first_element('streamhost-used') end