|
Class Jabber::Protocol::Presence |
|
The presence class is used to construct presence messages to send to the Jabber service.
| Methods |
| Attributes |
| [RW] | :from | |
| [RW] | :id | |
| [RW] | :priority | |
| [RW] | :show | The state to show (chat, xa, dnd, away) |
| [RW] | :status | The status message |
| [RW] | :to | |
| [RW] | :type |
| Public Class methods |
| new(id, show=nil, status=nil) src |
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) src |
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) src |
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) src |
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) src |
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) src |
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) src |
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) src |
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) src |
| gen_accept_subscription(id, jid) src |
| gen_accept_unsubscription(id, jid) src |
| Public Instance methods |
| to_xml() src |
Generates the xml representation of this Presence object
| return: | [String] The presence XML message to send the Jabber service |
| to_s() src |
see _to_xml