diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-01-10 13:31:40 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-01-10 13:31:40 +0000 |
commit | 4dc1b31807de4da871158d4af5d0a8e752e47111 (patch) | |
tree | c0f4461767fe1d55cb542d3e89fc243c2255abd5 /pjsip/include | |
parent | 8757a26cbbabd54c5662bf9b492214fe937dc93a (diff) |
Renamed pjsip_url to pjsip_sip_uri
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@119 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip/sip_msg.h | 17 | ||||
-rw-r--r-- | pjsip/include/pjsip/sip_msg_i.h | 29 | ||||
-rw-r--r-- | pjsip/include/pjsip/sip_uri.h | 18 |
3 files changed, 19 insertions, 45 deletions
diff --git a/pjsip/include/pjsip/sip_msg.h b/pjsip/include/pjsip/sip_msg.h index 229f2c77..3be3c2f8 100644 --- a/pjsip/include/pjsip/sip_msg.h +++ b/pjsip/include/pjsip/sip_msg.h @@ -716,7 +716,10 @@ PJ_DECL(void*) pjsip_msg_find_remove_hdr( pjsip_msg *msg, * @bug Once the header is put in a list (or message), it can not be put in * other list (or message). Otherwise Real Bad Thing will happen. */ -PJ_IDECL(void) pjsip_msg_add_hdr( pjsip_msg *msg, pjsip_hdr *hdr ); +PJ_INLINE(void) pjsip_msg_add_hdr( pjsip_msg *msg, pjsip_hdr *hdr ) +{ + pj_list_insert_before(&msg->hdr, hdr); +} /** * Add header field to the message, putting it in the front of the header list. @@ -727,7 +730,10 @@ PJ_IDECL(void) pjsip_msg_add_hdr( pjsip_msg *msg, pjsip_hdr *hdr ); * @bug Once the header is put in a list (or message), it can not be put in * other list (or message). Otherwise Real Bad Thing will happen. */ -PJ_IDECL(void) pjsip_msg_insert_first_hdr( pjsip_msg *msg, pjsip_hdr *hdr ); +PJ_INLINE(void) pjsip_msg_insert_first_hdr( pjsip_msg *msg, pjsip_hdr *hdr ) +{ + pj_list_insert_after(&msg->hdr, hdr); +} /** * Print the message to the specified buffer. @@ -1551,13 +1557,6 @@ typedef pjsip_generic_string_hdr pjsip_warning_hdr; * @} // PJSIP_MSG */ -/* - * Include inline definitions. - */ -#if PJ_FUNCTIONS_ARE_INLINED -# include <pjsip/sip_msg_i.h> -#endif - PJ_END_DECL diff --git a/pjsip/include/pjsip/sip_msg_i.h b/pjsip/include/pjsip/sip_msg_i.h deleted file mode 100644 index c6c87b9a..00000000 --- a/pjsip/include/pjsip/sip_msg_i.h +++ /dev/null @@ -1,29 +0,0 @@ -/* $Id$ */ -/* - * Copyright (C) 2003-2006 Benny Prijono <benny@prijono.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -PJ_IDEF(void) pjsip_msg_add_hdr( pjsip_msg *msg, pjsip_hdr *hdr ) -{ - pj_list_insert_before(&msg->hdr, hdr); -} - -PJ_IDEF(void) pjsip_msg_insert_first_hdr( pjsip_msg *msg, pjsip_hdr *hdr ) -{ - pj_list_insert_after(&msg->hdr, hdr); -} - diff --git a/pjsip/include/pjsip/sip_uri.h b/pjsip/include/pjsip/sip_uri.h index 63f0dfe1..3ee19354 100644 --- a/pjsip/include/pjsip/sip_uri.h +++ b/pjsip/include/pjsip/sip_uri.h @@ -105,7 +105,10 @@ PJ_DECL(void) pjsip_param_shallow_clone(pj_pool_t *pool, * @param size Size of buffer. * @param pname_unres Specification of allowed characters in pname. * @param pvalue_unres Specification of allowed characters in pvalue. - * @param sep Separator character (either ';' or ','). + * @param sep Separator character (either ';', ',', or '?'). + * When separator is set to '?', this function will + * automatically adjust the separator character to + * '&' after the first parameter is printed. * * @return The number of bytes printed, or -1 on errr. */ @@ -221,7 +224,7 @@ struct pjsip_uri /** * SIP and SIPS URL scheme. */ -typedef struct pjsip_url +typedef struct pjsip_sip_uri { pjsip_uri_vptr *vptr; /**< Pointer to virtual function table.*/ pj_str_t user; /**< Optional user part. */ @@ -236,7 +239,7 @@ typedef struct pjsip_url pj_str_t maddr_param; /**< Optional maddr param */ pjsip_param other_param; /**< Other parameters grouped together. */ pjsip_param header_param; /**< Optional header parameter. */ -} pjsip_url; +} pjsip_sip_uri; /** @@ -329,20 +332,20 @@ PJ_INLINE(void*) pjsip_uri_clone( pj_pool_t *pool, const void *uri ) * @param secure Tlag to indicate whether secure transport should be used. * @return SIP URL. */ -PJ_DECL(pjsip_url*) pjsip_url_create( pj_pool_t *pool, int secure ); +PJ_DECL(pjsip_sip_uri*) pjsip_url_create( pj_pool_t *pool, int secure ); /** * Create new SIPS URL and initialize all fields with zero or NULL. * @param pool The pool. * @return SIPS URL. */ -PJ_DECL(pjsip_url*) pjsips_url_create( pj_pool_t *pool ); +PJ_DECL(pjsip_sip_uri*) pjsips_url_create( pj_pool_t *pool ); /** * Initialize SIP URL (all fields are set to NULL or zero). * @param url The URL. */ -PJ_DECL(void) pjsip_url_init(pjsip_url *url, int secure); +PJ_DECL(void) pjsip_url_init(pjsip_sip_uri *url, int secure); /** * Perform full assignment to the SIP URL. @@ -350,7 +353,8 @@ PJ_DECL(void) pjsip_url_init(pjsip_url *url, int secure); * @param url Destination URL. * @param rhs The source URL. */ -PJ_DECL(void) pjsip_url_assign(pj_pool_t *pool, pjsip_url *url, const pjsip_url *rhs); +PJ_DECL(void) pjsip_url_assign(pj_pool_t *pool, pjsip_sip_uri *url, + const pjsip_sip_uri *rhs); /** * Create new instance of name address and initialize all fields with zero or |