Sha256: 73ef6ecfecf432f66a311d3a279087258569c9d16f03e172abc0a14da6bb76af

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 KB

Contents

# =XMPP4R - XMPP Library for Ruby
# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option.
# Website::http://xmpp4r.github.io

require 'xmpp4r/xmppelement'
require 'xmpp4r/pubsub/children/configuration'

module Jabber
  module PubSub
    ##
    # NodeConfig
    #
    # A <configure> XMPP element for pubsub nodes, see example 123 in
    # http://www.xmpp.org/extensions/xep-0060.html#owner-create-and-configure
    class NodeConfig < Configuration
      name_xmlns 'configure', NS_PUBSUB

      ##
      # Construct a <configure> element.
      # node:: [String] the node to configure
      # options:: [Hash] the configuration to apply
      def initialize(node = nil, options = nil)
        super()

        self.node = node
        self.options = options
      end

      private

      def form_type
        'http://jabber.org/protocol/pubsub#node_config'
      end
    end

    ##
    #
    # OwnerNodeConfig
    #
    # A <configure> stanza for 'Owner' use cases
    #
    # see example 125 in
    # http://www.xmpp.org/extensions/xep-0060.html#owner-configure-request
    class OwnerNodeConfig < NodeConfig
      name_xmlns 'configure', NS_PUBSUB + '#owner'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xmpp4r-0.5.6 lib/xmpp4r/pubsub/children/node_config.rb