Class: Jabber::Bytestreams::IqSi

Inherits:
XMPPElement show all
Defined in:
lib/xmpp4r/bytestreams/iq/si.rb

Overview

Iq child ‘si’ for Stream-Initiation

Instance Method Summary collapse

Methods inherited from XMPPElement

class_for_name_xmlns, #clone, force_xmlns, force_xmlns?, import, name_xmlns, name_xmlns_for_class, #parent=, #set_xml_lang, #typed_add, #xml_lang, #xml_lang=

Methods inherited from REXML::Element

#==, #delete_elements, #each_elements, #first_element, #first_element_content, #first_element_text, #import, import, #replace_element_content, #replace_element_text, #typed_add

Constructor Details

#initialize(id = nil, profile = nil, mime_type = nil) ⇒ IqSi

Returns a new instance of IqSi.



19
20
21
22
23
24
25
# File 'lib/xmpp4r/bytestreams/iq/si.rb', line 19

def initialize(id=nil, profile=nil, mime_type=nil)
  super()

  self.id = id
  self.profile = profile
  self.mime_type = mime_type
end

Instance Method Details

#featureObject

<feature/> child

result
IqFeature


73
74
75
# File 'lib/xmpp4r/bytestreams/iq/si.rb', line 73

def feature
  first_element('feature')
end

#fileObject

<file/> child

result
IqSiFile


66
67
68
# File 'lib/xmpp4r/bytestreams/iq/si.rb', line 66

def file
  first_element('file')
end

#idObject

Session ID of this stream



29
30
31
# File 'lib/xmpp4r/bytestreams/iq/si.rb', line 29

def id
  attributes['id']
end

#id=(s) ⇒ Object

Set Session ID of this stream



35
36
37
# File 'lib/xmpp4r/bytestreams/iq/si.rb', line 35

def id=(s)
  attributes['id'] = s
end

#mime_typeObject

MIME type of this stream



41
42
43
# File 'lib/xmpp4r/bytestreams/iq/si.rb', line 41

def mime_type
  attributes['mime-type']
end

#mime_type=(s) ⇒ Object

Set MIME type of this stream



47
48
49
# File 'lib/xmpp4r/bytestreams/iq/si.rb', line 47

def mime_type=(s)
  attributes['mime-type'] = s
end

#profileObject

Stream profile, can indicate file-transfer



53
54
55
# File 'lib/xmpp4r/bytestreams/iq/si.rb', line 53

def profile
  attributes['profile']
end

#profile=(s) ⇒ Object

Set stream profile



59
60
61
# File 'lib/xmpp4r/bytestreams/iq/si.rb', line 59

def profile=(s)
  attributes['profile'] = s
end