BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

Generic parameter elements container. More...

Data Structures

struct  pjsip_param
 

Functions

pjsip_parampjsip_param_find (const pjsip_param *param_list, const pj_str_t *name)
 
pjsip_parampjsip_param_cfind (const pjsip_param *param_list, const pj_str_t *name)
 
int pjsip_param_cmp (const pjsip_param *param_list1, const pjsip_param *param_list2, pj_bool_t ig_nf)
 
void pjsip_param_clone (pj_pool_t *pool, pjsip_param *dst_list, const pjsip_param *src_list)
 
void pjsip_param_shallow_clone (pj_pool_t *pool, pjsip_param *dst_list, const pjsip_param *src_list)
 
pj_ssize_t pjsip_param_print_on (const pjsip_param *param_list, char *buf, pj_size_t size, const pj_cis_t *pname_unres, const pj_cis_t *pvalue_unres, int sep)
 

Detailed Description

Function Documentation

◆ pjsip_param_find()

pjsip_param * pjsip_param_find ( const pjsip_param param_list,
const pj_str_t name 
)

Find the specified parameter name in the list. The name will be compared in case-insensitive comparison.

Parameters
param_listList of parameters to find.
nameParameter/header name to find.
Returns
The parameter if found, or NULL.

Referenced by pjsip_param_cfind().

◆ pjsip_param_cfind()

pjsip_param * pjsip_param_cfind ( const pjsip_param param_list,
const pj_str_t name 
)

Alias for pjsip_param_find()

References PJ_INLINE, and pjsip_param_find().

◆ pjsip_param_cmp()

int pjsip_param_cmp ( const pjsip_param param_list1,
const pjsip_param param_list2,
pj_bool_t  ig_nf 
)

Compare two parameter lists.

Parameters
param_list1First parameter list.
param_list2Second parameter list.
ig_nfIf set to 1, do not compare parameters that only appear in one of the list.
Returns
Zero if the parameter list are equal, non-zero otherwise.

◆ pjsip_param_clone()

void pjsip_param_clone ( pj_pool_t pool,
pjsip_param dst_list,
const pjsip_param src_list 
)

Duplicate the parameters.

Parameters
poolPool to allocate memory from.
dst_listDestination list.
src_listSource list.

◆ pjsip_param_shallow_clone()

void pjsip_param_shallow_clone ( pj_pool_t pool,
pjsip_param dst_list,
const pjsip_param src_list 
)

Duplicate the parameters.

Parameters
poolPool to allocate memory from.
dst_listDestination list.
src_listSource list.

◆ pjsip_param_print_on()

pj_ssize_t pjsip_param_print_on ( const pjsip_param param_list,
char *  buf,
pj_size_t  size,
const pj_cis_t pname_unres,
const pj_cis_t pvalue_unres,
int  sep 
)

Print parameters.

Parameters
param_listThe parameter list.
bufBuffer.
sizeSize of buffer.
pname_unresSpecification of allowed characters in pname.
pvalue_unresSpecification of allowed characters in pvalue.
sepSeparator character (either ';', ',', or '?'). When separator is set to '?', this function will automatically adjust the separator character to '&' after the first parameter is printed.
Returns
The number of bytes printed, or -1 on errr.

 


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