Module presence_pidf

Presence PIDF document store.

Introduced in: 30 Apr 2006 by Fredrik Thulin <ft@it.su.se>

Authors: Fredrik Thulin (ft@it.su.se).

Description

Presence PIDF document store. Input and output for this module is always XML PIDF documents. PIDF is Presence Information Data Format, described in RFC3863.

Function Index

check_if_user_etag_exists/2 Check if an entry exists in the event database for a User and ETag.
delete_expired/0 Purge expired event data from the Mnesia database.
delete_pidf_for_user/1 Delete an entry from the event data Mnesia database.
get_pidf_xml_for_user/2 Return a Presence PIDF document for User.
get_pidfs_for_user/1 Fetch all eventdata entrys matching our presentity.
get_supported_content_types/0 Return a list of our supported content types as strings, in the order of our preference (best first).
get_supported_content_types/1 Return a list of the content types we allow a client to PUBLISH/NOTIFY a PIDF document using.
is_compatible_contenttype/2 Check if our peers list of content types are acceptable for us, for this kind of operation (publish or subscribe).
refresh_pidf_user_etag/4 Update the expiration time of the record for User with etag ETag.
set_pidf_for_user/6 Parse and store an PIDF XML associated with a presentity.
update_pidf_for_user/7 Parse and update an PIDF XML associated with a presentity.

Function Details

check_if_user_etag_exists/2

check_if_user_etag_exists(User, ETag) -> true | false

Check if an entry exists in the event database for a User and ETag.

delete_expired/0

delete_expired() -> ok

Purge expired event data from the Mnesia database.

delete_pidf_for_user/1

delete_pidf_for_user(User) -> ok

Delete an entry from the event data Mnesia database.

get_pidf_xml_for_user/2

get_pidf_xml_for_user(User, AcceptL) -> {ok, ContentType, PIDF_document} | {error, Reason}

Return a Presence PIDF document for User. If User is 'none' we generate a fake offline presence document.

get_pidfs_for_user/1

get_pidfs_for_user(User) -> [#eventdata_dbe{}]

Fetch all eventdata entrys matching our presentity.

get_supported_content_types/0

get_supported_content_types() -> [string()]

Return a list of our supported content types as strings, in the order of our preference (best first).

get_supported_content_types/1

get_supported_content_types(X1::set) -> [string()]

Return a list of the content types we allow a client to PUBLISH/NOTIFY a PIDF document using.

is_compatible_contenttype/2

is_compatible_contenttype(PubOrSub, AcceptL) -> true | false

Check if our peers list of content types are acceptable for us, for this kind of operation (publish or subscribe).

refresh_pidf_user_etag/4

refresh_pidf_user_etag(User, ETag, NewExpires, NewETag) -> ok | nomatch | {error, Reason}

Update the expiration time of the record for User with etag ETag. Also changes the ETag to a new value, because of how the RFC is written. I don't know why the ETag has to change. As a validiator of sequentiality perhaps.

set_pidf_for_user/6

set_pidf_for_user(User, ETag, Expires, ContentType, XML, Ctx) -> ok | {error, Reason}

Parse and store an PIDF XML associated with a presentity.

update_pidf_for_user/7

update_pidf_for_user(User, ETag, NewEtag, Expires, ContentType, XML, Ctx) -> ok | nomatch | {error, Reason}

Parse and update an PIDF XML associated with a presentity.


Generated by EDoc, Oct 17 2007, 16:48:12.