Google

Class
Jabber::Protocol::Iq
In: jabber4r/protocol.rb
Parent: Object

A class used to build/parse IQ requests/responses

Methods

Attributes

 [RW]  :data
 [RW]  :error
 [RW]  :errorcode
 [RW]  :from
 [RW]  :id
 [RW]  :session
 [RW]  :to
 [RW]  :type
 [RW] 
Public Class methods
from_element(session, element) src

session:[Jabber::Session] The Jabber session instance
element:[Jabber::Protocol::ParsedXMLElement] The received XML object
return:[Jabber::Protocol::Iq] The newly created Iq object
new(session,id=nil) src

Default constructor to build an Iq object

session:[Jabber::Session] The Jabber session instance
id:[String=nil] The (optional) id of the Iq object
get_private(session,id,ename,ns) src

Return an IQ object that uses the jabber:iq:private namespace

gen_roster(session, id) src

Generates an IQ roster request XML element

id:[String] The message id
return:[String] The XML data to send
gen_registration(session, id, username, password, email, name) src

Generates an IQ authortization request XML element

id:[String] The message id
username:[String] The username
password:[String] The password
email:[String] The email address of the account
name:[String] The full name
return:[String] The XML data to send
gen_add_rosteritem(session, id, jid, name) src

Generates an IQ Roster Item add request XML element

session:[Session] The session
id:[String] The message id
jid:[JID] The Jabber ID to add to the roster
name:[String] The full name
return:[String] The XML data to send
gen_auth(session, id, username, password, resource) src

Generates an IQ authortization request XML element

id:[String] The message id
username:[String] The username
password:[String] The password
resource:[String] The resource to bind this session to
return:[String] The XML data to send
gen_auth_digest(session, id, username, digest, resource) src

Generates an IQ digest authortization request XML element

id:[String] The message id
username:[String] The username
digest:[String] The SHA-1 hash of the sessionid and the password
resource:[String] The resource to bind this session to
return:[String] The XML data to send
gen_oob(session, to, url, desc="") src

Generates an IQ out of bounds XML element

to:[JID] The Jabber ID to send to
url:[String] The data to send
desc:[String=""] The description of the data
return:[String] The XML data to send
gen_vcard(session, id, to) src

Generates an VCard request XML element

id:[String] The message ID
to:[JID] The jabber id of the account to get the VCard for
return:[String] The XML data to send
Public Instance methods
send(wait=false, &block) src

Sends the IQ to the Jabber service for delivery

wait:[Boolean = false] Wait for reply before return?
&block:[Block] A block to process the message replies
reply() src

Builds a reply to an existing Iq

return:[Jabber::Protocol::Iq] The result Iq
src

Generates XML that complies with the Jabber protocol for sending the Iq through the Jabber service.

return:[String] The XML string.
to_s() src