SIP Witch 1.9.15: osip_via.h Source File

SIP Witch 1.9.15
osip_via.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_VIA_H_
22 #define _OSIP_VIA_H_
23 
24 #include <osipparser2/osip_list.h>
25 
41   typedef struct osip_via osip_via_t;
42 
47   struct osip_via
48  {
49   char *version;
50   char *protocol;
51   char *host;
52   char *port;
53   char *comment;
54   osip_list_t via_params;
55  };
56 
57 #ifdef __cplusplus
58 extern "C"
59 {
60 #endif
61 
66  int osip_via_init (osip_via_t ** header);
71  void osip_via_free (osip_via_t * header);
77  int osip_via_parse (osip_via_t * header, const char *hvalue);
83  int osip_via_to_str (const osip_via_t * header, char **dest);
89  int osip_via_clone (const osip_via_t * header, osip_via_t ** dest);
95  void via_set_version (osip_via_t * header, char *value);
96  #define osip_via_set_version via_set_version
97 
101  char *via_get_version (osip_via_t * header);
102  #define osip_via_get_version via_get_version
103 
108  void via_set_protocol (osip_via_t * header, char *value);
109  #define osip_via_set_protocol via_set_protocol
110 
114  char *via_get_protocol (osip_via_t * header);
115  #define osip_via_get_protocol via_get_protocol
116 
121  void via_set_host (osip_via_t * header, char *value);
122  #define osip_via_set_host via_set_host
123 
127  char *via_get_host (osip_via_t * header);
128  #define osip_via_get_host via_get_host
129 
134  void via_set_port (osip_via_t * header, char *value);
135  #define osip_via_set_port via_set_port
136 
140  char *via_get_port (osip_via_t * header);
141  #define osip_via_get_port via_get_port
142 
147  void via_set_comment (osip_via_t * header, char *value);
148  #define osip_via_set_comment via_set_comment
149 
153  char *via_get_comment (osip_via_t * header);
154  #define osip_via_get_comment via_get_comment
155 
160  #define osip_via_set_hidden(header) osip_generic_param_add((&(header)->via_params),osip_strdup("hidden"),NULL)
161 
166  #define osip_via_set_ttl(header,value) osip_generic_param_add((&(header)->via_params),osip_strdup("ttl"),value)
167 
172  #define osip_via_set_maddr(header,value) osip_generic_param_add((&(header)->via_params),osip_strdup("maddr"),value)
173 
178  #define osip_via_set_received(header,value) osip_generic_param_add((&(header)->via_params),osip_strdup("received"),value)
179 
184  #define osip_via_set_branch(header,value) osip_generic_param_add((&(header)->via_params),osip_strdup("branch"),value)
185 
192  #define osip_via_param_add(header,name,value) osip_generic_param_add((&(header)->via_params),name,value)
193 
199  #define osip_via_param_get_byname(header,name,dest) osip_generic_param_get_byname((&(header)->via_params),name,dest)
200 
207  int osip_via_match (osip_via_t * via1, osip_via_t * via2);
208 
209 #ifdef __cplusplus
210 }
211 #endif
212 
215 #endif
via_get_host
char * via_get_host(osip_via_t *header)
Get the host from a Via header.
osip_list
Structure for referencing a list of elements.
Definition: osip_list.h:82
via_get_version
char * via_get_version(osip_via_t *header)
Get the SIP version from a Via header.
via_set_host
void via_set_host(osip_via_t *header, char *value)
Set the host in the Via element.
osip_via_free
void osip_via_free(osip_via_t *header)
Free a Via element.
osip_via_clone
int osip_via_clone(const osip_via_t *header, osip_via_t **dest)
Clone a Via element.
osip_via::port
char * port
Port where to send answers.
Definition: osip_via.h:52
via_get_protocol
char * via_get_protocol(osip_via_t *header)
Get the protocol from a Via header.
osip_via_parse
int osip_via_parse(osip_via_t *header, const char *hvalue)
Parse a Via element.
osip_list.h
oSIP list Routines
via_set_port
void via_set_port(osip_via_t *header, char *value)
Set the port in the Via element.
osip_via_match
int osip_via_match(osip_via_t *via1, osip_via_t *via2)
Check if the Via headers match.
via_get_port
char * via_get_port(osip_via_t *header)
Get the port from a Via header.
via_get_comment
char * via_get_comment(osip_via_t *header)
Get the comment from a Via header.
osip_via::version
char * version
SIP Version.
Definition: osip_via.h:49
osip_via::via_params
osip_list_t via_params
Via parameters.
Definition: osip_via.h:54
osip_via_init
int osip_via_init(osip_via_t **header)
Allocate a Via element.
value
char * value[96]
Definition: cgiserver.cpp:90
via_set_protocol
void via_set_protocol(osip_via_t *header, char *value)
Set the protocol in the Via element.
osip_via
Definition of the Via header.
Definition: osip_via.h:47
osip_via::comment
char * comment
Comments about SIP Agent.
Definition: osip_via.h:53
osip_via::protocol
char * protocol
Protocol used by SIP Agent.
Definition: osip_via.h:50
via_set_comment
void via_set_comment(osip_via_t *header, char *value)
Set the comment in the Via element.
osip_via::host
char * host
Host where to send answers.
Definition: osip_via.h:51
via_set_version
void via_set_version(osip_via_t *header, char *value)
Set the SIP version in the Via element.
osip_via_to_str
int osip_via_to_str(const osip_via_t *header, char **dest)
Get a string representation of a Via element.

Generated on Dec 21, 2017 for sipwitch-1.9.15 (*.h and *.cpp), libosip2-5.0.0 (*.h) and libeXosip2-4.0.0 (*.h), by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /