Class Jabber::Protocol::Presence
In: protocol.rb
Parent: Object

The presence class is used to construct presence messages to send to the Jabber service.

Methods
gen_accept_subscription    gen_accept_unsubscription    gen_away    gen_chat    gen_dnd    gen_initial    gen_new_subscription    gen_normal    gen_unavailable    gen_xa    new    to_s    to_xml   
Attributes
from  [RW] 
id  [RW] 
priority  [RW] 
show  [RW] 

The state to show (chat, xa, dnd, away)

status  [RW] 

The status message

to  [RW] 
type  [RW] 
Public Class methods
new(id, show=nil, status=nil)

Constructs a Presence object w/the supplied id

id:[String] The message ID
show:[String] The state to show
status:[String] The status message
gen_initial(id, show=nil, status=nil)

Generate a presence object for initial presence notification

id:[String] The message ID
show:[String] The state to show
status:[String] The status message
return:[Jabber::Protocol::Presence] The newly created Presence object
gen_normal(id, status=nil)

Generate a presence object w/show="normal" (normal availability)

id:[String] The message ID
status:[String=nil] The status message
return:[Jabber::Protocol::Presence] The newly created Presence object
gen_chat(id, status=nil)

Generate a presence object w/show="chat" (free for chat)

id:[String] The message ID
status:[String=nil] The status message
return:[Jabber::Protocol::Presence] The newly created Presence object
gen_xa(id, status=nil)

Generate a presence object w/show="xa" (extended away)

id:[String] The message ID
status:[String=nil] The status message
return:[Jabber::Protocol::Presence] The newly created Presence object
gen_dnd(id, status=nil)

Generate a presence object w/show="dnd" (do not disturb)

id:[String] The message ID
status:[String=nil] The status message
return:[Jabber::Protocol::Presence] The newly created Presence object
gen_away(id, status=nil)

Generate a presence object w/show="away" (away from resource)

id:[String] The message ID
status:[String=nil] The status message
return:[Jabber::Protocol::Presence] The newly created Presence object
gen_unavailable(id, status=nil)

Generate a presence object w/show="unavailable" (not free for chat)

id:[String] The message ID
status:[String=nil] The status message
return:[Jabber::Protocol::Presence] The newly created Presence object
gen_new_subscription(to)
gen_accept_subscription(id, jid)
gen_accept_unsubscription(id, jid)
Public Instance methods
to_xml()

Generates the xml representation of this Presence object

return:[String] The presence XML message to send the Jabber service
to_s()

see _to_xml