Module exmpp_message

The module exmpp_message provides helpers to do message common operations.

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

Description

The module exmpp_message provides helpers to do message common operations.

Function Index

chat/0Create an empty chat message stanza.
chat/1Create a chat message stanza with a given body.
chat/2Create a chat message stanza with given subject and body.
error/2Prepare a message stanza to notify an error.
get_body/1Return the body of the message.
get_subject/1Return the subject of the message.
get_thread/1Return the thread of the message.
get_type/1Return the type of the given <message/>.
groupchat/0Create an empty groupchat message stanza.
groupchat/1Create a groupchat message stanza with a given body.
groupchat/2Create a groupchat message stanza with given subject and body.
headline/0Create an empty headline message stanza.
headline/1Create a headline message stanza with a given body.
headline/2Create a headline message stanza with given subject and body.
is_message/1Tell if El is a message.
make_chat/1Create an empty chat message stanza.
make_chat/2Create a chat message stanza with a given body.
make_chat/3Create a chat message stanza with given subject and body.
make_groupchat/1Create an empty groupchat message stanza.
make_groupchat/2Create a groupchat message stanza with a given body.
make_groupchat/3Create a groupchat message stanza with given subject and body.
make_headline/1Create an empty headline message stanza.
make_headline/2Create a headline message stanza with a given body.
make_headline/3Create a headline message stanza with given subject and body.
make_normal/1Create an empty message stanza.
make_normal/2Create a message stanza with a given body.
make_normal/3Create a message stanza with given subject and body.
normal/0Create an empty message stanza.
normal/1Create a message stanza with a given body.
normal/2Create a message stanza with given subject and body.
set_body/2Set the <body/> field of a message stanza.
set_subject/2Set the <subject/> field of a message stanza.
set_thread/2Set the <thread/> field of a message stanza.
set_type/2Set the type of the given <message/>.

Function Details

chat/0

chat() -> Message

Create an empty chat message stanza.

The default namespace is jabber:client.

chat/1

chat(Body) -> Message

Create a chat message stanza with a given body.

The default namespace is jabber:client.

chat/2

chat(Subject, Body) -> Message

Create a chat message stanza with given subject and body.

The default namespace is jabber:client.

error/2

error(Message, Condition::Error) -> New_Message

Prepare a message stanza to notify an error.

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

get_body/1

get_body(Xmlel::Message) -> Body | undefined

Return the body of the message.

get_subject/1

get_subject(Xmlel::Message) -> Subject | undefined

Return the subject of the message.

get_thread/1

get_thread(Xmlel::Message) -> Thread | undefined

Return the thread of the message.

get_type/1

get_type(Message) -> Type

Return the type of the given <message/>.

groupchat/0

groupchat() -> Message

Create an empty groupchat message stanza.

The default namespace is jabber:client.

groupchat/1

groupchat(Body) -> Message

Create a groupchat message stanza with a given body.

The default namespace is jabber:client.

groupchat/2

groupchat(Subject, Body) -> Message

Create a groupchat message stanza with given subject and body.

The default namespace is jabber:client.

headline/0

headline() -> Message

Create an empty headline message stanza.

The default namespace is jabber:client.

headline/1

headline(Body) -> Message

Create a headline message stanza with a given body.

The default namespace is jabber:client.

headline/2

headline(Subject, Body) -> Message

Create a headline message stanza with given subject and body.

The default namespace is jabber:client.

is_message/1

is_message(Message::El) -> bool

Tell if El is a message.

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

make_chat/1

make_chat(NS) -> Message

Create an empty chat message stanza.

make_chat/2

make_chat(NS, Body) -> Message

Create a chat message stanza with a given body.

make_chat/3

make_chat(NS, Subject, Body) -> Message

Create a chat message stanza with given subject and body.

make_groupchat/1

make_groupchat(NS) -> Message

Create an empty groupchat message stanza.

make_groupchat/2

make_groupchat(NS, Body) -> Message

Create a groupchat message stanza with a given body.

make_groupchat/3

make_groupchat(NS, Subject, Body) -> Message

Create a groupchat message stanza with given subject and body.

make_headline/1

make_headline(NS) -> Message

Create an empty headline message stanza.

make_headline/2

make_headline(NS, Body) -> Message

Create a headline message stanza with a given body.

make_headline/3

make_headline(NS, Subject, Body) -> Message

Create a headline message stanza with given subject and body.

make_normal/1

make_normal(NS) -> Message

Create an empty message stanza.

make_normal/2

make_normal(NS, Body) -> Message

Create a message stanza with a given body.

make_normal/3

make_normal(NS, Subject, Body) -> Message

Create a message stanza with given subject and body.

normal/0

normal() -> Message

Create an empty message stanza.

The default namespace is jabber:client.

normal/1

normal(Body) -> Message

Create a message stanza with a given body.

The default namespace is jabber:client.

normal/2

normal(Subject, Body) -> Message

Create a message stanza with given subject and body.

The default namespace is jabber:client.

set_body/2

set_body(Xmlel::Message, Body) -> New_Message

Set the <body/> field of a message stanza.

If Body is an empty string (or an empty binary), the previous body is removed.

set_subject/2

set_subject(Xmlel::Message, Subject) -> New_Message

Set the <subject/> field of a message stanza.

If Subject is an empty string (or an empty binary), the previous subject is removed.

set_thread/2

set_thread(Xmlel::Message, Thread) -> New_Message

Set the <thread/> field of a message stanza.

If Thread is an empty string (or an empty binary), the previous thread is removed.

set_type/2

set_type(Message, Type) -> New_Message

Set the type of the given <message/>.

If Type isn't a valid, the type is set to normal.


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