Module exmpp_jid

The module exmpp_jid provides functions to handle JID.

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

Description

The module exmpp_jid provides functions to handle JID.

Data Types

jid()

jid() = {jid, Orig_Jid, Prepd_Node, Prepd_Domain, Prepd_Resource}

Represents a JID.

jid() is an internal type and the structure documented herein may be changed without notice. Please use only the accessors exported by this module to get each component of a JID.

Prepd_Node is set to the value of Node passed through the NODEPREP stringprep profile.

Prepd_Domain is set to the value of Domain passed through the NAMEPREP stringprep profile.

Prepd_Resource is set to the value of Resource passed through the RESOURCEPREP stringprep profile.

Function Index

bare/1Convert a full JID to its bare version.
bare_compare/2Compare bare JIDs.
bare_to_binary/1Stringify a bare JID.
bare_to_binary/2Stringify a full JID.
bare_to_list/1Stringify a bare JID.
bare_to_list/2Stringify a full JID.
binary_split/2
compare/2Compare full JIDs.
compare_domains/2Compare JID's domain.
domain/1Return the domain part of a JID.
domain_as_list/1Return the domain part of a JID as a list.
full/2Convert a bare JID to its full version.
full_compare/2Compare full JIDs.
is_jid/1Tell if the argument is a JID.
make/0Create a blank JID.
make/1Create a bare JID.
make/2Create a bare JID.
make/3Create a full JID.
node/1Return the node part of a JID.
node_as_list/1Return the node part of a JID as a list.
parse/1Parse a string and create a full JID.
prep_bare_to_binary/1Stringify a bare JID with STRINGPREP profiles applied.
prep_bare_to_list/1Stringify a bare JID with STRINGPREP profiles applied.
prep_domain/1Return the domain part of a JID with NAMEPREP profile applied.
prep_domain_as_list/1Return the domain part of a JID as a list with NAMEPREP profile applied.
prep_node/1Return the node part of a JID with NODEPREP profile applied.
prep_node_as_list/1Return the node part of a JID as a list with NODEPREP profile applied.
prep_resource/1Return the resource part of a JID with RESOURCEPREP profile applied.
prep_resource_as_list/1Return the domain part of a JID as a list with RESOURCEPREP profile applied.
prep_to_binary/1Stringify a full JID with STRINGPREP profiles applied.
prep_to_list/1Stringify a full JID with STRINGPREP profiles applied.
resource/1Return the resource part of a JID.
resource_as_list/1Return the resource part of a JID as a list.
to_binary/1Stringify a full JID.
to_binary/2Stringify a bare JID.
to_binary/3Stringify a full JID.
to_list/1Stringify a full JID.
to_list/2Stringify a bare JID.
to_list/3Stringify a full JID.
to_lower/1

Function Details

bare/1

bare(Jid) -> Bare_Jid

Convert a full JID to its bare version.

bare_compare/2

bare_compare(Jid::Jid1, Jid2) -> bool()

Compare bare JIDs.

bare_to_binary/1

bare_to_binary(Jid) -> String

Stringify a bare JID.

bare_to_binary/2

bare_to_binary(Node, Domain) -> String

Stringify a full JID.

bare_to_list/1

bare_to_list(Jid) -> String

Stringify a bare JID.

bare_to_list/2

bare_to_list(Node, Domain) -> String

Stringify a full JID.

binary_split/2

binary_split(B, C) -> any()

compare/2

compare(Jid1, Jid2) -> bool()

Compare full JIDs. This function is identical to full_compare/2.

compare_domains/2

compare_domains(Jid::Jid1, Jid2) -> bool()

Compare JID's domain.

domain/1

domain(Jid) -> Domain | undefined

Return the domain part of a JID.

domain_as_list/1

domain_as_list(Jid) -> Domain | undefined

Return the domain part of a JID as a list.

full/2

full(Jid::Bare_Jid, Resource) -> Jid

throws {jid, convert, too_long, {resource, Resource}} | {jid, convert, invalid, {resource, Resource}}

Convert a bare JID to its full version.

full_compare/2

full_compare(Jid::Jid1, Jid2) -> bool()

Compare full JIDs.

is_jid/1

is_jid(Jid) -> bool()

Tell if the argument is a JID.

You should probably use the IS_JID(Jid) guard expression.

make/0

make() -> Jid

Create a blank JID.

make/1

make(Domain) -> Bare_Jid

throws {jid, make, too_long, {domain, Domain}} | {jid, make, invalid, {domain, Domain}}

Create a bare JID.

make/2

make(Node, Domain) -> Bare_Jid

throws {jid, make, too_long, {domain, Domain}} | {jid, make, invalid, {domain, Domain}} | {jid, make, too_long, {node, Node}} | {jid, make, invalid, {node, Node}}

Create a bare JID.

make/3

make(Node, Domain, Resource) -> Jid

Create a full JID.

node/1

node(Jid) -> Node | undefined

Return the node part of a JID.

node_as_list/1

node_as_list(Jid) -> Node | undefined

Return the node part of a JID as a list.

parse/1

parse(String) -> Jid

throws {jid, parse, Reason, {jid, String}}

Parse a string and create a full JID.

prep_bare_to_binary/1

prep_bare_to_binary(Jid) -> String

Stringify a bare JID with STRINGPREP profiles applied.

prep_bare_to_list/1

prep_bare_to_list(Jid) -> String

Stringify a bare JID with STRINGPREP profiles applied.

prep_domain/1

prep_domain(Jid) -> Domain | undefined

Return the domain part of a JID with NAMEPREP profile applied.

prep_domain_as_list/1

prep_domain_as_list(Jid) -> Domain | undefined

Return the domain part of a JID as a list with NAMEPREP profile applied.

prep_node/1

prep_node(Jid) -> Node | undefined

Return the node part of a JID with NODEPREP profile applied.

prep_node_as_list/1

prep_node_as_list(Jid) -> Node | undefined

Return the node part of a JID as a list with NODEPREP profile applied.

prep_resource/1

prep_resource(Jid) -> Resource | undefined

Return the resource part of a JID with RESOURCEPREP profile applied.

prep_resource_as_list/1

prep_resource_as_list(Jid) -> Resource | undefined

Return the domain part of a JID as a list with RESOURCEPREP profile applied.

prep_to_binary/1

prep_to_binary(Jid) -> String

Stringify a full JID with STRINGPREP profiles applied.

prep_to_list/1

prep_to_list(Jid) -> String

Stringify a full JID with STRINGPREP profiles applied.

resource/1

resource(Jid) -> Resource | undefined

Return the resource part of a JID.

resource_as_list/1

resource_as_list(Jid) -> Resource | undefined

Return the resource part of a JID as a list.

to_binary/1

to_binary(Jid) -> String

Stringify a full JID.

to_binary/2

to_binary(Node, Domain) -> String

Stringify a bare JID.

to_binary/3

to_binary(Node, Domain, Resource) -> String

Stringify a full JID.

to_list/1

to_list(Jid) -> String

Stringify a full JID.

to_list/2

to_list(Node, Domain) -> String

Stringify a bare JID.

to_list/3

to_list(Node, Domain, Resource) -> String

Stringify a full JID.

to_lower/1

to_lower(Jid::jid()) -> {Node::string(), Domain::string(), Resource::string()}


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