libosip  5.3.0
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-2020 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 #ifndef _OSIP_CONTACT_H_
21 #define _OSIP_CONTACT_H_
22 
24 
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 #ifndef MINISIZE
51 int osip_contact_init(osip_contact_t **header);
56 void osip_contact_free(osip_contact_t *header);
57 #endif
63 int osip_contact_parse(osip_contact_t *header, const char *hvalue);
69 int osip_contact_to_str(const osip_contact_t *header, char **dest);
70 #ifndef MINISIZE
76 int osip_contact_clone(const osip_contact_t *header, osip_contact_t **dest);
77 #else
78 #define osip_contact_init osip_from_init
79 #define osip_contact_free osip_from_free
80 #define osip_contact_clone osip_from_clone
81 #endif
86 #define osip_contact_get_displayname(header) osip_from_get_displayname((osip_from_t *) header)
92 #define osip_contact_set_displayname(header, value) osip_from_set_displayname((osip_from_t *) header, value)
97 #define osip_contact_get_url(header) osip_from_get_url((osip_from_t *) header)
103 #define osip_contact_set_url(header, url) osip_from_set_url((osip_from_t *) header, url)
110 #define osip_contact_param_get(header, pos, dest) osip_from_param_get((osip_from_t *) header, pos, dest)
117 #define osip_contact_param_add(header, name, value) osip_generic_param_add((&(header)->gen_params), name, value)
124 #define osip_contact_param_get_byname(header, name, dest) osip_generic_param_get_byname((&(header)->gen_params), name, dest)
125 
126 #ifdef __cplusplus
127 }
128 #endif
129 
132 #endif
int osip_contact_parse(osip_contact_t *header, const char *hvalue)
Definition: osip_contact.c:58
int osip_contact_init(osip_contact_t **header)
Definition: osip_contact.c:76
int osip_contact_clone(const osip_contact_t *header, osip_contact_t **dest)
Definition: osip_contact.c:129
void osip_contact_free(osip_contact_t *header)
Definition: osip_contact.c:125
int osip_contact_to_str(const osip_contact_t *header, char **dest)
Definition: osip_contact.c:104
osip_from_t osip_contact_t
Definition: osip_contact.h:40
oSIP osip_from header definition.
Definition: osip_from.h:47