WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

RPID/Rich Presence Extensions to PIDF (RFC 4480)

RPID/Rich Presence Extensions to PIDF (RFC 4480) More...

Data Structures

struct  pjrpid_element
 

Enumerations

enum  pjrpid_activity { PJRPID_ACTIVITY_UNKNOWN , PJRPID_ACTIVITY_AWAY , PJRPID_ACTIVITY_BUSY }
 
enum  pjrpid_element_type { PJRPID_ELEMENT_TYPE_PERSON }
 

Functions

void pjrpid_element_dup (pj_pool_t *pool, pjrpid_element *dst, const pjrpid_element *src)
 
pj_status_t pjrpid_add_element (pjpidf_pres *pres, pj_pool_t *pool, unsigned options, const pjrpid_element *elem)
 
pj_status_t pjrpid_get_element (const pjpidf_pres *pres, pj_pool_t *pool, pjrpid_element *elem)
 

Detailed Description

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

Enumeration Type Documentation

◆ 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).

Enumerator
PJRPID_ACTIVITY_UNKNOWN 

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

PJRPID_ACTIVITY_AWAY 

The person is away

PJRPID_ACTIVITY_BUSY 

The person is busy

◆ pjrpid_element_type

This enumeration describes types of RPID element.

Enumerator
PJRPID_ELEMENT_TYPE_PERSON 

RPID <person> element

Function Documentation

◆ pjrpid_element_dup()

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

Duplicate RPID element.

Parameters
poolPool.
dstDestination structure.
srcSource structure.

◆ pjrpid_add_element()

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 to the first <tuple> element of the PIDF document, if a <note> element is not present.

Parameters
presThe PIDF presence document.
poolPool.
optionsCurrently unused, and must be zero.
elemRPID element information to be added into the PIDF document.
Returns
PJ_SUCCESS on success.

◆ pjrpid_get_element()

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
presThe PIDF document containing RPID elements.
poolPool to duplicate the information.
elemStructure to receive the element information.
Returns
PJ_SUCCESS if the document does contain RPID element and the information has been parsed successfully.

References PJ_END_DECL.

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.