Class Jabber::Bytestreams::IqSi
In: lib/xmpp4r/bytestreams/iq/si.rb
Parent: REXML::Element

Iq child ‘si’ for Stream-Initiation

Methods

feature   file   id   id=   import   mime_type   mime_type=   new   profile   profile=   typed_add  

Constants

PROFILE_FILETRANSFER = 'http://jabber.org/protocol/si/profile/file-transfer'

Public Class methods

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 25
25:       def IqSi.import(element)
26:         IqSi::new.import(element)
27:       end

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 16
16:       def initialize(id=nil, profile=nil, mime_type=nil)
17:         super('si')
18: 
19:         add_namespace 'http://jabber.org/protocol/si'
20:         self.id = id
21:         self.profile = profile
22:         self.mime_type = mime_type
23:       end

Public Instance methods

<feature/> child

result:[IqFeature]

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 85
85:       def feature
86:         first_element('feature')
87:       end

<file/> child

result:[IqSiFile]

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 78
78:       def file
79:         first_element('file')
80:       end

Session ID of this stream

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 41
41:       def id
42:         attributes['id']
43:       end

Set Session ID of this stream

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 47
47:       def id=(s)
48:         attributes['id'] = s
49:       end

MIME type of this stream

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 53
53:       def mime_type
54:         attributes['mime-type']
55:       end

Set MIME type of this stream

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 59
59:       def mime_type=(s)
60:         attributes['mime-type'] = s
61:       end

Stream profile, can indicate file-transfer

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 65
65:       def profile
66:         attributes['profile']
67:       end

Set stream profile

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 71
71:       def profile=(s)
72:         attributes['profile'] = s
73:       end

[Source]

    # File lib/xmpp4r/bytestreams/iq/si.rb, line 29
29:       def typed_add(element)
30:         if element.kind_of?(REXML::Element) and element.name == 'file'
31:           super IqSiFile.new.import(element)
32:         elsif element.kind_of?(REXML::Element) and element.name == 'feature'
33:           super FeatureNegotiation::IqFeature.new.import(element)
34:         else
35:           super element
36:         end
37:       end

[Validate]