Ignore:
Timestamp:
Jun 17, 2006 4:08:30 AM (18 years ago)
Author:
bennylp
Message:

Modifications all over the place, but mainly only to update Doxygen documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_uri.h

    r127 r515  
    3434 
    3535/** 
    36  * @defgroup PJSIP_URL URL Structures 
    37  * @brief SIP Url, tel: Url, and generic URI. 
     36 * @defgroup PJSIP_URI URI 
     37 * @brief URI types and manipulations. 
    3838 * @ingroup PJSIP_MSG 
     39 */ 
     40 
     41/** 
     42 * @addtogroup PJSIP_URI_PARAM URI Parameter Container 
     43 * @ingroup PJSIP_URI 
     44 * @brief Generic parameter elements container. 
    3945 * @{ 
    4046 */ 
     
    118124                                         const pj_cis_t *pvalue_unres, 
    119125                                         int sep); 
     126 
     127/** 
     128 * @} 
     129 */ 
     130 
     131/** 
     132 * @defgroup PJSIP_URI_GENERIC Generic URI 
     133 * @ingroup PJSIP_URI 
     134 * @brief Generic representation for all types of URI. 
     135 * @{ 
     136 */ 
    120137 
    121138/** 
     
    220237#define PJSIP_URI_SCHEME_IS_TEL(url)    \ 
    221238    (pj_strnicmp2(pjsip_uri_get_scheme(url), "tel", 3)==0) 
     239 
     240 
     241/** 
     242 * Generic function to get the URI scheme. 
     243 * @param uri       the URI object. 
     244 * @return          the URI scheme. 
     245 */ 
     246PJ_INLINE(const pj_str_t*) pjsip_uri_get_scheme(const void *uri) 
     247{ 
     248    return (*((pjsip_uri*)uri)->vptr->p_get_scheme)(uri); 
     249} 
     250 
     251/** 
     252 * Generic function to get the URI object contained by this URI, or the URI  
     253 * itself if it doesn't contain another URI. 
     254 * 
     255 * @param uri       the URI. 
     256 * @return          the URI. 
     257 */ 
     258PJ_INLINE(void*) pjsip_uri_get_uri(void *uri) 
     259{ 
     260    return (*((pjsip_uri*)uri)->vptr->p_get_uri)(uri); 
     261} 
     262 
     263/** 
     264 * Generic function to compare two URIs. 
     265 * 
     266 * @param context   Comparison context. 
     267 * @param uri1      The first URI. 
     268 * @param uri2      The second URI. 
     269 * @return          PJ_SUCCESS if equal, or otherwise the error status which 
     270 *                  should point to the mismatch part. 
     271 */ 
     272PJ_INLINE(pj_status_t) pjsip_uri_cmp(pjsip_uri_context_e context,  
     273                                     const void *uri1, const void *uri2) 
     274{ 
     275    return (*((const pjsip_uri*)uri1)->vptr->p_compare)(context, uri1, uri2); 
     276} 
     277 
     278/** 
     279 * Generic function to print an URI object. 
     280 * 
     281 * @param context   Print context. 
     282 * @param uri       The URI to print. 
     283 * @param buf       The buffer. 
     284 * @param size      Size of the buffer. 
     285 * @return          Length printed. 
     286 */ 
     287PJ_INLINE(int) pjsip_uri_print(pjsip_uri_context_e context, 
     288                               const void *uri, 
     289                               char *buf, pj_size_t size) 
     290{ 
     291    return (*((const pjsip_uri*)uri)->vptr->p_print)(context, uri, buf, size); 
     292} 
     293 
     294/** 
     295 * Generic function to clone an URI object. 
     296 * 
     297 * @param pool      Pool. 
     298 * @param uri       URI to clone. 
     299 * @return          New URI. 
     300 */ 
     301PJ_INLINE(void*) pjsip_uri_clone( pj_pool_t *pool, const void *uri ) 
     302{ 
     303    return (*((const pjsip_uri*)uri)->vptr->p_clone)(pool, uri); 
     304} 
     305 
     306 
     307 
     308/** 
     309 * @} 
     310 */ 
     311 
     312/** 
     313 * @defgroup PJSIP_SIP_URI SIP URI Scheme and Name address 
     314 * @ingroup PJSIP_URI 
     315 * @brief SIP URL structure ("sip:" and "sips:") 
     316 * @{ 
     317 */ 
    222318 
    223319 
     
    262358 
    263359/** 
    264  * Generic function to get the URI scheme. 
    265  * @param uri       the URI object. 
    266  * @return          the URI scheme. 
    267  */ 
    268 PJ_INLINE(const pj_str_t*) pjsip_uri_get_scheme(const void *uri) 
    269 { 
    270     return (*((pjsip_uri*)uri)->vptr->p_get_scheme)(uri); 
    271 } 
    272  
    273 /** 
    274  * Generic function to get the URI object contained by this URI, or the URI  
    275  * itself if it doesn't contain another URI. 
    276  * 
    277  * @param uri       the URI. 
    278  * @return          the URI. 
    279  */ 
    280 PJ_INLINE(void*) pjsip_uri_get_uri(void *uri) 
    281 { 
    282     return (*((pjsip_uri*)uri)->vptr->p_get_uri)(uri); 
    283 } 
    284  
    285 /** 
    286  * Generic function to compare two URIs. 
    287  * 
    288  * @param context   Comparison context. 
    289  * @param uri1      The first URI. 
    290  * @param uri2      The second URI. 
    291  * @return          PJ_SUCCESS if equal, or otherwise the error status which 
    292  *                  should point to the mismatch part. 
    293  */ 
    294 PJ_INLINE(pj_status_t) pjsip_uri_cmp(pjsip_uri_context_e context,  
    295                                      const void *uri1, const void *uri2) 
    296 { 
    297     return (*((const pjsip_uri*)uri1)->vptr->p_compare)(context, uri1, uri2); 
    298 } 
    299  
    300 /** 
    301  * Generic function to print an URI object. 
    302  * 
    303  * @param context   Print context. 
    304  * @param uri       The URI to print. 
    305  * @param buf       The buffer. 
    306  * @param size      Size of the buffer. 
    307  * @return          Length printed. 
    308  */ 
    309 PJ_INLINE(int) pjsip_uri_print(pjsip_uri_context_e context, 
    310                                const void *uri, 
    311                                char *buf, pj_size_t size) 
    312 { 
    313     return (*((const pjsip_uri*)uri)->vptr->p_print)(context, uri, buf, size); 
    314 } 
    315  
    316 /** 
    317  * Generic function to clone an URI object. 
    318  * 
    319  * @param pool      Pool. 
    320  * @param uri       URI to clone. 
    321  * @return          New URI. 
    322  */ 
    323 PJ_INLINE(void*) pjsip_uri_clone( pj_pool_t *pool, const void *uri ) 
    324 { 
    325     return (*((const pjsip_uri*)uri)->vptr->p_clone)(pool, uri); 
    326 } 
    327  
    328  
    329 /** 
    330360 * Create new SIP URL and initialize all fields with zero or NULL. 
    331361 * @param pool      The pool. 
     
    345375 * Initialize SIP URL (all fields are set to NULL or zero). 
    346376 * @param url       The URL. 
     377 * @param secure    Create sips URI? 
    347378 */ 
    348379PJ_DECL(void)  pjsip_sip_uri_init(pjsip_sip_uri *url, int secure); 
Note: See TracChangeset for help on using the changeset viewer.