Group PJSIP_SIMPLE_RPID

group PJSIP_SIMPLE_RPID

RPID/Rich Presence Extensions to PIDF (RFC 4480)

This file provides tools for managing subset of RPID elements into PIDF document.

Enums

enum pjrpid_activity

This enumeration describes subset of standard activities as described by RFC 4480, RPID: Rich Presence Extensions to the Presence Information Data Format (PIDF).

Values:

enumerator PJRPID_ACTIVITY_UNKNOWN

Activity is unknown. The activity would then be conceived in the “note” field.

enumerator PJRPID_ACTIVITY_AWAY

The person is away

enumerator PJRPID_ACTIVITY_BUSY

The person is busy

enum pjrpid_element_type

This enumeration describes types of RPID element.

Values:

enumerator PJRPID_ELEMENT_TYPE_PERSON

RPID <person> element

Functions

void pjrpid_element_dup(pj_pool_t *pool, pjrpid_element *dst, const pjrpid_element *src)

Duplicate RPID element.

Parameters:
  • pool – Pool.

  • dst – Destination structure.

  • src – Source structure.

pj_status_t pjrpid_add_element(pjpidf_pres *pres, pj_pool_t *pool, unsigned options, const pjrpid_element *elem)

Add RPID element information into existing PIDF document. This will also add the appropriate XML namespace attributes into the presence’s XML node, if the attributes are not already present, and also a <note> element if it is not present. The <note> element is added to the first <tuple> element of the PIDF document, or if there is no <tuple> element found, to the root <presence> element of the document.

Parameters:
  • pres – The PIDF presence document.

  • pool – Pool.

  • options – Currently unused, and must be zero.

  • elem – RPID element information to be added into the PIDF document.

Returns:

PJ_SUCCESS on success.

pj_status_t pjrpid_get_element(const pjpidf_pres *pres, pj_pool_t *pool, pjrpid_element *elem)

Get RPID element information from PIDF document, if any.

Parameters:
  • pres – The PIDF document containing RPID elements.

  • pool – Pool to duplicate the information.

  • elem – Structure to receive the element information.

Returns:

PJ_SUCCESS if the document does contain RPID element and the information has been parsed successfully.

struct pjrpid_element
#include <rpid.h>

This structure describes person information in RPID document.

Public Members

pjrpid_element_type type

Element type.

pj_str_t id

Optional id to set on the element.

pjrpid_activity activity

Activity type.

pj_str_t note

Optional text describing the person/element.