SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osip_header.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_HEADER_H_
22 #define _OSIP_HEADER_H_
23 
24 #include <osipparser2/osip_uri.h>
25 
46  typedef struct osip_header osip_header_t;
47 
52  struct osip_header
53  {
54  char *hname;
55  char *hvalue;
56  };
57 
66 
67 #ifdef __cplusplus
68 extern "C"
69 {
70 #endif
71 
76  int osip_header_init (osip_header_t ** header);
81  void osip_header_free (osip_header_t * header);
87  int osip_header_to_str (const osip_header_t * header, char **dest);
92  char *osip_header_get_name (const osip_header_t * header);
98  void osip_header_set_name (osip_header_t * header, char *pname);
103  char *osip_header_get_value (const osip_header_t * header);
109  void osip_header_set_value (osip_header_t * header, char *pvalue);
115  int osip_header_clone (const osip_header_t * header, osip_header_t ** dest);
116 
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
124 #endif
int osip_header_clone(const osip_header_t *header, osip_header_t **dest)
Clone a header element.
void osip_header_set_name(osip_header_t *header, char *pname)
Set the token name a header element.
int osip_header_init(osip_header_t **header)
Allocate a header element.
char * osip_header_get_name(const osip_header_t *header)
Get the token name a header element.
void osip_header_set_value(osip_header_t *header, char *pvalue)
Set the token value a header element.
char * osip_header_get_value(const osip_header_t *header)
Get the token value a header element.
osip_uri_param_t osip_generic_param_t
Structure for generic parameter headers.
Definition: osip_header.h:65
char * hname
Name of header.
Definition: osip_header.h:54
int osip_header_to_str(const osip_header_t *header, char **dest)
Get a string representation of a header element.
void osip_header_free(osip_header_t *header)
Free a header element.
Definition of a generic sip header.
Definition: osip_header.h:52
char * hvalue
Value for header.
Definition: osip_header.h:55
Structure for referencing url parameters.
Definition: osip_uri.h:55
oSIP url parser Routines