Module exmpp_presence

The module exmpp_presence provides helpers to do presence common operations.

Authors: Jean-Sébastien Pédron (js.pedron@meetic-corp.com).

Description

The module exmpp_presence provides helpers to do presence common operations.

Function Index

available/0Create a presence stanza to tell that the sender is available.
error/2Prepare a presence stanza to notify an error.
get_priority/1Return the priority attribute of the presence.
get_show/1Return the show attribute of the presence.
get_status/1Return the status attribute of the presence.
get_type/1Return the type of the given presence stanza.
is_presence/1Tell if El is a presence.
presence/2Create a presence stanza with given type and status.
probe/0Create a probe presence stanza.
set_priority/2Set the <priority/> field of a presence stanza.
set_show/2Set the <show/> field of a presence stanza.
set_status/2Set the <status/> field of a presence stanza.
subscribe/0Create a presence stanza to tell that the sender wants to subscribe to the receiver's presence.
subscribed/0Create a presence stanza to tell that the receiver was subscribed from the sender's presence.
unavailable/0Create a presence stanza to tell that the sender is not available.
unsubscribe/0Create a presence stanza to tell that the sender wants to unsubscribe to the receiver's presence.
unsubscribed/0Create a presence stanza to tell that the receiver was unsubscribed from the sender's presence.

Function Details

available/0

available() -> Presence

Create a presence stanza to tell that the sender is available.

error/2

error(Presence, Condition::Error) -> New_Presence

Prepare a presence stanza to notify an error.

If Error is an atom, it must be a standard condition defined by XMPP Core.

get_priority/1

get_priority(Xmlel::Presence) -> Priority

Return the priority attribute of the presence.

get_show/1

get_show(Xmlel::Presence) -> Show | undefined

Return the show attribute of the presence.

get_status/1

get_status(Xmlel::Presence) -> Status | undefined

Return the status attribute of the presence.

get_type/1

get_type(Presence) -> Type

Return the type of the given presence stanza.

is_presence/1

is_presence(Presence::El) -> bool

Tell if El is a presence.

You should probably use the IS_PRESENCE(El) guard expression.

presence/2

presence(Type, Status) -> Presence

Create a presence stanza with given type and status.

probe/0

probe() -> Presence

Create a probe presence stanza.

set_priority/2

set_priority(Xmlel::Presence, Priority) -> New_Presence

Set the <priority/> field of a presence stanza.

set_show/2

set_show(Xmlel::Presence, Show) -> New_Presence

Set the <show/> field of a presence stanza.

If Type is an empty string or the atom online, the <show/> element is removed.

set_status/2

set_status(Xmlel::Presence, Status) -> New_Presence

Set the <status/> field of a presence stanza.

If Status is an empty string (or an empty binary), the previous status is removed.

subscribe/0

subscribe() -> Presence

Create a presence stanza to tell that the sender wants to subscribe to the receiver's presence.

subscribed/0

subscribed() -> Presence

Create a presence stanza to tell that the receiver was subscribed from the sender's presence.

unavailable/0

unavailable() -> Presence

Create a presence stanza to tell that the sender is not available.

unsubscribe/0

unsubscribe() -> Presence

Create a presence stanza to tell that the sender wants to unsubscribe to the receiver's presence.

unsubscribed/0

unsubscribed() -> Presence

Create a presence stanza to tell that the receiver was unsubscribed from the sender's presence.


Generated by EDoc, Jan 21 2011, 01:43:50.