SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osip_contact.h
Go to the documentation of this file.
1 /*
2  The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
3  Copyright (C) 2001-2015 Aymeric MOIZARD amoizard@antisip.com
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 
20 
21 #ifndef _OSIP_CONTACT_H_
22 #define _OSIP_CONTACT_H_
23 
25 
42 
43 #ifdef __cplusplus
44 extern "C"
45 {
46 #endif
47 
48 #ifndef MINISIZE
49 
53  int osip_contact_init (osip_contact_t ** header);
58  void osip_contact_free (osip_contact_t * header);
59 #endif
60 
65  int osip_contact_parse (osip_contact_t * header, const char *hvalue);
71  int osip_contact_to_str (const osip_contact_t * header, char **dest);
72 #ifndef MINISIZE
73 
78  int osip_contact_clone (const osip_contact_t * header, osip_contact_t ** dest);
79 #else
80  #define osip_contact_init osip_from_init
81  #define osip_contact_free osip_from_free
82  #define osip_contact_clone osip_from_clone
83 #endif
84 
88 #define osip_contact_get_displayname(header) osip_from_get_displayname((osip_from_t*)header)
89 
94 #define osip_contact_set_displayname(header,value) osip_from_set_displayname((osip_from_t*)header, value)
95 
99 #define osip_contact_get_url(header) osip_from_get_url((osip_from_t*)header)
100 
105 #define osip_contact_set_url(header,url) osip_from_set_url((osip_from_t*)header,url)
106 
112 #define osip_contact_param_get(header,pos,dest) osip_from_param_get((osip_from_t*)header,pos,dest)
113 
119 #define osip_contact_param_add(header,name, value) osip_generic_param_add((&(header)->gen_params), name,value)
120 
126 #define osip_contact_param_get_byname(header,name,dest) osip_generic_param_get_byname((&(header)->gen_params),name,dest)
127 
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
135 #endif
int osip_contact_clone(const osip_contact_t *header, osip_contact_t **dest)
Clone a Contact element.
int osip_contact_init(osip_contact_t **header)
Allocate a Contact element.
osip_from_t osip_contact_t
Structure for Contact headers.
Definition: osip_contact.h:41
oSIP osip_from header definition.
Definition of the From header.
Definition: osip_from.h:48
int osip_contact_parse(osip_contact_t *header, const char *hvalue)
Parse a Contact element.
int osip_contact_to_str(const osip_contact_t *header, char **dest)
Get a string representation of a Contact element.
void osip_contact_free(osip_contact_t *header)
Free a Contact element.