### Home Classes Methods

### In Files

- lib/xmpp4r/command/iq/command.rb

### Parent

Iq

### Methods

- ::new
- #action
- #action=
- #actions
- #node
- #node=
- #sessionid
- #sessionid=
- #set_action
- #set_node
- #set_sessionid
- #set_status
- #status
- #status=

### Files

- CHANGELOG
- COPYING
- LICENSE
- README.rdoc
- README_ruby19.txt

### Class/Module Index

Quicksearch

- Jabber
- Jabber::ArgumentError
- Jabber::Bytestreams
- Jabber::Bytestreams::IBB
- Jabber::Bytestreams::IBBInitiator
- Jabber::Bytestreams::IBBQueueItem
- Jabber::Bytestreams::IBBTarget
- Jabber::Bytestreams::IqQueryBytestreams
- Jabber::Bytestreams::IqSi
- Jabber::Bytestreams::IqSiFile
- Jabber::Bytestreams::IqSiFileRange
- Jabber::Bytestreams::SOCKS5Bytestreams
- Jabber::Bytestreams::SOCKS5BytestreamsInitiator
- Jabber::Bytestreams::SOCKS5BytestreamsPeer
- Jabber::Bytestreams::SOCKS5BytestreamsServer
- Jabber::Bytestreams::SOCKS5BytestreamsServerStreamHost
- Jabber::Bytestreams::SOCKS5BytestreamsTarget
- Jabber::Bytestreams::SOCKS5Socket
- Jabber::Bytestreams::StreamHost
- Jabber::Bytestreams::StreamHostUsed
- Jabber::Callback
- Jabber::CallbackList
- Jabber::Caps
- Jabber::Caps::C
- Jabber::Caps::Helper
- Jabber::Client
- Jabber::ClientAuthenticationFailure
- Jabber::Command
- Jabber::Command::IqCommand
- Jabber::Command::Responder
- Jabber::Component
- Jabber::ComponentAuthenticationFailure
- Jabber::Connection
- Jabber::Connection::SSLSocketUTF8
- Jabber::Dataforms
- Jabber::Dataforms::XData
- Jabber::Dataforms::XDataField
- Jabber::Dataforms::XDataInstructions
- Jabber::Dataforms::XDataReported
- Jabber::Dataforms::XDataTitle
- Jabber::Delay
- Jabber::Delay::XDelay
- Jabber::Discovery
- Jabber::Discovery::Feature
- Jabber::Discovery::Helper
- Jabber::Discovery::Identity
- Jabber::Discovery::IqQueryDiscoInfo
- Jabber::Discovery::IqQueryDiscoItems
- Jabber::Discovery::Item
- Jabber::Discovery::Responder
- Jabber::EntityTime
- Jabber::EntityTime::IqTime
- Jabber::EntityTime::Responder
- Jabber::ErrorResponse
- Jabber::FeatureNegotiation
- Jabber::FeatureNegotiation::IqFeature
- Jabber::FileTransfer
- Jabber::FileTransfer::FileSource
- Jabber::FileTransfer::Helper
- Jabber::FileTransfer::TransferSource
- Jabber::Framework
- Jabber::Framework::Base
- Jabber::Framework::Bot
- Jabber::HTTPBinding
- Jabber::HTTPBinding::Client
- Jabber::IdGenerator
- Jabber::InvalidChatState
- Jabber::Iq
- Jabber::IqQuery
- Jabber::JID
- Jabber::JabberError
- Jabber::LastActivity
- Jabber::LastActivity::Helper
- Jabber::LastActivity::IqQueryLastActivity
- Jabber::MUC
- Jabber::MUC::IqQueryMUCAdmin
- Jabber::MUC::IqQueryMUCAdminItem
- Jabber::MUC::IqQueryMUCOwner
- Jabber::MUC::MUCBrowser
- Jabber::MUC::MUCClient
- Jabber::MUC::SimpleMUCClient
- Jabber::MUC::UserItem
- Jabber::MUC::XMUC
- Jabber::MUC::XMUCUser
- Jabber::MUC::XMUCUserInvite
- Jabber::MUC::XMUCUserItem
- Jabber::Message
- Jabber::NoNameXmlnsRegistered
- Jabber::NotConnected
- Jabber::Observable
- Jabber::Observable::Contact
- Jabber::Observable::PubSub
- Jabber::Observable::PubSub::AlreadySet
- Jabber::Observable::PubSub::NoService
- Jabber::Observable::Subscriptions
- Jabber::Presence
- Jabber::PubSub
- Jabber::PubSub::Configuration
- Jabber::PubSub::Event
- Jabber::PubSub::EventItem
- Jabber::PubSub::EventItems
- Jabber::PubSub::IqPubSub
- Jabber::PubSub::IqPubSubOwner
- Jabber::PubSub::Item
- Jabber::PubSub::Items
- Jabber::PubSub::NodeBrowser
- Jabber::PubSub::NodeConfig
- Jabber::PubSub::NodeHelper
- Jabber::PubSub::OAuthPubSubStreamHelper
- Jabber::PubSub::OAuthServiceHelper
- Jabber::PubSub::OwnerNodeConfig
- Jabber::PubSub::Publish
- Jabber::PubSub::Retract
- Jabber::PubSub::ServiceHelper
- Jabber::PubSub::Subscription
- Jabber::PubSub::SubscriptionConfig
- Jabber::PubSub::Unsubscribe
- Jabber::RPC
- Jabber::RPC::Client
- Jabber::RPC::IqQueryRPC
- Jabber::RPC::Server
- Jabber::Reliable
- Jabber::Reliable::Connection
- Jabber::Reliable::Listener
- Jabber::Roster
- Jabber::Roster::Helper
- Jabber::Roster::Helper::RosterItem
- Jabber::Roster::IqQueryRoster
- Jabber::Roster::RosterItem
- Jabber::Roster::RosterX
- Jabber::Roster::RosterXItem
- Jabber::Roster::XRoster
- Jabber::Roster::XRosterItem
- Jabber::SASL
- Jabber::SASL::Anonymous
- Jabber::SASL::Base
- Jabber::SASL::DigestMD5
- Jabber::SASL::Plain
- Jabber::SOCKS5Error
- Jabber::Semaphore
- Jabber::ServerDisconnected
- Jabber::Stream
- Jabber::Stream::ThreadBlock
- Jabber::StreamParser
- Jabber::Test
- Jabber::Test::ListenerMocker
- Jabber::UserLocation
- Jabber::UserLocation::Helper
- Jabber::UserLocation::Location
- Jabber::UserTune
- Jabber::UserTune::Helper
- Jabber::UserTune::Tune
- Jabber::Vcard
- Jabber::Vcard::Helper
- Jabber::Vcard::IqVcard
- Jabber::Version
- Jabber::Version::IqQueryVersion
- Jabber::Version::Responder
- Jabber::Version::SimpleResponder
- Jabber::X
- Jabber::XHTML
- Jabber::XHTML::Body
- Jabber::XHTML::HTML
- Jabber::XMPPElement
- Jabber::XMPPStanza
- Jabber::XParent
- REXML
- REXML::Element
- REXML::IOSource
- XMLRPC
- XMLRPC::Create
- Base64
- ObservableThing
- QObserver
- ThreadStore

