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

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

Methods

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

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

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

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

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

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

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

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

Constructs a Presence object w/the supplied id

id:[String] The message ID
show:[String] The state to show
status:[String] The status message

Public Instance methods

see _to_xml

Generates the xml representation of this Presence object

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

[Validate]