SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osip_call_id.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_CALL_ID_H_
22 #define _OSIP_CALL_ID_H_
23 
39  typedef struct osip_call_id osip_call_id_t;
40 
45  struct osip_call_id
46  {
47  char *number;
48  char *host;
49  };
50 
51 #ifdef __cplusplus
52 extern "C"
53 {
54 #endif
55 
60  int osip_call_id_init (osip_call_id_t ** header);
65  void osip_call_id_free (osip_call_id_t * header);
71  int osip_call_id_parse (osip_call_id_t * header, const char *hvalue);
77  int osip_call_id_to_str (const osip_call_id_t * header, char **dest);
83  int osip_call_id_clone (const osip_call_id_t * header, osip_call_id_t ** dest);
89  void osip_call_id_set_number (osip_call_id_t * header, char *value);
94  char *osip_call_id_get_number (osip_call_id_t * header);
100  void osip_call_id_set_host (osip_call_id_t * header, char *value);
105  char *osip_call_id_get_host (osip_call_id_t * header);
106 
113  int osip_call_id_match (osip_call_id_t * callid1, osip_call_id_t * callid2);
114 
115 #ifdef __cplusplus
116 }
117 #endif
118 
121 #endif
void osip_call_id_free(osip_call_id_t *header)
Free a Call-id element.
char * osip_call_id_get_number(osip_call_id_t *header)
Get the number from a Call-Id header.
char * host
Call-ID host information.
Definition: osip_call_id.h:48
char * number
Call-ID number.
Definition: osip_call_id.h:47
void osip_call_id_set_host(osip_call_id_t *header, char *value)
Set the host in the Call-Id element.
void osip_call_id_set_number(osip_call_id_t *header, char *value)
Set the number in the Call-Id element.
char * osip_call_id_get_host(osip_call_id_t *header)
Get the host from a Call-Id header.
int osip_call_id_clone(const osip_call_id_t *header, osip_call_id_t **dest)
Clone a Call-id element.
char * value[96]
Definition: cgiserver.cpp:90
int osip_call_id_match(osip_call_id_t *callid1, osip_call_id_t *callid2)
Check if the Call-Id headers match.
int osip_call_id_to_str(const osip_call_id_t *header, char **dest)
Get a string representation of a Call-id element.
Definition of the Call-Id header.
Definition: osip_call_id.h:45
int osip_call_id_parse(osip_call_id_t *header, const char *hvalue)
Parse a Call-id element.
int osip_call_id_init(osip_call_id_t **header)
Allocate a Call-id element.