From 1426b8301e4d99837bd70ce73b350d03fafbfd45 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Sun, 1 Aug 2010 09:26:34 +0000 Subject: Re #1070 (support for multipart bodies): added new pjsip_param_cmp() API git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3242 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsip/sip_uri.h | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'pjsip/include') diff --git a/pjsip/include/pjsip/sip_uri.h b/pjsip/include/pjsip/sip_uri.h index ecd92a5d..ba273912 100644 --- a/pjsip/include/pjsip/sip_uri.h +++ b/pjsip/include/pjsip/sip_uri.h @@ -66,22 +66,33 @@ typedef struct pjsip_param * * @return The parameter if found, or NULL. */ -PJ_DECL(pjsip_param*) pjsip_param_find( pjsip_param *param_list, +PJ_DECL(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. + * Alias for pjsip_param_find() + */ +PJ_INLINE(pjsip_param*) pjsip_param_cfind(const pjsip_param *param_list, + const pj_str_t *name) +{ + return pjsip_param_find(param_list, name); +} + +/** + * Compare two parameter lists. * - * @param param_list List of parameters to find. - * @param name Parameter/header name to find. + * @param param_list1 First parameter list. + * @param param_list2 Second parameter list. + * @param ig_nf If set to 1, do not compare parameters that only + * appear in one of the list. * - * @return The parameter if found, or NULL. + * @return Zero if the parameter list are equal, non-zero + * otherwise. */ -PJ_DECL(const pjsip_param*) pjsip_param_cfind(const pjsip_param *param_list, - const pj_str_t *name ); - +PJ_DECL(int) pjsip_param_cmp(const pjsip_param *param_list1, + const pjsip_param *param_list2, + pj_bool_t ig_nf); /** * Duplicate the parameters. -- cgit v1.2.3