No matching classes.

# Jabber::Command::IqCommand

Class for handling ad-hoc commands (JEP 0050)

A command is uniquely identified by its node attribute.

### Public Class Methods

new(node=nil, action=nil) click to toggle source

    # File lib/xmpp4r/command/iq/command.rb, line 15
    def initialize(node=nil, action=nil)
      super()
      set_node(node)
      set_action(action)
    end

### Public Instance Methods

action() click to toggle source

Get the action of the Command stanza

The following Symbols are allowed:

- :execute

- :cancel

- :prev

- :next

- :complete

return

Symbol

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 75
    def action
      case attributes['action']
        when 'execute' then :execute
        when 'cancel' then :cancel
        when 'prev' then :prev
        when 'next' then :next
        when 'complete' then :complete
        else nil
      end
    end

action=(v) click to toggle source

Set the action of the Command stanza (see IqCommand#action for details)

v

Symbol

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 89
    def action=(v)
      attributes['action'] = case v
        when :execute then 'execute'
        when :cancel then 'cancel'
        when :prev then 'prev'
        when :next then 'next'
        when :complete then 'complete'
        else nil
      end
    end

actions() click to toggle source

Get the actions allowed

return

REXML::Element

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 148
    def actions
      first_element('actions')
    end

node() click to toggle source

Get the node of the Command stanza

result

String

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 24
    def node
      attributes['node']
    end

node=(v) click to toggle source

Set the node of the Command stanza

v

String

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 31
    def node=(v)
      attributes['node'] = v
    end

sessionid() click to toggle source

Get the sessionid of the Command stanza

result

String

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 46
    def sessionid
      attributes['sessionid']
    end

sessionid=(v) click to toggle source

Set the sessionid of the Command stanza

v

String

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 53
    def sessionid=(v)
      attributes['sessionid'] = v
    end

set_action(v) click to toggle source

Set the action of the Command stanza (chaining-friendly)

v

Symbol

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 103
    def set_action(v)
      self.action = v
      self
    end

set_node(v) click to toggle source

Set the node of the Command stanza (chaining-friendly)

v

String

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 38
    def set_node(v)
      self.node = v
      self
    end

set_sessionid(v) click to toggle source

Set the sessionid of the Command stanza (chaining-friendly)

v

String

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 60
    def set_sessionid(v)
      self.sessionid = v
      self
    end

set_status(v) click to toggle source

Set the status of the Command stanza (chaining-friendly)

v

Symbol

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 140
    def set_status(v)
      self.status = v
      self
    end

status() click to toggle source

Get the status of the Command stanza

The following Symbols are allowed:

- :executing

- :completed

- :canceled

return

Symbol

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 116
    def status
      case attributes['status']
        when 'executing' then :executing
        when 'completed' then :completed
        when 'canceled' then :canceled
        else nil
      end
    end

status=(v) click to toggle source

Set the status of the Command stanza (see IqCommand#status for details)

v

Symbol

  or nil

    # File lib/xmpp4r/command/iq/command.rb, line 128
    def status=(v)
      attributes['status'] = case v
        when :executing then 'executing'
        when :completed then 'completed'
        when :canceled then 'canceled'
        else nil
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.