|
libosip 3.6.0
|
00001 /* 00002 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-) 00003 Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Aymeric MOIZARD jack@atosc.org 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00020 00021 #ifndef _OSIP_TO_H_ 00022 #define _OSIP_TO_H_ 00023 00024 #include <osipparser2/headers/osip_from.h> 00025 00041 typedef osip_from_t osip_to_t; 00042 00043 #ifdef __cplusplus 00044 extern "C" 00045 { 00046 #endif 00047 00048 #ifndef MINISIZE 00049 00053 int osip_to_init (osip_to_t ** header); 00058 void osip_to_free (osip_to_t * header); 00064 int osip_to_parse (osip_to_t * header, const char *hvalue); 00070 int osip_to_to_str (const osip_to_t * header, char **dest); 00076 int osip_to_clone (const osip_to_t * header, osip_to_t ** dest); 00083 int osip_to_tag_match (osip_to_t * to1, osip_to_t * to2); 00084 #else 00085 #define osip_to_init osip_from_init 00086 #define osip_to_free osip_from_free 00087 #define osip_to_parse osip_from_parse 00088 #define osip_to_to_str osip_from_to_str 00089 #define osip_to_clone osip_from_clone 00090 #define osip_to_tag_match osip_from_tag_match 00091 #endif 00092 00097 #define osip_to_set_displayname(header,value) osip_from_set_displayname((osip_from_t*)header,value) 00098 00102 #define osip_to_get_displayname(header) osip_from_get_displayname((osip_from_t*)header) 00103 00108 #define osip_to_set_url(header,url) osip_from_set_url((osip_from_t*)header,url) 00109 00113 #define osip_to_get_url(header) osip_from_get_url((osip_from_t*)header) 00114 00120 #define osip_to_param_get(header,pos,dest) osip_from_param_get((osip_from_t*)header,pos,dest) 00121 00127 #define osip_to_param_get_byname(header,name,dest) osip_generic_param_get_byname((&(header)->gen_params),name,dest) 00128 00134 #define osip_to_param_add(header,name,value) osip_generic_param_add((&(header)->gen_params),name,value) 00135 00141 #define osip_to_set_tag(header,value) osip_generic_param_add((&(header)->gen_params), osip_strdup("tag"),value) 00142 00147 #define osip_to_get_tag(header,dest) osip_generic_param_get_byname((&(header)->gen_params), "tag",dest) 00148 00149 #ifndef DOXYGEN /* avoid DOXYGEN warning */ 00150 /* Compare the username, host and tag part of the two froms */ 00151 #define osip_to_compare(header1, header2) osip_from_compare((osip_from_t *)header1, (osip_from_t *)header2) 00152 #endif 00153 00154 #ifdef __cplusplus 00155 } 00156 #endif 00157 00160 #endif
1.7.3