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

XPIDF/Presence Information Data Format

Support for XPIDF/Presence Information Data Format. More...

Typedefs

typedef pj_xml_node pjxpidf_pres
 

Functions

pjxpidf_prespjxpidf_create (pj_pool_t *pool, const pj_str_t *uri)
 
pjxpidf_prespjxpidf_parse (pj_pool_t *pool, char *text, pj_size_t len)
 
int pjxpidf_print (pjxpidf_pres *pres, char *text, pj_size_t len)
 
pj_str_tpjxpidf_get_uri (pjxpidf_pres *pres)
 
pj_status_t pjxpidf_set_uri (pj_pool_t *pool, pjxpidf_pres *pres, const pj_str_t *uri)
 
pj_bool_t pjxpidf_get_status (pjxpidf_pres *pres)
 
pj_status_t pjxpidf_set_status (pjxpidf_pres *pres, pj_bool_t status)
 

Detailed Description

This is an old presence data format as described in: draft-rosenberg-impp-pidf-00.txt.

We won't support this format extensively here, as it seems there's not too many implementations support this anymore, as it shouldn't.

Typedef Documentation

◆ pjxpidf_pres

Type definitions for XPIDF root document.

Function Documentation

◆ pjxpidf_create()

pjxpidf_pres * pjxpidf_create ( pj_pool_t pool,
const pj_str_t uri 
)

Create a new XPIDF document.

Parameters
poolPool.
uriURI to set in the XPIDF document.
Returns
XPIDF document.

◆ pjxpidf_parse()

pjxpidf_pres * pjxpidf_parse ( pj_pool_t pool,
char *  text,
pj_size_t  len 
)

Parse XPIDF document.

Note that the input text buffer MUST be NULL terminated and have length at least len+1 (len MUST NOT include the NULL terminator).

Parameters
poolPool.
textInput text, MUST be NULL terminated.
lenLength of input text, NOT including the NULL terminator.
Returns
XPIDF document.

◆ pjxpidf_print()

int pjxpidf_print ( pjxpidf_pres pres,
char *  text,
pj_size_t  len 
)

Print XPIDF document.

Parameters
presThe XPIDF document to print.
textBuffer to place the output.
lenLength of the buffer.
Returns
The length printed.

◆ pjxpidf_get_uri()

pj_str_t * pjxpidf_get_uri ( pjxpidf_pres pres)

Get URI in the XPIDF document

Parameters
presXPIDF document
Returns
The URI, or an empty string.

◆ pjxpidf_set_uri()

pj_status_t pjxpidf_set_uri ( pj_pool_t pool,
pjxpidf_pres pres,
const pj_str_t uri 
)

Set the URI of the XPIDF document.

Parameters
poolPool.
presThe XPIDF document.
uriURI to set in the XPIDF document.
Returns
Zero on success.

◆ pjxpidf_get_status()

pj_bool_t pjxpidf_get_status ( pjxpidf_pres pres)

Get presence status in the XPIDF document.

Parameters
presXPIDF document.
Returns
True to indicate the contact is online.

◆ pjxpidf_set_status()

pj_status_t pjxpidf_set_status ( pjxpidf_pres pres,
pj_bool_t  status 
)

Set presence status in the XPIDF document.

Parameters
presXPIDF document.
statusStatus to set, True for online, False for offline.
Returns
Zero on success.

References PJ_END_DECL.

 


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