Changeset 64 for pjproject/trunk/pjsip/include/pjsip/sip_uri.h
- Timestamp:
- Nov 20, 2005 7:58:10 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_uri.h
r60 r64 27 27 #include <pjsip/sip_types.h> 28 28 #include <pjsip/sip_config.h> 29 #include <pj/list.h> 29 30 30 31 PJ_BEGIN_DECL … … 37 38 * @{ 38 39 */ 40 41 /** 42 * Generic parameter, normally used in other_param or header_param. 43 */ 44 typedef struct pjsip_param 45 { 46 PJ_DECL_LIST_MEMBER(struct pjsip_param); /**< Generic list member. */ 47 pj_str_t name; /**< Param/header name. */ 48 pj_str_t value; /**< Param/header value. */ 49 } pjsip_param; 50 51 52 /** 53 * Find the specified parameter name in the list. The name will be compared 54 * in case-insensitive comparison. 55 * 56 * @param param_list List of parameters to find. 57 * @param name Parameter/header name to find. 58 * 59 * @return The parameter if found, or NULL. 60 */ 61 PJ_DECL(pjsip_param*) pjsip_param_find( pjsip_param *param_list, 62 const pj_str_t *name ); 63 64 65 /** 66 * Find the specified parameter name in the list. The name will be compared 67 * in case-insensitive comparison. 68 * 69 * @param param_list List of parameters to find. 70 * @param name Parameter/header name to find. 71 * 72 * @return The parameter if found, or NULL. 73 */ 74 PJ_DECL(const pjsip_param*) pjsip_param_cfind(const pjsip_param *param_list, 75 const pj_str_t *name ); 76 77 78 /** 79 * Duplicate the parameters. 80 * 81 * @param pool Pool to allocate memory from. 82 * @param dst_list Destination list. 83 * @param src_list Source list. 84 */ 85 PJ_DECL(void) pjsip_param_clone(pj_pool_t *pool, pjsip_param *dst_list, 86 const pjsip_param *src_list); 39 87 40 88 /** … … 90 138 * @param uri1 the first URI (self). 91 139 * @param uri2 the second URI. 92 * @return zero if equal. 93 */ 94 int (*p_compare)(pjsip_uri_context_e context, 95 const void *uri1, const void *uri2); 140 * @return PJ_SUCCESS if equal, or otherwise the error status which 141 * should point to the mismatch part. 142 */ 143 pj_status_t (*p_compare)(pjsip_uri_context_e context, 144 const void *uri1, const void *uri2); 96 145 97 146 /** … … 138 187 #define PJSIP_URI_SCHEME_IS_TEL(url) \ 139 188 (pj_strnicmp2(pjsip_uri_get_scheme(url), "tel", 3)==0) 140 141 189 142 190 … … 157 205 int lr_param; /**< Optional loose routing param, or zero */ 158 206 pj_str_t maddr_param; /**< Optional maddr param */ 159 pj _str_tother_param; /**< Other parameters grouped together. */160 pj _str_theader_param; /**< Optional header parameter. */207 pjsip_param other_param; /**< Other parameters grouped together. */ 208 pjsip_param header_param; /**< Optional header parameter. */ 161 209 } pjsip_url; 162 210 … … 208 256 * @param uri1 The first URI. 209 257 * @param uri2 The second URI. 210 * @return Zero if equal. 211 */ 212 PJ_INLINE(int) pjsip_uri_cmp(pjsip_uri_context_e context, 213 const void *uri1, const void *uri2) 258 * @return PJ_SUCCESS if equal, or otherwise the error status which 259 * should point to the mismatch part. 260 */ 261 PJ_INLINE(pj_status_t) pjsip_uri_cmp(pjsip_uri_context_e context, 262 const void *uri1, const void *uri2) 214 263 { 215 264 return (*((const pjsip_uri*)uri1)->vptr->p_compare)(context, uri1, uri2);
Note: See TracChangeset
for help on using the changeset viewer.