Name

type — Optional

Synopsis

<presence type='unavailable'>

The type attribute of the <presence/> element is used for many purposes. The basic usage is to convey availability. Two values are used: available and unavailable.[6] Another value is to signify that the <presence/> packet is being used to query the packet recipient’s presence (value is probe). The rest of the values (subscribe, unsubscribe, subscribed, unsubscribed) are used in the subscription structure, which is described in Section 5.4.2.3.

Attribute Values

type='available'

The available presence type is used by entities to announce their availability. This announcement is usually made to the Jabber server that manages the presence subscription mechanism (see Section 5.4.2.3 for more details). However it can also be directed to a particular JID if the entity wants to control presence information itself.

The available presence isn’t a simple binary “on/off”; varying degrees of availability are specified using subelements of the <presence/> packet. These include <show/> and <status/> and are described next.

If no type attribute is specified, then this value of available is assumed. It makes sense, as the most common type of <presence/> packet sent by entities is usually the available type, optionally qualified with the <show/> and <status/> subelements, as the user of the connected client changes her circumstances over time (off for a break, back, out to lunch, and so on).

type='unavailable'

The unavailable

Get Programming Jabber now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.