2 The oSIP library implements the Session Initiation Protocol (SIP -rfc2543-)
3 Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org
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.
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.
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
21 #ifndef _OSIP_CALL_ID_H_
22 #define _OSIP_CALL_ID_H_
25 * @file osip_call_id.h
26 * @brief oSIP osip_call_id header definition.
30 * @defgroup oSIP_CALL_ID oSIP call-id header definition.
31 * @ingroup oSIP_HEADERS
36 * Structure for Call-Id headers.
37 * @defvar osip_call_id_t
39 typedef struct osip_call_id osip_call_id_t;
53 * Allocate a Call-id element.
54 * @param header The element to work on.
56 int osip_call_id_init (osip_call_id_t ** header);
58 * Free a Call-id element.
59 * @param header The element to work on.
61 void osip_call_id_free (osip_call_id_t * header);
63 * Parse a Call-id element.
64 * @param header The element to work on.
65 * @param hvalue The string to parse.
67 int osip_call_id_parse (osip_call_id_t * header, const char *hvalue);
69 * Get a string representation of a Call-id element.
70 * @param header The element to work on.
71 * @param dest A pointer on the new allocated string.
73 int osip_call_id_to_str (const osip_call_id_t * header, char **dest);
75 * Clone a Call-id element.
76 * @param header The element to work on.
77 * @param dest A pointer on the copy of the element.
79 int osip_call_id_clone (const osip_call_id_t * header, osip_call_id_t ** dest);
81 * Set the number in the Call-Id element.
82 * @param header The element to work on.
83 * @param value The value of the element.
85 void osip_call_id_set_number (osip_call_id_t * header, char *value);
87 * Get the number from a Call-Id header.
88 * @param header The element to work on.
90 char *osip_call_id_get_number (osip_call_id_t * header);
92 * Set the host in the Call-Id element.
93 * @param header The element to work on.
94 * @param value The value of the element.
96 void osip_call_id_set_host (osip_call_id_t * header, char *value);
98 * Get the host from a Call-Id header.
99 * @param header The element to work on.
101 char *osip_call_id_get_host (osip_call_id_t * header);
104 * Check if the Call-Id headers match.
105 * NOTE: THIS IS AN INTERNAL METHOD ONLY
106 * @param callid1 The initial Call-Id header.
107 * @param callid2 The new Call-Id header.
109 int osip_call_id_match (osip_call_id_t * callid1, osip_call_id_t * callid2);