libosip  5.3.0
osip_content_type.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_CONTENT_TYPE_H_
21 #define _OSIP_CONTENT_TYPE_H_
22 
23 #include <osipparser2/osip_list.h>
24 
41 
47  char *type;
48  char *subtype;
50 };
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
71 int osip_content_type_parse(osip_content_type_t *header, const char *hvalue);
77 int osip_content_type_to_str(const osip_content_type_t *header, char **dest);
84 
91 #define osip_content_type_param_add(header, name, value) osip_generic_param_add((&(header)->gen_params), name, value)
98 #define osip_content_type_param_get_byname(header, name, dest) osip_generic_param_get_byname((&(header)->gen_params), name, dest)
99 
100 #ifdef __cplusplus
101 }
102 #endif
103 
106 #endif
int osip_content_type_parse(osip_content_type_t *header, const char *hvalue)
Definition: osip_content_type.c:84
int osip_content_type_clone(const osip_content_type_t *header, osip_content_type_t **dest)
Definition: osip_content_type.c:214
int osip_content_type_to_str(const osip_content_type_t *header, char **dest)
Definition: osip_content_type.c:144
void osip_content_type_free(osip_content_type_t *header)
Definition: osip_content_type.c:199
int osip_content_type_init(osip_content_type_t **header)
Definition: osip_content_type.c:27
oSIP list Routines
Definition: osip_content_type.h:46
osip_list_t gen_params
Definition: osip_content_type.h:49
char * subtype
Definition: osip_content_type.h:48
char * type
Definition: osip_content_type.h:47
Definition: osip_list.h:87