diff options
Diffstat (limited to 'tinySIP/include/tinysip/headers')
95 files changed, 6307 insertions, 0 deletions
diff --git a/tinySIP/include/tinysip/headers/tsip_header.h b/tinySIP/include/tinysip/headers/tsip_header.h new file mode 100644 index 0000000..b611140 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header.h @@ -0,0 +1,196 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header.h + * @brief Defines a SIP header (field-name: field-value). + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef TINYSIP_HEADER_H +#define TINYSIP_HEADER_H + +#include "tinysip_config.h" + +#include "tsk_ragel_state.h" + +#include "tsk_params.h" +#include "tsk_object.h" +#include "tsk_safeobj.h" +#include "tsk_memory.h" +#include "tsk_string.h" +#include "tsk_list.h" +#include "tsk_buffer.h" + +TSIP_BEGIN_DECLS + +struct tsip_header_s; + +#define TSIP_HEADER(self) ((tsip_header_t*)(self)) +#define TSIP_HEADER_PARAMS(self) (TSIP_HEADER(self)->params) +#define TSIP_HEADER_VALUE_SERIALIZE_F(self) ((tsip_header_value_serialize_f)(self)) +#define TSIP_HEADER_GET_PARAM_VALUE_F(self) ((tsip_header_get_param_value_f)(self)) + +typedef int (*tsip_header_value_serialize_f)(const struct tsip_header_s* header, tsk_buffer_t* output); +typedef char* (*tsip_header_get_special_param_value_f)(const struct tsip_header_s* header, const char* pname); + +/** + * @enum tsip_header_type_e + * + * @brief List of all supported headers. +**/ +typedef enum tsip_header_type_e +{ + tsip_htype_Accept, + tsip_htype_Accept_Contact, + tsip_htype_Accept_Encoding, + tsip_htype_Accept_Language, + tsip_htype_Accept_Resource_Priority, + tsip_htype_Alert_Info, + tsip_htype_Allow, + tsip_htype_Allow_Events, + tsip_htype_Authentication_Info, + tsip_htype_Authorization, + tsip_htype_Call_ID, + tsip_htype_Call_Info, + tsip_htype_Contact, + tsip_htype_Content_Disposition, + tsip_htype_Content_Encoding, + tsip_htype_Content_Language, + tsip_htype_Content_Length, + tsip_htype_Content_Type, + tsip_htype_CSeq, + tsip_htype_Date, + tsip_htype_Dummy, + tsip_htype_Error_Info, + tsip_htype_Event, + tsip_htype_Expires, + tsip_htype_From, + tsip_htype_History_Info, + tsip_htype_Identity, + tsip_htype_Identity_Info, + tsip_htype_In_Reply_To, + tsip_htype_Join, + tsip_htype_Max_Forwards, + tsip_htype_MIME_Version, + tsip_htype_Min_Expires, + tsip_htype_Min_SE, + tsip_htype_Organization, + tsip_htype_Path, + tsip_htype_Priority, + tsip_htype_Privacy, + tsip_htype_Proxy_Authenticate, + tsip_htype_Proxy_Authorization, + tsip_htype_Proxy_Require, + tsip_htype_RAck, + tsip_htype_Reason, + tsip_htype_Record_Route, + tsip_htype_Refer_Sub, + tsip_htype_Refer_To, + tsip_htype_Referred_By, + tsip_htype_Reject_Contact, + tsip_htype_Replaces, + tsip_htype_Reply_To, + tsip_htype_Request_Disposition, + tsip_htype_Require, + tsip_htype_Resource_Priority, + tsip_htype_Retry_After, + tsip_htype_Route, + tsip_htype_RSeq, + tsip_htype_Security_Client, + tsip_htype_Security_Server, + tsip_htype_Security_Verify, + tsip_htype_Server, + tsip_htype_Service_Route, + tsip_htype_Session_Expires, + tsip_htype_SIP_ETag, + tsip_htype_SIP_If_Match, + tsip_htype_Subject, + tsip_htype_Subscription_State, + tsip_htype_Supported, + tsip_htype_Target_Dialog, + tsip_htype_Timestamp, + tsip_htype_To, + tsip_htype_Unsupported, + tsip_htype_User_Agent, + tsip_htype_Via, + tsip_htype_Warning, + tsip_htype_WWW_Authenticate, + tsip_htype_P_Access_Network_Info, + tsip_htype_P_Answer_State, + tsip_htype_P_Asserted_Identity, + tsip_htype_P_Associated_URI, + tsip_htype_P_Called_Party_ID, + tsip_htype_P_Charging_Function_Addresses, + tsip_htype_P_Charging_Vector, + tsip_htype_P_DCS_Billing_Info, + tsip_htype_P_DCS_LAES, + tsip_htype_P_DCS_OSPS, + tsip_htype_P_DCS_Redirect, + tsip_htype_P_DCS_Trace_Party_ID, + tsip_htype_P_Early_Media, + tsip_htype_P_Media_Authorization, + tsip_htype_P_Preferred_Identity, + tsip_htype_P_Profile_Key, + tsip_htype_P_User_Database, + tsip_htype_P_Visited_Network_ID +} +tsip_header_type_t; + +/*================================ +*/ +typedef struct tsip_header_s +{ + TSK_DECLARE_OBJECT; + tsip_header_type_t type; + tsip_header_value_serialize_f serialize; + tsip_header_get_special_param_value_f get_special_param_value; + tsk_params_L_t *params; +} +tsip_header_t; + +#define TSIP_DECLARE_HEADER tsip_header_t __header__ +typedef tsk_list_t tsip_headers_L_t; /**< List of @ref tsip_header_t elements. */ +/* +================================*/ + +TINYSIP_API const char *tsip_header_get_name(tsip_header_type_t type); +TINYSIP_API const char *tsip_header_get_name_2(const tsip_header_t *self); +TINYSIP_API char tsip_header_get_param_separator(const tsip_header_t *self); +TINYSIP_API int tsip_header_serialize(const tsip_header_t *self, tsk_buffer_t *output); +TINYSIP_API char* tsip_header_tostring(const tsip_header_t *self); +TINYSIP_API int tsip_header_value_serialize(const tsip_header_t *self, tsk_buffer_t *output); +TINYSIP_API char* tsip_header_value_tostring(const tsip_header_t *self); +TINYSIP_API char* tsip_header_get_param_value(const tsip_header_t *self, const char* pname); + +#define TSIP_HEADER_HAVE_PARAM(self, name) ((self) && TSIP_HEADER((self))->params) ? tsk_params_have_param(TSIP_HEADER(self)->params, name) : tsk_false +#define TSIP_HEADER_ADD_PARAM(self, name, value) tsk_params_add_param((self) ? &TSIP_HEADER((self))->params : tsk_null, name, value) +#define TSIP_HEADER_REMOVE_PARAM(self, name) tsk_params_remove_param((self) ? TSIP_HEADER((self))->params : tsk_null, name) +#define TSIP_HEADER_GET_PARAM_BY_NAME(self, name) tsk_params_get_param_by_name((self) ? TSIP_HEADER((self))->params : tsk_null, name) +#define TSIP_HEADER_GET_PARAM_VALUE(self, name) tsk_params_get_param_value((self) ? TSIP_HEADER((self))->params : tsk_null, name) +#define TSIP_HEADER_GET_PARAM_VALUE_AS_INT(self, name) tsk_params_get_param_value_as_int((self) ? TSIP_HEADER((self))->params : tsk_null, name) + +TSIP_END_DECLS + +#endif /* TINYSIP_HEADERS_H */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Accept_Contact.h b/tinySIP/include/tinysip/headers/tsip_header_Accept_Contact.h new file mode 100644 index 0000000..19aaa1b --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Accept_Contact.h @@ -0,0 +1,56 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Accept_Contact.h + * @brief SIP header 'Accept-Contact'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ACCEPT_CONTACT_H_ +#define _TSIP_HEADER_ACCEPT_CONTACT_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Accept-Contact' as per RFC 3261 subclause . +/// @author Mamadou +/// @date 12/3/2009 +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Accept_Contact_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Accept_Contact_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ACCEPT_CONTACT_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Accept_Encoding.h b/tinySIP/include/tinysip/headers/tsip_header_Accept_Encoding.h new file mode 100644 index 0000000..efff6cd --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Accept_Encoding.h @@ -0,0 +1,56 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Accept_Encoding.h + * @brief SIP header 'Accept-Encoding'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ACCEPT_ENCODING_H_ +#define _TSIP_HEADER_ACCEPT_ENCODING_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Accept-Encoding'. +/// @author Mamadou +/// @date 12/3/2009 +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Accept_Encoding_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Accept_Encoding_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ACCEPT_ENCODING_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Accept_Language.h b/tinySIP/include/tinysip/headers/tsip_header_Accept_Language.h new file mode 100644 index 0000000..fcb631b --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Accept_Language.h @@ -0,0 +1,56 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Accept_Language.h + * @brief SIP header 'Accept-Language'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ACCEPT_LANGUAGE_H_ +#define _TSIP_HEADER_ACCEPT_LANGUAGE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Accept-Contact' . +/// @author Mamadou +/// @date 12/3/2009 +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Accept_Language_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Accept_Language_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ACCEPT_LANGUAGE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Accept_Resource_Priority.h b/tinySIP/include/tinysip/headers/tsip_header_Accept_Resource_Priority.h new file mode 100644 index 0000000..09143a5 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Accept_Resource_Priority.h @@ -0,0 +1,56 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Accept_Resource_Priority.h + * @brief SIP header 'Accept-Resource-Priority'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ACCEPT_RESOURCE_PRIORITY_H_ +#define _TSIP_HEADER_ACCEPT_RESOURCE_PRIORITY_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Accept-Contact' . +/// @author Mamadou +/// @date 12/3/2009 +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Accept_Resource_Priority_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Accept_Resource_Priority_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ACCEPT_RESOURCE_PRIORITY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Alert_Info.h b/tinySIP/include/tinysip/headers/tsip_header_Alert_Info.h new file mode 100644 index 0000000..77a26be --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Alert_Info.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Alert_Info.h + * @brief SIP header 'Alert-Info'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ALERT_INFO_H_ +#define _TSIP_HEADER_ALERT_INFO_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Alert-Info' as per RFC 3261 subclause . +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Alert_Info_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Alert_Info_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ALERT_INFO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Allow.h b/tinySIP/include/tinysip/headers/tsip_header_Allow.h new file mode 100644 index 0000000..a43b9ba --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Allow.h @@ -0,0 +1,66 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Allow.h + * @brief SIP header 'Allow'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ALLOW_H_ +#define _TSIP_HEADER_ALLOW_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_ALLOW_DEFAULT "ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, UPDATE" +#define TSIP_HEADER_STR "Allow:" TSIP_HEADER_ALLOW_DEFAULT "\r\n" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Allow'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Allow_s +{ + TSIP_DECLARE_HEADER; + + tsk_strings_L_t *methods; +} +tsip_header_Allow_t; + +TINYSIP_API tsip_header_Allow_t* tsip_header_Allow_create(); + +TINYSIP_API tsip_header_Allow_t *tsip_header_Allow_parse(const char *data, tsk_size_t size); +TINYSIP_API tsk_bool_t tsip_header_Allow_allows(const tsip_header_Allow_t* self, const char* method); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Allow_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ALLOW_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Allow_Events.h b/tinySIP/include/tinysip/headers/tsip_header_Allow_Events.h new file mode 100644 index 0000000..d97b6b3 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Allow_Events.h @@ -0,0 +1,63 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Allow_Events.h + * @brief SIP header 'Allow-Events'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ALLOW_EVENTS_H_ +#define _TSIP_HEADER_ALLOW_EVENTS_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Allow-Events'. +/// +/// @par ABNF : Allow-Events = ( "Allow-Events" / "u" ) HCOLON event-type *(COMMA event-type) +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Allow_Events_s +{ + TSIP_DECLARE_HEADER; + + tsk_strings_L_t *events; +} +tsip_header_Allow_Events_t; + +TINYSIP_API tsip_header_Allow_Events_t* tsip_header_Allow_Events_create(); + +TINYSIP_API tsip_header_Allow_Events_t *tsip_header_Allow_Events_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Allow_Events_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ALLOW_EVENTS_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Authentication_Info.h b/tinySIP/include/tinysip/headers/tsip_header_Authentication_Info.h new file mode 100644 index 0000000..0736dbc --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Authentication_Info.h @@ -0,0 +1,56 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Authentication_Info.h + * @brief SIP header 'Authentication-Info'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_AUTHENTICATION_INFO_H_ +#define _TSIP_HEADER_AUTHENTICATION_INFO_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Authentication-Info'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Authentication_Info_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Authentication_Info_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_AUTHENTICATION_INFO_H_ */ + + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Authorization.h b/tinySIP/include/tinysip/headers/tsip_header_Authorization.h new file mode 100644 index 0000000..910fdc5 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Authorization.h @@ -0,0 +1,96 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Authorization.h + * @brief SIP header 'Authorization'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_AUTHORIZATION_H_ +#define _TSIP_HEADER_AUTHORIZATION_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Authorization' as per RFC 3261 subclause . +/// +/// @par ABNF = Authorization = "Authorization" HCOLON credentials +/// credentials = ("Digest" LWS digest-response) / other-response +/// digest-response = dig-resp *(COMMA dig-resp) +/// dig-resp = username / realm / nonce / digest-uri / dresponse / algorithm / cnonce / opaque / message-qop / nonce-count / auth-param / auts +/// username = "username" EQUAL username-value +/// username-value = quoted-string +/// digest-uri = "uri" EQUAL LDQUOT digest-uri-value RDQUOT +/// digest-uri-value = auth-request-uri ; equal to request-uri as specified by HTTP/1.1 +/// message-qop = "qop" EQUAL qop-value +/// cnonce = "cnonce" EQUAL cnonce-value +/// cnonce-value = nonce-value +/// nonce-count = "nc" EQUAL nc-value +/// nc-value = 8LHEX +/// dresponse = "response" EQUAL request-digest +/// request-digest = LDQUOT 32LHEX RDQUOT +/// auth-request-uri = not-defined +/// +/// auth-param = auth-param-name EQUAL ( token / quoted-string ) +/// auth-param-name = token +/// +/// other-response = auth-scheme LWS auth-param *(COMMA auth-param) +/// auth-scheme = token +/// auts = "auts" EQUAL auts-param +/// auts-param = LDQUOT auts-value RDQUOT +/// auts-value = [base64 encoding of AUTS] +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Authorization_s +{ + TSIP_DECLARE_HEADER; + + char* scheme; + char* username; + char* realm; + char* nonce; + char* uri; + char* response; + char* algorithm; + char* cnonce; + char* opaque; + char* qop; + char* nc; +} +tsip_header_Authorization_t; + +TINYSIP_API tsip_header_Authorization_t* tsip_header_Authorization_create(); + +TINYSIP_API tsip_header_Authorization_t *tsip_header_Authorization_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Authorization_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_AUTHORIZATION_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_CSeq.h b/tinySIP/include/tinysip/headers/tsip_header_CSeq.h new file mode 100644 index 0000000..98cd864 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_CSeq.h @@ -0,0 +1,71 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_CSeq.h + * @brief SIP header 'CSeq'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_CSEQ_H_ +#define _TSIP_HEADER_CSEQ_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tinysip/tsip_message_common.h" /* tsip_request_type_t */ + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_CSEQ_VA_ARGS(seq, method) tsip_header_CSeq_def_t, (int32_t) seq, (const char*)method + +#define TSIP_HEADER_CSEQ_NONE 0 +#define TSIP_HEADER_CSEQ_DEFAULT 1 + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'CSeq'. +/// +/// @par ABNF: CSeq = "CSeq" HCOLON 1*DIGIT LWS Method +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_CSeq_s +{ + TSIP_DECLARE_HEADER; + + char *method; + uint32_t seq; + tsip_request_type_t type; +} +tsip_header_CSeq_t; + +TINYSIP_API tsip_header_CSeq_t* tsip_header_CSeq_create(int32_t seq, const char*method); + +TINYSIP_API tsip_header_CSeq_t *tsip_header_CSeq_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_CSeq_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_CSEQ_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Call_ID.h b/tinySIP/include/tinysip/headers/tsip_header_Call_ID.h new file mode 100644 index 0000000..41a7f73 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Call_ID.h @@ -0,0 +1,68 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Call_ID.h + * @brief SIP header 'Call-ID'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_CALL_ID_H_ +#define _TSIP_HEADER_CALL_ID_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tsk_uuid.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_CALL_ID_VA_ARGS(call_id) tsip_header_Call_ID_def_t, (const char*)call_id + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Call-ID'. +/// +/// @par ABNF: Call-ID / i +/// callid = word [ "@" word ] +/// Call-ID = ( "Call-ID" / "i" ) HCOLON callid +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Call_ID_s +{ + TSIP_DECLARE_HEADER; + char *value; +} +tsip_header_Call_ID_t; + +TINYSIP_API tsip_header_Call_ID_t* tsip_header_Call_ID_create(const char* call_id); + +int tsip_header_Call_ID_random(tsk_uuidstring_t *result); +TINYSIP_API tsip_header_Call_ID_t *tsip_header_Call_ID_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Call_ID_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_CALL_ID_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Call_Info.h b/tinySIP/include/tinysip/headers/tsip_header_Call_Info.h new file mode 100644 index 0000000..72f0d1a --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Call_Info.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Call_Info.h + * @brief SIP header 'Call-Info'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_CALL_INFO_H_ +#define _TSIP_HEADER_CALL_INFO_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Call-Info'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Call_Info_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Call_Info_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_CALL_INFO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Contact.h b/tinySIP/include/tinysip/headers/tsip_header_Contact.h new file mode 100644 index 0000000..7fb200e --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Contact.h @@ -0,0 +1,90 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Contact.h + * @brief SIP header 'Contact' as per RFC 3261 subclause 20.1. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_CONTACT_H_ +#define _TSIP_HEADER_CONTACT_H_ + +#include "tinysip_config.h" +#include "tinysip/tsip_uri.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Contact'. +/// +/// @par ABNF: Contact = ( "Contact" / "m" ) HCOLON ( STAR / (contact-param *(COMMA contact-param))) +/// contact-param = (name-addr / addr-spec) *( SEMI contact-params) +/// contact-params = c-p-q / c-p-expires / feature-param / temp-gruu / pub-gruu / c-p-instance / contact-extension +/// c-p-q = "q" EQUAL qvalue +/// c-p-expires = "expires" EQUAL delta-seconds +/// feature-param = enc-feature-tag [ EQUAL LDQUOT (tag-value-list / string-value) RDQUOT ] +/// enc-feature-tag = base-tags / other-tags +/// base-tags = "audio" / "automata" / "class" / "duplex" / "data" / "control" / "mobility" / "description" / "events" / "priority" / "methods" / "schemes" / "application" / "video" / "language" / "type" / "isfocus" / "actor" / "text" / "extensions" +/// other-tags = "+" ftag-name +/// ftag-name = ALPHA *( ALPHA / DIGIT / "!" / "'" / "." / "-" / "%" ) +/// tag-value-list = tag-value *("," tag-value) +/// tag-value = ["!"] (token-nobang / boolean / numeric) +/// token-nobang = 1*( alphanum / "-" / "." / "%" / "*" / "_" / "+" / "`" / "'" / "~" ) +/// boolean = "TRUE" / "FALSE" +/// numeric = "#" numeric-relation number +/// numeric-relation = ">=" / "<=" / "=" / (number ":") +/// number = [ "+" / "-" ] 1*DIGIT ["." 0*DIGIT] +/// string-value = "<" *(qdtext-no-abkt / quoted-pair ) ">" +/// qdtext-no-abkt = LWS / %x21 / %x23-3B / %x3D / %x3F-5B / %x5D-7E / UTF8-NONASCII +/// temp-gruu = "temp-gruu" EQUAL LDQUOT *( qdtext / quoted-pair ) RDQUOT +/// pub-gruu = "pub-gruu" EQUAL LDQUOT *( qdtext / quoted-pair ) RDQUOT +/// c-p-instance = "+sip.instance" EQUAL LDQUOT "<" instance-val ">" RDQUOT +/// instance-val = *uric +/// contact-extension = generic-param +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Contact_s +{ + TSIP_DECLARE_HEADER; + + char *display_name; + tsip_uri_t *uri; + int64_t expires; +} +tsip_header_Contact_t; +typedef tsk_list_t tsip_header_Contacts_L_t; + +TINYSIP_API tsip_header_Contact_t* tsip_header_Contact_create(); + +TINYSIP_API tsip_header_Contacts_L_t *tsip_header_Contact_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Contact_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_CONTACT_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Content_Disposition.h b/tinySIP/include/tinysip/headers/tsip_header_Content_Disposition.h new file mode 100644 index 0000000..3ec3cef --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Content_Disposition.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Content_Disposition.h + * @brief SIP header 'Content-Disposition'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_CONTENT_DISPOSITION_H_ +#define _TSIP_HEADER_CONTENT_DISPOSITION_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Content-Disposition'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Content_Disposition_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Content_Disposition_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_CONTENT_DISPOSITION_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Content_Encoding.h b/tinySIP/include/tinysip/headers/tsip_header_Content_Encoding.h new file mode 100644 index 0000000..995abbb --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Content_Encoding.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Content_Encoding.h + * @brief SIP header 'Content-Encoding' as per RFC 3261 subclause 20.1. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_CONTENT_ENCODING_H_ +#define _TSIP_HEADER_CONTENT_ENCODING_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Content-Encoding'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Content_Encoding_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Content_Encoding_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_CONTENT_ENCODING_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Content_Language.h b/tinySIP/include/tinysip/headers/tsip_header_Content_Language.h new file mode 100644 index 0000000..86899b1 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Content_Language.h @@ -0,0 +1,49 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Content_Language.h + * @brief SIP header 'Content-Language'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_CONTENT_LANGUAGE_H_ +#define _TSIP_HEADER_CONTENT_LANGUAGE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Content-Language'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Content_Language_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Content_Language_t; + +#endif /* _TSIP_HEADER_CONTENT_LANGUAGE_H_ */
\ No newline at end of file diff --git a/tinySIP/include/tinysip/headers/tsip_header_Content_Length.h b/tinySIP/include/tinysip/headers/tsip_header_Content_Length.h new file mode 100644 index 0000000..7f2ec61 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Content_Length.h @@ -0,0 +1,66 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Content_Length.h + * @brief SIP header 'Content-Length'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_CONTENT_LENGTH_H_ +#define _TSIP_HEADER_CONTENT_LENGTH_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_CONTENT_LENGTH_VA_ARGS(length) tsip_header_Content_Length_def_t, (uint32_t)length + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Content-Length'. +/// +/// @par ABNF: Content-Length / l +/// Content-Length = ( "Content-Length" / "l" ) HCOLON 1*DIGIT +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Content_Length_s +{ + TSIP_DECLARE_HEADER; + + uint32_t length; +} +tsip_header_Content_Length_t; + +TINYSIP_API tsip_header_Content_Length_t* tsip_header_Content_Length_create(uint32_t length); +TINYSIP_API tsip_header_Content_Length_t* tsip_header_Content_Length_create_null(); + +TINYSIP_API tsip_header_Content_Length_t *tsip_header_Content_Length_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Content_Length_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_CONTENT_LENGTH_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Content_Type.h b/tinySIP/include/tinysip/headers/tsip_header_Content_Type.h new file mode 100644 index 0000000..48c32b6 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Content_Type.h @@ -0,0 +1,79 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Content_Type.h + * @brief SIP header 'Content-Type'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_CONTENT_TYPE_H_ +#define _TSIP_HEADER_CONTENT_TYPE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_CONTENT_TYPE_VA_ARGS(type) tsip_header_Content_Type_def_t, (const char*)type + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Content-Type'. +/// +/// @par ABNF= Content-Type / c +/// Content-Type = ( "Content-Type" / "c" ) HCOLON media-type +/// media-type = m-type SLASH m-subtype *( SEMI m-parameter) +/// m-type = discrete-type / composite-type +/// discrete-type = "text" / "image" / "audio" / "video" / "application" / extension-token +/// composite-type = "message" / "multipart" / extension-token +/// extension-token = ietf-token / x-token +/// ietf-token = token +/// x-token = "x-" token +/// m-subtype = extension-token / iana-token +/// iana-token = token +/// m-parameter = m-attribute EQUAL m-value +/// m-attribute = token +/// m-value = token / quoted-string +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Content_Type_s +{ + TSIP_DECLARE_HEADER; + + char* type; +} +tsip_header_Content_Type_t; + +TINYSIP_API tsip_header_Content_Type_t* tsip_header_Content_Type_create(const char* type); +TINYSIP_API tsip_header_Content_Type_t* tsip_header_Content_Type_create_null(); + +TINYSIP_API tsip_header_Content_Type_t *tsip_header_Content_Type_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Content_Type_def_t; + + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_CONTENT_TYPE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Date.h b/tinySIP/include/tinysip/headers/tsip_header_Date.h new file mode 100644 index 0000000..f16ee7a --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Date.h @@ -0,0 +1,79 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Date.h + * @brief SIP dummy header. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_DATE_H_ +#define _TSIP_HEADER_DATE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_DATE_VA_ARGS(wkday, month, day, year, h, m, s) tsip_header_Date_def_t, (const char*)wkday, (const char*)month, (int8_t)day, (int16_t)year, (int8_t)h, (int8_t)m, (int8_t)s + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP Date header. +/// +/// @par ABNF : Date = "Date" HCOLON SIP-date +/// SIP-date = rfc1123-date +/// rfc1123-date = wkday "," SP date1 SP time SP "GMT" +/// date1 = 2DIGIT SP month SP 4DIGIT +/// time = 2DIGIT ":" 2DIGIT ":" 2DIGIT +/// wkday = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" +/// month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Date_s +{ + TSIP_DECLARE_HEADER; + + char *wkday; + char *month; + int8_t day; + int16_t year; + struct{ + int8_t h; + int8_t m; + int8_t s; + } time; +} +tsip_header_Date_t; + +TINYSIP_API tsip_header_Date_t* tsip_header_Date_create(const char* wkday, const char* month, int8_t day, int16_t year, int8_t h, int8_t m, int8_t s); +TINYSIP_API tsip_header_Date_t* tsip_header_Date_create_null(); + +TINYSIP_API tsip_header_Date_t *tsip_header_Date_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Date_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_DATE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Dummy.h b/tinySIP/include/tinysip/headers/tsip_header_Dummy.h new file mode 100644 index 0000000..f1c5bb1 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Dummy.h @@ -0,0 +1,66 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Dummy.h + * @brief SIP dummy header. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_DUMMY_H_ +#define _TSIP_HEADER_DUMMY_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_DUMMY_VA_ARGS(name, value) tsip_header_Dummy_def_t, (const char*)name, (const char*)value + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP Dummy header. +/// +/// @par ABNF : token SP* HCOLON SP*<: any* +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Dummy_s +{ + TSIP_DECLARE_HEADER; + + char *name; + char *value; +} +tsip_header_Dummy_t; + +TINYSIP_API tsip_header_Dummy_t* tsip_header_Dummy_create(const char* name, const char* value); +TINYSIP_API tsip_header_Dummy_t* tsip_header_Dummy_create_null(); + +TINYSIP_API tsip_header_Dummy_t *tsip_header_Dummy_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Dummy_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_DUMMY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Error_Info.h b/tinySIP/include/tinysip/headers/tsip_header_Error_Info.h new file mode 100644 index 0000000..53dc98f --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Error_Info.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Error_Info.h + * @brief SIP header 'Error-Info'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ERROR_INFO_H_ +#define _TSIP_HEADER_ERROR_INFO_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Error-Info'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Error_Info_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Error_Info_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ERROR_INFO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Event.h b/tinySIP/include/tinysip/headers/tsip_header_Event.h new file mode 100644 index 0000000..35eb8ea --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Event.h @@ -0,0 +1,72 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Event.h + * @brief SIP header 'Event/o'as per RFC 3265. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_EVENT_H_ +#define _TSIP_HEADER_EVENT_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_EVENT_VA_ARGS(package) tsip_header_Event_def_t, (const char*)package + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Event/o' . +/// +/// @par ABNF: Event / o +/// Event = ( "Event" / "o" ) HCOLON event-type *( SEMI event-param ) +/// event-type = event-package *( "." event-template ) +/// event-package = token-nodot +/// event-template = token-nodot +/// token-nodot = 1*( alphanum / "-" / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" ) +/// event-param = generic-param / ( "id" EQUAL token ) / call-ident / from-tag / to-tag / with-sessd +/// call-ident = "call-id" EQUAL ( token / DQUOTE callid DQUOTE ) +/// with-sessd = "include-session-description" +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Event_s +{ + TSIP_DECLARE_HEADER; + + char *package; +} +tsip_header_Event_t; + +TINYSIP_API tsip_header_Event_t* tsip_header_Event_create(const char* package); + +TINYSIP_API tsip_header_Event_t *tsip_header_Event_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Event_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_EVENT_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Expires.h b/tinySIP/include/tinysip/headers/tsip_header_Expires.h new file mode 100644 index 0000000..2242b9f --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Expires.h @@ -0,0 +1,67 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Expires.h + * @brief SIP header 'Expires'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_EXPIRES_H_ +#define _TSIP_HEADER_EXPIRES_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_EXPIRES_VA_ARGS(delta_seconds) tsip_header_Expires_def_t, (int64_t)delta_seconds + +#define TSIP_HEADER_EXPIRES_NONE -1 +#define TSIP_HEADER_EXPIRES_DEFAULT 600000 + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Expires'. +/// +/// @par ABNF: Expires = "Expires" HCOLON delta-seconds +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Expires_s +{ + TSIP_DECLARE_HEADER; + + int64_t delta_seconds; +} +tsip_header_Expires_t; + +TINYSIP_API tsip_header_Expires_t* tsip_header_Expires_create(int64_t delta_seconds); + +TINYSIP_API tsip_header_Expires_t *tsip_header_Expires_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Expires_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_EXPIRES_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_From.h b/tinySIP/include/tinysip/headers/tsip_header_From.h new file mode 100644 index 0000000..a799efd --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_From.h @@ -0,0 +1,69 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_From.h + * @brief SIP header 'From'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_FROM_H_ +#define _TSIP_HEADER_FROM_H_ + +#include "tinysip_config.h" +#include "tinysip/tsip_uri.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_FROM_VA_ARGS(display_name, uri, tag) tsip_header_From_def_t, (const char*)display_name, (const tsip_uri_t*)uri, (const char*)tag + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'From' . +/// +/// @par ABNF: From = ( "From" / "f" ) HCOLON from-spec +/// from-spec = ( name-addr / addr-spec ) *( SEMI from-param ) +/// from-param = tag-param / generic-param +/// tag-param = "tag" EQUAL token +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_From_s +{ + TSIP_DECLARE_HEADER; + + char *display_name; + tsip_uri_t *uri; + char *tag; +} +tsip_header_From_t; + +TINYSIP_API tsip_header_From_t* tsip_header_From_create(const char* display_name, const tsip_uri_t* uri, const char* tag); + +TINYSIP_API tsip_header_From_t *tsip_header_From_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_From_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_FROM_H_ */ diff --git a/tinySIP/include/tinysip/headers/tsip_header_History_Info.h b/tinySIP/include/tinysip/headers/tsip_header_History_Info.h new file mode 100644 index 0000000..6638f14 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_History_Info.h @@ -0,0 +1,56 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_History_Info.h + * @brief SIP header 'History-Info'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_HISTORY_INFO_H_ +#define _TSIP_HEADER_HISTORY_INFO_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'History-Info' . +/// @author Mamadou +/// @date 12/3/2009 +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_History_Info_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_History_Info_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_HISTORY_INFO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Identity.h b/tinySIP/include/tinysip/headers/tsip_header_Identity.h new file mode 100644 index 0000000..8382d39 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Identity.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Identity.h + * @brief SIP header 'Identity'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_IDENTITY_H_ +#define _TSIP_HEADER_IDENTITY_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Identity' . +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Identity_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Identity_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_IDENTITY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Identity_Info.h b/tinySIP/include/tinysip/headers/tsip_header_Identity_Info.h new file mode 100644 index 0000000..1aa790b --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Identity_Info.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Identity_Info.h + * @brief SIP header 'Identity-Info'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_IDENTITY_INFO_H_ +#define _TSIP_HEADER_IDENTITY_INFO_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Identity-Info'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Identity_Info_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Identity_Info_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_IDENTITY_INFO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_In_Reply_To.h b/tinySIP/include/tinysip/headers/tsip_header_In_Reply_To.h new file mode 100644 index 0000000..90477c6 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_In_Reply_To.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_In_Reply_To.h + * @brief SIP header 'In-Reply-To'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_IN_REPLY_TO_H_ +#define _TSIP_HEADER_IN_REPLY_TO_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'In-Reply-To'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_In_Reply_To_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_In_Reply_To_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_IN_REPLY_TO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Join.h b/tinySIP/include/tinysip/headers/tsip_header_Join.h new file mode 100644 index 0000000..ef4c042 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Join.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Join.h + * @brief SIP header 'Join'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_JOIN_H_ +#define _TSIP_HEADER_JOIN_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Join'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Join_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Join_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_JOIN_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_MIME_Version.h b/tinySIP/include/tinysip/headers/tsip_header_MIME_Version.h new file mode 100644 index 0000000..439f98c --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_MIME_Version.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_MIME_Version.h + * @brief SIP header 'MIME-Version'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_MIME_VERSION_H_ +#define _TSIP_HEADER_MIME_VERSION_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'MIME-Version'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_MIME_Version_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_MIME_Version_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_MIME_VERSION_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Max_Forwards.h b/tinySIP/include/tinysip/headers/tsip_header_Max_Forwards.h new file mode 100644 index 0000000..17d9856 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Max_Forwards.h @@ -0,0 +1,68 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Max_Forwards.h + * @brief SIP header 'Max-Forwards'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_MAX_FORWARDS_H_ +#define _TSIP_HEADER_MAX_FORWARDS_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_MAX_FORWARDS_VA_ARGS(max) tsip_header_Max_Forwards_def_t, (int32_t) max + +#define TSIP_HEADER_MAX_FORWARDS_NONE -1 +#define TSIP_HEADER_MAX_FORWARDS_DEFAULT 70 + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Max-Forwards'. +/// +/// @par ABNF: Max-Forwards = "Max-Forwards" HCOLON 1*DIGIT +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Max_Forwards_s +{ + TSIP_DECLARE_HEADER; + + int32_t value; +} +tsip_header_Max_Forwards_t; + +TINYSIP_API tsip_header_Max_Forwards_t* tsip_header_Max_Forwards_create(int32_t max); + +TINYSIP_API tsip_header_Max_Forwards_t *tsip_header_Max_Forwards_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Max_Forwards_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_MAX_FORWARDS_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Min_Expires.h b/tinySIP/include/tinysip/headers/tsip_header_Min_Expires.h new file mode 100644 index 0000000..042a190 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Min_Expires.h @@ -0,0 +1,68 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Min_Expires.h + * @brief SIP header 'Min-Expires'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_MIN_EXPIRES_H_ +#define _TSIP_HEADER_MIN_EXPIRES_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_MIN_EXPIRES_VA_ARGS(value) tsip_header_Min_Expires_def_t, (int32_t) value + +#define TSIP_HEADER_MIN_EXPIRES_NONE -1 +#define TSIP_HEADER_MIN_EXPIRES_DEFAULT 30 + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Min-Expires' as per RFC 3261. +/// +/// @par ABNF: Min-Expires = "Min-Expires" HCOLON delta-seconds +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Min_Expires_s +{ + TSIP_DECLARE_HEADER; + + int32_t value; +} +tsip_header_Min_Expires_t; + +TINYSIP_API tsip_header_Min_Expires_t* tsip_header_Min_Expires_create(int32_t value); +TINYSIP_API tsip_header_Min_Expires_t* tsip_header_Min_Expires_create_null(); + +TINYSIP_API tsip_header_Min_Expires_t *tsip_header_Min_Expires_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Min_Expires_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_MIN_EXPIRES_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Min_SE.h b/tinySIP/include/tinysip/headers/tsip_header_Min_SE.h new file mode 100644 index 0000000..de05338 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Min_SE.h @@ -0,0 +1,67 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Min_SE.h + * @brief SIP header 'Min-SE'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_MIN_SE_H_ +#define _TSIP_HEADER_MIN_SE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_MIN_SE_VA_ARGS(delta_seconds) tsip_header_Min_SE_def_t, (int64_t)delta_seconds + +#define TSIP_SESSION_EXPIRES_MIN_VALUE 90 + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Min-SE'. +/// +/// @par ABNF : Min-SE = "Min-SE" HCOLON delta-seconds *(SEMI generic-param) +/// +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Min_SE_s +{ + TSIP_DECLARE_HEADER; + + int64_t delta_seconds; +} +tsip_header_Min_SE_t; + +TINYSIP_API tsip_header_Min_SE_t* tsip_header_Min_SE_create(int64_t delta_seconds); + +TINYSIP_API tsip_header_Min_SE_t *tsip_header_Min_SE_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Min_SE_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_MIN_SE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Organization.h b/tinySIP/include/tinysip/headers/tsip_header_Organization.h new file mode 100644 index 0000000..8351afb --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Organization.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Organization.h + * @brief SIP header 'Organization'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ORGANIZATION_H_ +#define _TSIP_HEADER_ORGANIZATION_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Organization'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Organization_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Organization_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ORGANIZATION_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Access_Network_Info.h b/tinySIP/include/tinysip/headers/tsip_header_P_Access_Network_Info.h new file mode 100644 index 0000000..9508424 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Access_Network_Info.h @@ -0,0 +1,71 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Access_Network_Info.h + * @brief SIP header 'P-Access-Network-Info'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_ACCESS_NETWORK_INFO_H_ +#define _TSIP_HEADER_P_ACCESS_NETWORK_INFO_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_P_ACCESS_NETWORK_INFO_VA_ARGS(value) tsip_header_P_Access_Network_Info_def_t, (const char*)value + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Access-Network-Info' as per RFC 3455. +/// +/// @par ABNF: P-Access-Network-Info = "P-Access-Network-Info" HCOLON access-net-spec +/// access-net-spec = access-type *( SEMI access-info ) +/// access-type = "IEEE-802.11a" / "IEEE-802.11b" / "3GPP-GERAN" / "3GPP-UTRAN-FDD" / "3GPP-UTRAN-TDD" / "3GPP-CDMA2000" / token +/// access-info = cgi-3gpp / utran-cell-id-3gpp / extension-access-info +/// extension-access-info = gen-value +/// cgi-3gpp = "cgi-3gpp" EQUAL (token / quoted-string) +/// utran-cell-id-3gpp = "utran-cell-id-3gpp" EQUAL (token / quoted-string) +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Access_Network_Info_s +{ + TSIP_DECLARE_HEADER; + + char *value; +} +tsip_header_P_Access_Network_Info_t; + +TINYSIP_API tsip_header_P_Access_Network_Info_t* tsip_header_P_Access_Network_Info_create(const char* value); +TINYSIP_API tsip_header_P_Access_Network_Info_t* tsip_header_P_Access_Network_Info_create_null(); + +TINYSIP_API tsip_header_P_Access_Network_Info_t *tsip_header_P_Access_Network_Info_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_P_Access_Network_Info_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_ACCESS_NETWORK_INFO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Answer_State.h b/tinySIP/include/tinysip/headers/tsip_header_P_Answer_State.h new file mode 100644 index 0000000..e378ef7 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Answer_State.h @@ -0,0 +1,53 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Answer_State.h + * @brief SIP header 'P-Answer-State'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_ANSWER_STATE_H_ +#define _TSIP_HEADER_P_ANSWER_STATE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Answer-State'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Answer_State_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_Answer_State_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_ANSWER_STATE_H_ */ diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Asserted_Identity.h b/tinySIP/include/tinysip/headers/tsip_header_P_Asserted_Identity.h new file mode 100644 index 0000000..3e2118a --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Asserted_Identity.h @@ -0,0 +1,70 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Asserted_Identity.h + * @brief SIP header 'P-Asserted-Identity' as per RFC 3325. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_ASSERTED_IDENTITY_H_ +#define _TSIP_HEADER_P_ASSERTED_IDENTITY_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tinysip/tsip_uri.h" + +TSIP_BEGIN_DECLS + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Asserted-Identity' as per RFC 3325. +/// +/// @par ABNF: P-Asserted-Identity = PAssertedID +/// PAssertedID = "P-Asserted-Identity" HCOLON PAssertedID-value *(COMMA PAssertedID-value) +/// PAssertedID-value = name-addr / addr-spec +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Asserted_Identity_s +{ + TSIP_DECLARE_HEADER; + + char *display_name; + tsip_uri_t *uri; +} +tsip_header_P_Asserted_Identity_t; + +typedef tsk_list_t tsip_header_P_Asserted_Identities_L_t; + +TINYSIP_API tsip_header_P_Asserted_Identity_t* tsip_header_P_Asserted_Identity_create(); + +TINYSIP_API tsip_header_P_Asserted_Identities_L_t *tsip_header_P_Asserted_Identity_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_P_Asserted_Identity_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_ASSERTED_IDENTITY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Associated_URI.h b/tinySIP/include/tinysip/headers/tsip_header_P_Associated_URI.h new file mode 100644 index 0000000..8c28f41 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Associated_URI.h @@ -0,0 +1,72 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Associated_URI.h + * @brief SIP header 'P-Associated-URI'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_ASSOCIATED_URI_H_ +#define _TSIP_HEADER_P_ASSOCIATED_URI_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tinysip/tsip_uri.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_P_ASSOCIATED_URI_VA_ARGS(uri) tsip_header_P_Associated_URI_def_t, (const tsip_uri_t*)uri + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Associated-URI' as per RFC 3455. +/// +/// @par ABNF: P-Associated-URI = "P-Associated-URI" HCOLON p-aso-uri-spec *(COMMA p-aso-uri-spec) +/// p-aso-uri-spec = name-addr *( SEMI ai-param ) +/// ai-param = generic-param +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Associated_URI_s +{ + TSIP_DECLARE_HEADER; + + char *display_name; + tsip_uri_t *uri; +} +tsip_header_P_Associated_URI_t; + +typedef tsk_list_t tsip_header_P_Associated_URIs_L_t; + +TINYSIP_API tsip_header_P_Associated_URI_t* tsip_header_P_Associated_URI_create(const tsip_uri_t* uri); +TINYSIP_API tsip_header_P_Associated_URI_t* tsip_header_P_Associated_URI_create_null(); + +TINYSIP_API tsip_header_P_Associated_URIs_L_t *tsip_header_P_Associated_URI_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_P_Associated_URI_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_ASSOCIATED_URI_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Called_Party_ID.h b/tinySIP/include/tinysip/headers/tsip_header_P_Called_Party_ID.h new file mode 100644 index 0000000..324b61a --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Called_Party_ID.h @@ -0,0 +1,53 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Called_Party_ID.h + * @brief SIP header 'P-Called-Party-ID'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_CALLED_PARTY_ID_H_ +#define _TSIP_HEADER_P_CALLED_PARTY_ID_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Called-Party-ID'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Called_Party_ID_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_Called_Party_ID_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_CALLED_PARTY_ID_H_ */
\ No newline at end of file diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Charging_Function_Addresses.h b/tinySIP/include/tinysip/headers/tsip_header_P_Charging_Function_Addresses.h new file mode 100644 index 0000000..82e5e71 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Charging_Function_Addresses.h @@ -0,0 +1,68 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Charging_Function_Addresses.h + * @brief SIP header 'P-Charging-Function-Addresses'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_CHARGING_FUNCTION_ADDRESSES_H_ +#define _TSIP_HEADER_P_CHARGING_FUNCTION_ADDRESSES_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Charging-Function-Addresses' as per RFC 3455. +/// +/// @par ABNF: P-Charging-Function-Addresses = P-Charging-Addr +/// P-Charging-Addr = "P-Charging-Function-Addresses" HCOLON charge-addr-params *( SEMI charge-addr-params ) +/// charge-addr-params = ccf / ecf / generic-param +/// ccf = "ccf" EQUAL gen-value +/// ecf = "ecf" EQUAL gen-value +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Charging_Function_Addresses_s +{ + TSIP_DECLARE_HEADER; + char* ccf; + char* ecf; +} +tsip_header_P_Charging_Function_Addresses_t; + +typedef tsk_list_t tsip_header_P_Charging_Function_Addressess_L_t; + +TINYSIP_API tsip_header_P_Charging_Function_Addresses_t* tsip_header_P_Charging_Function_Addresses_create(); + +TINYSIP_API tsip_header_P_Charging_Function_Addressess_L_t *tsip_header_P_Charging_Function_Addresses_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_P_Charging_Function_Addresses_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_CHARGING_FUNCTION_ADDRESSES_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Charging_Vector.h b/tinySIP/include/tinysip/headers/tsip_header_P_Charging_Vector.h new file mode 100644 index 0000000..45ba24d --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Charging_Vector.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Charging_Vector.h + * @brief SIP header 'P-Charging-Vector'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_CHARGING_VECTOR_H_ +#define _TSIP_HEADER_P_CHARGING_VECTOR_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Charging-Vector'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Charging_Vector_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_Charging_Vector_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_CHARGING_VECTOR_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_DCS_Billing_Info.h b/tinySIP/include/tinysip/headers/tsip_header_P_DCS_Billing_Info.h new file mode 100644 index 0000000..ca518b9 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_DCS_Billing_Info.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_DCS_Billing_Info.h + * @brief SIP header 'P-DCS-Billing-Info'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_DCS_BILLING_INFO_H_ +#define _TSIP_HEADER_P_DCS_BILLING_INFO_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-DCS-Billing-Info'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_DCS_Billing_Info_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_DCS_Billing_Info_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_DCS_BILLING_INFO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_DCS_LAES.h b/tinySIP/include/tinysip/headers/tsip_header_P_DCS_LAES.h new file mode 100644 index 0000000..ed2ce31 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_DCS_LAES.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_DCS_LAES.h + * @brief SIP header 'P-DCS-LAES'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_DCS_LAES_H_ +#define _TSIP_HEADER_P_DCS_LAES_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-DCS-_LAES'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_DCS_LAES_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_DCS_LAES_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_DCS_LAES_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_DCS_OSPS.h b/tinySIP/include/tinysip/headers/tsip_header_P_DCS_OSPS.h new file mode 100644 index 0000000..1d98390 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_DCS_OSPS.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_DCS_OSPS.h + * @brief SIP header 'P-DCS-OSPS'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_DCS_OSPS_H_ +#define _TSIP_HEADER_P_DCS_OSPS_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-DCS-OSPS'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_DCS_OSPS_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_DCS_OSPS_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_DCS_OSPS_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_DCS_Redirect.h b/tinySIP/include/tinysip/headers/tsip_header_P_DCS_Redirect.h new file mode 100644 index 0000000..103e396 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_DCS_Redirect.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_DCS_Redirect.h + * @brief SIP header 'P-DCS-Redirect'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_DCS_REDIRECT_H_ +#define _TSIP_HEADER_P_DCS_REDIRECT_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-DCS-Redirect'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_DCS_Redirect_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_DCS_Redirect_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_DCS_REDIRECT_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_DCS_Trace_Party_ID.h b/tinySIP/include/tinysip/headers/tsip_header_P_DCS_Trace_Party_ID.h new file mode 100644 index 0000000..3a11086 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_DCS_Trace_Party_ID.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_DCS_Trace_Party_ID.h + * @brief SIP header 'P-DCS-Trace-Party-ID'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_DCS_TRACE_PARTY_ID_H_ +#define _TSIP_HEADER_P_DCS_TRACE_PARTY_ID_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-DCS-Trace-Party-ID'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_DCS_Trace_Party_ID_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_DCS_Trace_Party_ID_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_DCS_TRACE_PARTY_ID_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Early_Media.h b/tinySIP/include/tinysip/headers/tsip_header_P_Early_Media.h new file mode 100644 index 0000000..54890f0 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Early_Media.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Early_Media.h + * @brief SIP header 'P-Early-Media'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_EARLY_MEDIA_H_ +#define _TSIP_HEADER_P_EARLY_MEDIA_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Early-Media'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Early_Media_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_Early_Media_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_EARLY_MEDIA_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Media_Authorization.h b/tinySIP/include/tinysip/headers/tsip_header_P_Media_Authorization.h new file mode 100644 index 0000000..c161c34 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Media_Authorization.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Media_Authorization.h + * @brief SIP header 'P-Media-Authorization'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_MEDIA_AUTHORIZATION_H_ +#define _TSIP_HEADER_P_MEDIA_AUTHORIZATION_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Media-Authorization'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Media_Authorization_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_Media_Authorization_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_MEDIA_AUTHORIZATION_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Preferred_Identity.h b/tinySIP/include/tinysip/headers/tsip_header_P_Preferred_Identity.h new file mode 100644 index 0000000..9272932 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Preferred_Identity.h @@ -0,0 +1,69 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Preferred_Identity.h + * @brief SIP header 'P-Preferred-Identity'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_PREFERRED_IDENTITY_H_ +#define _TSIP_HEADER_P_PREFERRED_IDENTITY_H_ + +#include "tinysip_config.h" + +#include "tinysip/tsip_uri.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_P_PREFERRED_IDENTITY_VA_ARGS(uri) tsip_header_P_Preferred_Identity_def_t, (const tsip_uri_t*)uri + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Preferred-Identity' as per RFC 3325. +/// +/// @par ABNF: PPreferredID = "P-Preferred-Identity" HCOLON PPreferredID-value *(COMMA PPreferredID-value) +/// PPreferredID-value = name-addr / addr-spec +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Preferred_Identity_s +{ + TSIP_DECLARE_HEADER; + + tsip_uri_t *uri; + char *display_name; +} +tsip_header_P_Preferred_Identity_t; + +TINYSIP_API tsip_header_P_Preferred_Identity_t* tsip_header_P_Preferred_Identity_create(const tsip_uri_t* uri); +TINYSIP_API tsip_header_P_Preferred_Identity_t* tsip_header_P_Preferred_Identity_create_null(); + +TINYSIP_API tsip_header_P_Preferred_Identity_t *tsip_header_P_Preferred_Identity_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_P_Preferred_Identity_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_PREFERRED_IDENTITY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Profile_Key.h b/tinySIP/include/tinysip/headers/tsip_header_P_Profile_Key.h new file mode 100644 index 0000000..0f33a2a --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Profile_Key.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Profile_Key.h + * @brief SIP header 'P-Profile-Key'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_PROFILE_KEY_H_ +#define _TSIP_HEADER_P_PROFILE_KEY_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Profile-Key'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Profile_Key_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_Profile_Key_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_PROFILE_KEY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_User_Database.h b/tinySIP/include/tinysip/headers/tsip_header_P_User_Database.h new file mode 100644 index 0000000..75915b5 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_User_Database.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_User_Database.h + * @brief SIP header 'P-User-Database'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_USER_DATABASE_H_ +#define _TSIP_HEADER_P_USER_DATABASE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-User-Database'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_User_Database_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_User_Database_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_USER_DATABASE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_P_Visited_Network_ID.h b/tinySIP/include/tinysip/headers/tsip_header_P_Visited_Network_ID.h new file mode 100644 index 0000000..121783f --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_P_Visited_Network_ID.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_P_Visited_Network_ID.h + * @brief SIP header 'P-Visited-Network-ID'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_P_VISITED_NETWORK_ID_H_ +#define _TSIP_HEADER_P_VISITED_NETWORK_ID_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'P-Visited-Network-ID'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_P_Visited_Network_ID_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_P_Visited_Network_ID_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_P_VISITED_NETWORK_ID_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Path.h b/tinySIP/include/tinysip/headers/tsip_header_Path.h new file mode 100644 index 0000000..d0fa6ed --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Path.h @@ -0,0 +1,72 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Path.h + * @brief SIP header 'Path'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_PATH_H_ +#define _TSIP_HEADER_PATH_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tinysip/tsip_uri.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_PATH_VA_ARGS(uri) tsip_header_Path_def_t, (const tsip_uri_t*)uri + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Path' as per RFC 3327. +/// +/// @par ABNF : Path = "Path" HCOLON path-value *(COMMA path-value) +/// path-value = name-addr *( SEMI rr-param ) +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Path_s +{ + TSIP_DECLARE_HEADER; + + char *display_name; + tsip_uri_t *uri; +} +tsip_header_Path_t; + +typedef tsk_list_t tsip_header_Paths_L_t; + +TINYSIP_API tsip_header_Path_t* tsip_header_Path_create(const tsip_uri_t* uri); +TINYSIP_API tsip_header_Path_t* tsip_header_Path_create_null(); + +TINYSIP_API tsip_header_Paths_L_t *tsip_header_Path_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Path_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_PATH_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Priority.h b/tinySIP/include/tinysip/headers/tsip_header_Priority.h new file mode 100644 index 0000000..eb1cbbf --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Priority.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Priority.h + * @brief SIP header 'Priority'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_PRIORITY_H_ +#define _TSIP_HEADER_PRIORITY_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Priority'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Priority_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Priority_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_PRIORITY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Privacy.h b/tinySIP/include/tinysip/headers/tsip_header_Privacy.h new file mode 100644 index 0000000..421e18f --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Privacy.h @@ -0,0 +1,65 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Privacy.h + * @brief SIP header 'Privacy'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_PRIVACY_H_ +#define _TSIP_HEADER_PRIVACY_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Privacy' as per RFC 3323. +/// +/// @par ABNF: Privacy = Privacy-hdr +/// Privacy-hdr = "Privacy" HCOLON priv-value *(";" priv-value) +/// priv-value = "header" / "session" / "user" / "none" / "critical" / "id" / "history" / token +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Privacy_s +{ + TSIP_DECLARE_HEADER; + + tsk_strings_L_t *values; +} +tsip_header_Privacy_t; + +TINYSIP_API tsip_header_Privacy_t* tsip_header_Privacy_create(); + +TINYSIP_API tsip_header_Privacy_t *tsip_header_Privacy_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Privacy_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_PRIVACY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Proxy_Authenticate.h b/tinySIP/include/tinysip/headers/tsip_header_Proxy_Authenticate.h new file mode 100644 index 0000000..01c4681 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Proxy_Authenticate.h @@ -0,0 +1,77 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Proxy_Authenticate.h + * @brief SIP header 'Proxy-Authenticate'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_PROXY_AUTHENTICATE_H_ +#define _TSIP_HEADER_PROXY_AUTHENTICATE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Proxy-Authenticate'. +/// +/// @par ABNF = Proxy-Authenticate = "Proxy-Authenticate" HCOLON challenge +/// challenge = ("Digest" LWS digest-cln *(COMMA digest-cln)) / other-challenge +/// other-challenge = auth-scheme / auth-param *(COMMA auth-param) +/// digest-cln = realm / domain / nonce / opaque / stale / algorithm / qop-options / auth-param +/// realm = "realm" EQUAL realm-value +/// realm-value = quoted-string +/// domain = "domain" EQUAL LDQUOT URI *( 1*SP URI ) RDQUOT +/// URI = absoluteURI / abs-path +/// opaque = "opaque" EQUAL quoted-string +/// stale = "stale" EQUAL ( "true" / "false" ) +/// qop-options = "qop" EQUAL LDQUOT qop-value *("," qop-value) RDQUOT +/// qop-value = "auth" / "auth-int" / token +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Proxy_Authenticate_s +{ + TSIP_DECLARE_HEADER; + + char* scheme; + char* realm; + char* domain; + char* nonce; + char* opaque; + tsk_bool_t stale; + char* algorithm; + char* qop; +} +tsip_header_Proxy_Authenticate_t; + +tsip_header_Proxy_Authenticate_t *tsip_header_Proxy_Authenticate_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Proxy_Authenticate_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_PROXY_AUTHENTICATE_H_ */ diff --git a/tinySIP/include/tinysip/headers/tsip_header_Proxy_Authorization.h b/tinySIP/include/tinysip/headers/tsip_header_Proxy_Authorization.h new file mode 100644 index 0000000..6eb7136 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Proxy_Authorization.h @@ -0,0 +1,96 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Proxy_Authorization.h + * @brief SIP header 'Proxy-Authorization'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_PROXY_AUTHORIZATION_H_ +#define _TSIP_HEADER_PROXY_AUTHORIZATION_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Proxy-Authorization'. +/// +/// @par ABNF = "Proxy-Authorization" HCOLON credentials +/// credentials = ("Digest" LWS digest-response) / other-response +/// digest-response = dig-resp *(COMMA dig-resp) +/// dig-resp = username / realm / nonce / digest-uri / dresponse / algorithm / cnonce / opaque / message-qop / nonce-count / auth-param / auts +/// username = "username" EQUAL username-value +/// username-value = quoted-string +/// digest-uri = "uri" EQUAL LDQUOT digest-uri-value RDQUOT +/// digest-uri-value = auth-request-uri ; equal to request-uri as specified by HTTP/1.1 +/// message-qop = "qop" EQUAL qop-value +/// cnonce = "cnonce" EQUAL cnonce-value +/// cnonce-value = nonce-value +/// nonce-count = "nc" EQUAL nc-value +/// nc-value = 8LHEX +/// dresponse = "response" EQUAL request-digest +/// request-digest = LDQUOT 32LHEX RDQUOT +/// auth-request-uri = not-defined +/// +/// auth-param = auth-param-name EQUAL ( token / quoted-string ) +/// auth-param-name = token +/// +/// other-response = auth-scheme LWS auth-param *(COMMA auth-param) +/// auth-scheme = token +/// auts = "auts" EQUAL auts-param +/// auts-param = LDQUOT auts-value RDQUOT +/// auts-value = [base64 encoding of AUTS] +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Proxy_Authorization_s +{ + TSIP_DECLARE_HEADER; + + char* scheme; + char* username; + char* realm; + char* nonce; + char* uri; + char* response; + char* algorithm; + char* cnonce; + char* opaque; + char* qop; + char* nc; +} +tsip_header_Proxy_Authorization_t; + +TINYSIP_API tsip_header_Proxy_Authorization_t* tsip_header_Proxy_Authorization_create(); + +TINYSIP_API tsip_header_Proxy_Authorization_t *tsip_header_Proxy_Authorization_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Proxy_Authorization_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_PROXY_AUTHORIZATION_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Proxy_Require.h b/tinySIP/include/tinysip/headers/tsip_header_Proxy_Require.h new file mode 100644 index 0000000..63f74e4 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Proxy_Require.h @@ -0,0 +1,66 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Proxy_Require.h + * @brief SIP header 'Proxy-Require'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_PROXY_REQUIRE_H_ +#define _TSIP_HEADER_PROXY_REQUIRE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_PROXY_REQUIRE_VA_ARGS(option) tsip_header_Proxy_Require_def_t, (const char*)option + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Proxy-Proxy_Require'. +/// +/// @par ABNF: Proxy_Require = "Proxy_Require" HCOLON option-tag *(COMMA option-tag) +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Proxy_Require_s +{ + TSIP_DECLARE_HEADER; + + tsk_strings_L_t *options; +} +tsip_header_Proxy_Require_t; + +TINYSIP_API tsip_header_Proxy_Require_t* tsip_header_Proxy_Require_create(const char* option); +TINYSIP_API tsip_header_Proxy_Require_t* tsip_header_Proxy_Require_create_null(); + +TINYSIP_API tsip_header_Proxy_Require_t *tsip_header_Proxy_Require_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Proxy_Require_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_PROXY_REQUIRE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_RAck.h b/tinySIP/include/tinysip/headers/tsip_header_RAck.h new file mode 100644 index 0000000..6a2bc13 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_RAck.h @@ -0,0 +1,68 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_RAck.h + * @brief SIP header 'RAck'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_RACK_H_ +#define _TSIP_HEADER_RACK_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_RACK_VA_ARGS(seq, cseq, method) tsip_header_RAck_def_t, (uint32_t)seq, (uint32_t)cseq, (const char*)method + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'RAck' as per RFC 3262. +/// +/// @par ABNF : "RAck" HCOLON response-num LWS CSeq-num LWS Method +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_RAck_s +{ + TSIP_DECLARE_HEADER; + + uint32_t seq; + uint32_t cseq; + char* method; +} +tsip_header_RAck_t; + + +TINYSIP_API tsip_header_RAck_t* tsip_header_RAck_create(uint32_t seq, uint32_t cseq, const char* method); +TINYSIP_API tsip_header_RAck_t* tsip_header_RAck_create_null(); + +TINYSIP_API tsip_header_RAck_t *tsip_header_RAck_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_RAck_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_RACK_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_RSeq.h b/tinySIP/include/tinysip/headers/tsip_header_RSeq.h new file mode 100644 index 0000000..1b87ddd --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_RSeq.h @@ -0,0 +1,68 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_RSeq.h + * @brief SIP header 'RSeq'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_RSEQ_H_ +#define _TSIP_HEADER_RSEQ_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_RSEQ_VA_ARGS(seq) tsip_header_RSeq_def_t, (int32_t) seq + +#define TSIP_HEADER_RSEQ_NONE 0 +#define TSIP_HEADER_RSEQ_DEFAULT 1 + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'RSeq' as per RFC 3262. +/// +/// @par ABNF: "RSeq" HCOLON response-num +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_RSeq_s +{ + TSIP_DECLARE_HEADER; + uint32_t seq; +} +tsip_header_RSeq_t; + + +TINYSIP_API tsip_header_RSeq_t* tsip_header_RSeq_create(uint32_t seq); +TINYSIP_API tsip_header_RSeq_t* tsip_header_RSeq_create_null(); + +TINYSIP_API tsip_header_RSeq_t *tsip_header_RSeq_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_RSeq_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_RSEQ_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Reason.h b/tinySIP/include/tinysip/headers/tsip_header_Reason.h new file mode 100644 index 0000000..eb13b51 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Reason.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Reason.h + * @brief SIP header 'Reason'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_REASON_H_ +#define _TSIP_HEADER_REASON_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Reason'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Reason_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Reason_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_REASON_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Record_Route.h b/tinySIP/include/tinysip/headers/tsip_header_Record_Route.h new file mode 100644 index 0000000..7e8e187 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Record_Route.h @@ -0,0 +1,73 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Record_Route.h + * @brief SIP header 'Record-Route'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_RECORD_ROUTE_H_ +#define _TSIP_HEADER_RECORD_ROUTE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tinysip/tsip_uri.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_RECORD_ROUTE_VA_ARGS(uri) tsip_header_Record_Route_def_t, (const tsip_uri_t*)uri + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Record-Route'. +/// +/// @par ABNF : Record-Route = "Record-Route" HCOLON rec-route *(COMMA rec-route) +/// rec-route = name-addr *( SEMI rr-param ) +/// rr-param = generic-param +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Record_Route_s +{ + TSIP_DECLARE_HEADER; + + char* display_name; + tsip_uri_t *uri; +} +tsip_header_Record_Route_t; + +typedef tsk_list_t tsip_header_Record_Routes_L_t; + +TINYSIP_API tsip_header_Record_Route_t* tsip_header_Record_Route_create(const tsip_uri_t* uri); +TINYSIP_API tsip_header_Record_Route_t* tsip_header_Record_Route_create_null(); + +TINYSIP_API tsip_header_Record_Routes_L_t *tsip_header_Record_Route_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Record_Route_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_RECORD_ROUTE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Refer_Sub.h b/tinySIP/include/tinysip/headers/tsip_header_Refer_Sub.h new file mode 100644 index 0000000..d436430 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Refer_Sub.h @@ -0,0 +1,67 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Refer_Sub.h + * @brief SIP header 'Refer-Sub' as per 4488. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_REFER_SUB_H_ +#define _TSIP_HEADER_REFER_SUB_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_REFER_SUB_VA_ARGS(sub) tsip_header_Refer_Sub_def_t, (tsk_bool_t)sub + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Refer-Sub'. +/// +/// @par ABNF : Refer-Sub = "Refer-Sub" HCOLON refer-sub-value *(SEMI exten) +/// refer-sub-value = "true" / "false" +/// exten = generic-param +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Refer_Sub_s +{ + TSIP_DECLARE_HEADER; + + tsk_bool_t sub; +} +tsip_header_Refer_Sub_t; + +TINYSIP_API tsip_header_Refer_Sub_t* tsip_header_Refer_Sub_create(tsk_bool_t sub); +TINYSIP_API tsip_header_Refer_Sub_t* tsip_header_Refer_Sub_create_null(); + +TINYSIP_API tsip_header_Refer_Sub_t *tsip_header_Refer_Sub_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Refer_Sub_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_REFER_SUB_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Refer_To.h b/tinySIP/include/tinysip/headers/tsip_header_Refer_To.h new file mode 100644 index 0000000..f68ecd9 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Refer_To.h @@ -0,0 +1,69 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Refer_To.h + * @brief SIP Refer-To header as per RFC 3515. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_REFER_TO_H_ +#define _TSIP_HEADER_REFER_TO_H_ + +#include "tinysip_config.h" + +#include "tinysip/tsip_uri.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_REFER_TO_VA_ARGS(uri) tsip_header_Refer_To_def_t, (const tsip_uri_t*)uri + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Refer-To' . +/// +/// @par ABNF: Refer-To = ( "Refer-To" / "r" ) HCOLON ( name-addr / addr-spec ) *(SEMI refer-param) +/// refer-param = generic-param / feature-param +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Refer_To_s +{ + TSIP_DECLARE_HEADER; + + char *display_name; + tsip_uri_t *uri; +} +tsip_header_Refer_To_t; + +TSIP_END_DECLS + +TINYSIP_API tsip_header_Refer_To_t* tsip_header_Refer_To_create(const tsip_uri_t* uri); +TINYSIP_API tsip_header_Refer_To_t* tsip_header_Refer_To_create_null(); + +TINYSIP_API tsip_header_Refer_To_t *tsip_header_Refer_To_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Refer_To_def_t; + +#endif /* _TSIP_HEADER_REFER_TO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Referred_By.h b/tinySIP/include/tinysip/headers/tsip_header_Referred_By.h new file mode 100644 index 0000000..5870512 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Referred_By.h @@ -0,0 +1,70 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Referred_By.h + * @brief SIP Referred-By header as per RFC 3892. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_REFERRED_BY_H_ +#define _TSIP_HEADER_REFERRED_BY_H_ + +#include "tinysip_config.h" + +#include "tinysip/tsip_uri.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_REFERRED_BY_VA_ARGS(uri, cid) tsip_header_Referred_By_def_t, (const tsip_uri_t*)uri, (const char*)cid + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Referred-By'. +/// +/// @par ABNF: Referred-By = ( "Referred-By" / "b" ) HCOLON referrer-uri *( SEMI (referredby-id-param / generic-param) ) +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Referred_By_s +{ + TSIP_DECLARE_HEADER; + + char *display_name; + tsip_uri_t *uri; + + char* cid; +} +tsip_header_Referred_By_t; + +TINYSIP_API tsip_header_Referred_By_t* tsip_header_Referred_By_create(const tsip_uri_t* uri, const char* cid); +TINYSIP_API tsip_header_Referred_By_t* tsip_header_Referred_By_create_null(); + +TINYSIP_API tsip_header_Referred_By_t *tsip_header_Referred_By_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Referred_By_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_REFERRED_BY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Reject_Contact.h b/tinySIP/include/tinysip/headers/tsip_header_Reject_Contact.h new file mode 100644 index 0000000..01bcf4f --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Reject_Contact.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Reject_Contact.h + * @brief SIP header 'Reject-Contact'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_REJECT_CONTACT_H_ +#define _TSIP_HEADER_REJECT_CONTACT_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Reject-Contact'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Reject_Contact_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Reject_Contact_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_REJECT_CONTACT_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Replaces.h b/tinySIP/include/tinysip/headers/tsip_header_Replaces.h new file mode 100644 index 0000000..5889dd0 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Replaces.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Replaces.h + * @brief SIP header 'Replaces'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_REPLACES_H_ +#define _TSIP_HEADER_REPLACES_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Replaces'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Replaces_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Replaces_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_REPLACES_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Reply_To.h b/tinySIP/include/tinysip/headers/tsip_header_Reply_To.h new file mode 100644 index 0000000..e5b97f1 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Reply_To.h @@ -0,0 +1,53 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Reply_To.h + * @brief SIP header 'Reply_To'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_REPLY_TO_H_ +#define _TSIP_HEADER_REPLY_TO_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// @brief SIP header 'Reply_To'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Reply_To_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Reply_To_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_REPLY_TO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Request_Disposition.h b/tinySIP/include/tinysip/headers/tsip_header_Request_Disposition.h new file mode 100644 index 0000000..50d8615 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Request_Disposition.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Request_Disposition.h + * @brief SIP header 'Request-Disposition'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_REQUEST_DISPOSITION_H_ +#define _TSIP_HEADER_REQUEST_DISPOSITION_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Request-Disposition'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Request_Disposition_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Request_Disposition_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_REQUEST_DISPOSITION_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Require.h b/tinySIP/include/tinysip/headers/tsip_header_Require.h new file mode 100644 index 0000000..01de563 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Require.h @@ -0,0 +1,66 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Require.h + * @brief SIP header 'Require'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_REQUIRE_H_ +#define _TSIP_HEADER_REQUIRE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_REQUIRE_VA_ARGS(option) tsip_header_Require_def_t, (const char*)option + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Require'. +/// +/// @par ABNF: Require = "Require" HCOLON option-tag *(COMMA option-tag) +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Require_s +{ + TSIP_DECLARE_HEADER; + + tsk_strings_L_t *options; +} +tsip_header_Require_t; + +TINYSIP_API tsip_header_Require_t* tsip_header_Require_create(const char* option); +TINYSIP_API tsip_header_Require_t* tsip_header_Require_create_null(); + +TINYSIP_API tsip_header_Require_t *tsip_header_Require_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Require_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_REQUIRE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Resource_Priority.h b/tinySIP/include/tinysip/headers/tsip_header_Resource_Priority.h new file mode 100644 index 0000000..24e83df --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Resource_Priority.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Resource_Priority.h + * @brief SIP header 'Resource-Priority'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_RESOURCE_PRIORITY_H_ +#define _TSIP_HEADER_RESOURCE_PRIORITY_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Resource-Priority'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Resource_Priority_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Resource_Priority_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_RESOURCE_PRIORITY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Retry_After.h b/tinySIP/include/tinysip/headers/tsip_header_Retry_After.h new file mode 100644 index 0000000..4761b5c --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Retry_After.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Retry_After.h + * @brief SIP header 'Retry-After'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_RETRY_AFTER_H_ +#define _TSIP_HEADER_RETRY_AFTER_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Retry-After'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Retry_After_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Retry_After_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_RETRY_AFTER_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Route.h b/tinySIP/include/tinysip/headers/tsip_header_Route.h new file mode 100644 index 0000000..28e3c80 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Route.h @@ -0,0 +1,72 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Route.h + * @brief SIP header 'Route'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ROUTE_H_ +#define _TSIP_HEADER_ROUTE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tinysip/tsip_uri.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_ROUTE_VA_ARGS(uri) tsip_header_Route_def_t, (const tsip_uri_t*)uri + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Route'. +/// +/// @par ABNF : Route = "Route" HCOLON route-param *(COMMA route-param) +/// route-param = name-addr *( SEMI rr-param ) +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Route_s +{ + TSIP_DECLARE_HEADER; + + char *display_name; + tsip_uri_t *uri; +} +tsip_header_Route_t; + +typedef tsk_list_t tsip_header_Routes_L_t; + +TINYSIP_API tsip_header_Route_t* tsip_header_Route_create(const tsip_uri_t* uri); +TINYSIP_API tsip_header_Route_t* tsip_header_Route_create_null(); + +TINYSIP_API tsip_header_Routes_L_t *tsip_header_Route_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Route_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ROUTE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_SIP_ETag.h b/tinySIP/include/tinysip/headers/tsip_header_SIP_ETag.h new file mode 100644 index 0000000..cf6ba6f --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_SIP_ETag.h @@ -0,0 +1,66 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_SIP_ETag.h + * @brief SIP header 'SIP-ETag'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_SIP_ETAG_H_ +#define _TSIP_HEADER_SIP_ETAG_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_SIP_ETAG_VA_ARGS(etag) tsip_header_SIP_ETag_def_t, (const char*)etag + +/** + * @struct tsip_header_SIP_ETag_s + * + * SIP header 'SIP-ETag' as per RFC 3903. + * @par ABNF + * SIP-ETag = "SIP-ETag" HCOLON entity-tag + * entity-tag = token +**/ +typedef struct tsip_header_SIP_ETag_s +{ + TSIP_DECLARE_HEADER; + char *value; +} +tsip_header_SIP_ETag_t; + +TINYSIP_API tsip_header_SIP_ETag_t* tsip_header_SIP_ETag_create(const char* etag); +TINYSIP_API tsip_header_SIP_ETag_t* tsip_header_SIP_ETag_create_null(); + +TINYSIP_API tsip_header_SIP_ETag_t *tsip_header_SIP_ETag_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_SIP_ETag_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SIP_ETAG_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_SIP_If_Match.h b/tinySIP/include/tinysip/headers/tsip_header_SIP_If_Match.h new file mode 100644 index 0000000..f918df4 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_SIP_If_Match.h @@ -0,0 +1,67 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_SIP_If_Match.h + * @brief SIP header 'SIP-If-Match'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_SIP_IF_MATCH_H_ +#define _TSIP_HEADER_SIP_IF_MATCH_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_SIP_IF_MATCH_VA_ARGS(etag) tsip_header_SIP_If_Match_def_t, (const char*)etag + + +/** + * @struct tsip_header_SIP_If_Match_s + * + * SIP header 'SIP-If-Match' as per RFC 3903. + * @par ABNF + * SIP-If-Match = "SIP-If-Match" HCOLON entity-tag + * entity-tag = token +**/ +typedef struct tsip_header_SIP_If_Match_s +{ + TSIP_DECLARE_HEADER; + char *value; +} +tsip_header_SIP_If_Match_t; + +TINYSIP_API tsip_header_SIP_If_Match_t* tsip_header_SIP_If_Match_create(const char* etag); +TINYSIP_API tsip_header_SIP_If_Match_t* tsip_header_SIP_If_Match_create_null(); + +TINYSIP_API tsip_header_SIP_If_Match_t *tsip_header_SIP_If_Match_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_SIP_If_Match_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SIP_IF_MATCH_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Security_Client.h b/tinySIP/include/tinysip/headers/tsip_header_Security_Client.h new file mode 100644 index 0000000..d453832 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Security_Client.h @@ -0,0 +1,111 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Security_Client.h + * @brief SIP header 'Security-Client' as per RFC 3329. + * + + */ +#ifndef _TSIP_HEADER_SECURITY_CLIENT_H_ +#define _TSIP_HEADER_SECURITY_CLIENT_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tnet_types.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_SECURITY_CLIENT_VA_ARGS(mech, alg, prot, mod, ealg, port_c, port_s, spi_c, spi_s) tsip_header_Security_Client_def_t, (const char*)mech, (const char*)alg, (const char*)prot, (const char*)mod, (const char*)ealg, (tnet_port_t)port_c, (tnet_port_t)port_s, (uint32_t)spi_c, (uint32_t)spi_s + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Security-Client' as per RFC 3329. +/// +/// @par ABNF : Security-Client = "Security-Client" HCOLON sec-mechanism *(COMMA sec-mechanism) +/// sec-mechanism = mechanism-name *( SEMI mech-parameters ) +/// mechanism-name = ( "digest" / "tls" / "ipsec-ike" / "ipsec-man" / token ) +/// mech-parameters = ( preference / digest-algorithm / digest-qop / digest-verify / mech-extension ) +/// preference = "q" EQUAL qvalue +/// digest-algorithm = "d-alg" EQUAL token +/// digest-qop = "d-qop" EQUAL token +/// digest-verify = "d-ver" EQUAL LDQUOT 32LHEX RDQUOT +/// mech-extension = generic-param +/// +/// mechanism-name = ( "ipsec-3gpp" ) +/// mech-parameters = ( algorithm / protocol /mode / +/// encrypt-algorithm / spi / +/// port1 / port2 ) +/// algorithm = "alg" EQUAL ( "hmac-md5-96" / +/// "hmac-sha-1-96" ) +/// protocol = "prot" EQUAL ( "ah" / "esp" ) +/// mode = "mod" EQUAL ( "trans" / "tun" ) +/// encrypt-algorithm = "ealg" EQUAL ( "des-ede3-cbc" / "null" ) +/// spi = "spi" EQUAL spivalue +/// spivalue = 10DIGIT; 0 to 4294967295 +/// port1 = "port1" EQUAL port +/// port2 = "port2" EQUAL port +/// port = 1*DIGIT +/// +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Security_Client_s +{ + TSIP_DECLARE_HEADER; + + //! sec-mechanism (e.g. "digest" / "tls" / "ipsec-3gpp") + char* mech; + //! algorithm (e.g. "hmac-md5-96" / "hmac-sha-1-96") + char* alg; + //! protocol (e.g. "ah" / "esp") + char* prot; + //! mode (e.g. "trans" / "tun") + char* mod; + //! encrypt-algorithm (e.g. "des-ede3-cbc" / "null") + char* ealg; + //! client port + tnet_port_t port_c; + //! server port + tnet_port_t port_s; + //! client spi + uint32_t spi_c; + //! server spi + uint32_t spi_s; + //! preference + double q; +} +tsip_header_Security_Client_t; + +typedef tsk_list_t tsip_header_Security_Clients_L_t; + +TINYSIP_API tsip_header_Security_Client_t* tsip_header_Security_Client_create(const char* mech, const char* alg, const char* prot, const char* mod, const char* ealg, tnet_port_t port_c, tnet_port_t port_s, uint32_t spi_c, uint32_t spi_s); +TINYSIP_API tsip_header_Security_Client_t* tsip_header_Security_Client_create_null(); + +TINYSIP_API tsip_header_Security_Clients_L_t *tsip_header_Security_Client_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Security_Client_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SECURITY_CLIENT_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Security_Server.h b/tinySIP/include/tinysip/headers/tsip_header_Security_Server.h new file mode 100644 index 0000000..eb66c43 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Security_Server.h @@ -0,0 +1,111 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Security_Server.h + * @brief SIP header 'Security-Server' as per RFC 3329. + * + + */ +#ifndef _TSIP_HEADER_SECURITY_SERVER_H_ +#define _TSIP_HEADER_SECURITY_SERVER_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tnet_types.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_SECURITY_SERVER_VA_ARGS() tsip_header_Security_Server_def_t + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Security-Server' as per RFC 3329. +/// +/// @par ABNF : Security-Server = "Security-Server" HCOLON sec-mechanism *(COMMA sec-mechanism) +/// sec-mechanism = mechanism-name *( SEMI mech-parameters ) +/// mechanism-name = ( "digest" / "tls" / "ipsec-ike" / "ipsec-man" / token ) +/// mech-parameters = ( preference / digest-algorithm / digest-qop / digest-verify / mech-extension ) +/// preference = "q" EQUAL qvalue +/// digest-algorithm = "d-alg" EQUAL token +/// digest-qop = "d-qop" EQUAL token +/// digest-verify = "d-ver" EQUAL LDQUOT 32LHEX RDQUOT +/// mech-extension = generic-param +/// +/// mechanism-name = ( "ipsec-3gpp" ) +/// mech-parameters = ( algorithm / protocol /mode / +/// encrypt-algorithm / spi / +/// port1 / port2 ) +/// algorithm = "alg" EQUAL ( "hmac-md5-96" / +/// "hmac-sha-1-96" ) +/// protocol = "prot" EQUAL ( "ah" / "esp" ) +/// mode = "mod" EQUAL ( "trans" / "tun" ) +/// encrypt-algorithm = "ealg" EQUAL ( "des-ede3-cbc" / "null" ) +/// spi = "spi" EQUAL spivalue +/// spivalue = 10DIGIT; 0 to 4294967295 +/// port1 = "port1" EQUAL port +/// port2 = "port2" EQUAL port +/// port = 1*DIGIT +/// +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Security_Server_s +{ + TSIP_DECLARE_HEADER; + + //! sec-mechanism (e.g. "digest" / "tls" / "ipsec-3gpp") + char* mech; + //! algorithm (e.g. "hmac-md5-96" / "hmac-sha-1-96") + char* alg; + //! protocol (e.g. "ah" / "esp") + char* prot; + //! mode (e.g. "trans" / "tun") + char* mod; + //! encrypt-algorithm (e.g. "des-ede3-cbc" / "null") + char* ealg; + //! client port + tnet_port_t port_c; + //! server port + tnet_port_t port_s; + //! client spi + uint32_t spi_c; + //! server spi + uint32_t spi_s; + //! preference + double q; +} +tsip_header_Security_Server_t; + +typedef tsk_list_t tsip_header_Security_Servers_L_t; + +TINYSIP_API tsip_header_Security_Server_t* tsip_header_Security_Server_create(); +TINYSIP_API tsip_header_Security_Server_t* tsip_header_Security_Server_create_null(); + +TINYSIP_API tsip_header_Security_Servers_L_t *tsip_header_Security_Server_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Security_Server_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SECURITY_SERVER_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Security_Verify.h b/tinySIP/include/tinysip/headers/tsip_header_Security_Verify.h new file mode 100644 index 0000000..a9e59aa --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Security_Verify.h @@ -0,0 +1,110 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Security_Verify.h + * @brief SIP header 'Security-Client' as per RFC 3329. + * + + */ +#ifndef _TSIP_HEADER_SECURITY_VERIFY_H_ +#define _TSIP_HEADER_SECURITY_VERIFY_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tnet_types.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_SECURITY_VERIFY_VA_ARGS() tsip_header_Security_Verify_def_t + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Security-Client' as per RFC 3329. +/// +/// @par ABNF : Security-Client = "Security-Client" HCOLON sec-mechanism *(COMMA sec-mechanism) +/// sec-mechanism = mechanism-name *( SEMI mech-parameters ) +/// mechanism-name = ( "digest" / "tls" / "ipsec-ike" / "ipsec-man" / token ) +/// mech-parameters = ( preference / digest-algorithm / digest-qop / digest-verify / mech-extension ) +/// preference = "q" EQUAL qvalue +/// digest-algorithm = "d-alg" EQUAL token +/// digest-qop = "d-qop" EQUAL token +/// digest-verify = "d-ver" EQUAL LDQUOT 32LHEX RDQUOT +/// mech-extension = generic-param +/// +/// mechanism-name = ( "ipsec-3gpp" ) +/// mech-parameters = ( algorithm / protocol /mode / +/// encrypt-algorithm / spi / +/// port1 / port2 ) +/// algorithm = "alg" EQUAL ( "hmac-md5-96" / +/// "hmac-sha-1-96" ) +/// protocol = "prot" EQUAL ( "ah" / "esp" ) +/// mode = "mod" EQUAL ( "trans" / "tun" ) +/// encrypt-algorithm = "ealg" EQUAL ( "des-ede3-cbc" / "null" ) +/// spi = "spi" EQUAL spivalue +/// spivalue = 10DIGIT; 0 to 4294967295 +/// port1 = "port1" EQUAL port +/// port2 = "port2" EQUAL port +/// port = 1*DIGIT +/// +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Security_Verify_s +{ + TSIP_DECLARE_HEADER; + + //! sec-mechanism (e.g. "digest" / "tls" / "ipsec-3gpp") + char* mech; + //! algorithm (e.g. "hmac-md5-96" / "hmac-sha-1-96") + char* alg; + //! protocol (e.g. "ah" / "esp") + char* prot; + //! mode (e.g. "trans" / "tun") + char* mod; + //! encrypt-algorithm (e.g. "des-ede3-cbc" / "null") + char* ealg; + //! client port + tnet_port_t port_c; + //! server port + tnet_port_t port_s; + //! client spi + uint32_t spi_c; + //! server spi + uint32_t spi_s; + //! preference + double q; +} +tsip_header_Security_Verify_t; + +typedef tsk_list_t tsip_header_Security_Verifies_L_t; + +TINYSIP_API tsip_header_Security_Verify_t* tsip_header_Security_Verify_create(); +TINYSIP_API tsip_header_Security_Verify_t* tsip_header_Security_Verify_create_null(); + +TINYSIP_API tsip_header_Security_Verifies_L_t *tsip_header_Security_Verify_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Security_Verify_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SECURITY_VERIFY_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Server.h b/tinySIP/include/tinysip/headers/tsip_header_Server.h new file mode 100644 index 0000000..1bdb3e5 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Server.h @@ -0,0 +1,69 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Server.h + * @brief SIP header 'Server'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_SERVER_H_ +#define _TSIP_HEADER_SERVER_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_SERVER_VA_ARGS(server) tsip_header_Server_def_t, (const char*)server + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Server'. +/// +/// @par ABNF: Server = "Server" HCOLON server-val *(LWS server-val) +/// server-val = product / comment +/// product = token [SLASH product-version] +/// product-version = token +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Server_s +{ + TSIP_DECLARE_HEADER; + char* value; +} +tsip_header_Server_t; + +TINYSIP_API tsip_header_Server_t* tsip_header_server_create(const char* server); +TINYSIP_API tsip_header_Server_t* tsip_header_server_create_null(); + +TINYSIP_API tsip_header_Server_t *tsip_header_Server_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Server_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SERVER_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Service_Route.h b/tinySIP/include/tinysip/headers/tsip_header_Service_Route.h new file mode 100644 index 0000000..307d644 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Service_Route.h @@ -0,0 +1,71 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Service_Route.h + * @brief SIP header 'Service-Route'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_SERVICE_ROUTE_H_ +#define _TSIP_HEADER_SERVICE_ROUTE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tinysip/tsip_uri.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_SERVICE_ROUTE_VA_ARGS(uri) tsip_header_Service_Route_def_t, (const tsip_uri_t*)uri + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Service-Route' as per RFC 3608. +/// +/// @par ABNF: Service-Route = "Service-Route" HCOLON sr-value *(COMMA sr-value) +/// sr-value = name-addr *( SEMI rr-param ) +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Service_Route_s +{ + TSIP_DECLARE_HEADER; + + char *display_name; + tsip_uri_t *uri; +} +tsip_header_Service_Route_t; + +typedef tsk_list_t tsip_header_Service_Routes_L_t; + +TINYSIP_API tsip_header_Service_Route_t* tsip_header_Service_Route_create(const tsip_uri_t* uri); +TINYSIP_API tsip_header_Service_Route_t* tsip_header_Service_Route_create_null(); + +TINYSIP_API tsip_header_Service_Routes_L_t *tsip_header_Service_Route_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Service_Route_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SERVICE_ROUTE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Session_Expires.h b/tinySIP/include/tinysip/headers/tsip_header_Session_Expires.h new file mode 100644 index 0000000..386d652 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Session_Expires.h @@ -0,0 +1,69 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Session_Expires.h + * @brief SIP header 'Session-Expires'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_SESSION_EXPIRES_H_ +#define _TSIP_HEADER_SESSION_EXPIRES_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_SESSION_EXPIRES_VA_ARGS(delta_seconds, refresher_uas) tsip_header_Session_Expires_def_t, (int64_t)delta_seconds, (tsk_bool_t)refresher_uas + +#define TSIP_SESSION_EXPIRES_DEFAULT_VALUE 1800 + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Session-Expires'. +/// +/// @par ABNF: Session-Expires = ( "Session-Expires" / "x" ) HCOLON delta-seconds *( SEMI (se-params ) +/// se-params = refresher-param / generic-param +/// refresher-param = "refresher" EQUAL ("uas" / "uac") +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Session_Expires_s +{ + TSIP_DECLARE_HEADER; + + int64_t delta_seconds; + tsk_bool_t refresher_uas; +} +tsip_header_Session_Expires_t; + +TINYSIP_API tsip_header_Session_Expires_t* tsip_header_Session_Expires_create(int64_t delta_seconds, tsk_bool_t refresher_uas); + +TINYSIP_API tsip_header_Session_Expires_t *tsip_header_Session_Expires_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Session_Expires_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SESSION_EXPIRES_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Subject.h b/tinySIP/include/tinysip/headers/tsip_header_Subject.h new file mode 100644 index 0000000..69cbfec --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Subject.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Subject.h + * @brief SIP header 'Subject'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_SUBJECT_H_ +#define _TSIP_HEADER_SUBJECT_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Subject'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Subject_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Subject_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SUBJECT_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Subscription_State.h b/tinySIP/include/tinysip/headers/tsip_header_Subscription_State.h new file mode 100644 index 0000000..5e4f90c --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Subscription_State.h @@ -0,0 +1,71 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Subscription_State.h + * @brief SIP header 'Subscription-State'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_SUBSCRIPTION_STATE_H_ +#define _TSIP_HEADER_SUBSCRIPTION_STATE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Subscription-State'. +/// +/// @par ABNF: Subscription-State = ( "Subscription-State" / "o" ) HCOLON substate-value *( SEMI subexp-params ) +/// substate-value = "active" / "pending" / "terminated" / extension-substate +/// extension-substate = token +/// subexp-params = ("reason" EQUAL event-reason-value) / ("expires" EQUAL delta-seconds) / ("retry-after" EQUAL delta-seconds) / generic-param +/// event-reason-value = "deactivated" / "probation" / "rejected" / "timeout" / "giveup" / "noresource" / event-reason-extension +/// event-reason-extension = token +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Subscription_State_s +{ + TSIP_DECLARE_HEADER; + + char* state; + char* reason; + int32_t expires; + int32_t retry_after; +} +tsip_header_Subscription_State_t; + +tsip_header_Subscription_State_t* tsip_header_Subscription_State_create(); + +tsip_header_Subscription_State_t *tsip_header_Subscription_State_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Subscription_State_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SUBSCRIPTION_STATE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Supported.h b/tinySIP/include/tinysip/headers/tsip_header_Supported.h new file mode 100644 index 0000000..6b0ecd4 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Supported.h @@ -0,0 +1,67 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Supported.h + * @brief SIP header 'Supported'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_SUPPORTED_H_ +#define _TSIP_HEADER_SUPPORTED_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_SUPPORTED_VA_ARGS(option) tsip_header_Supported_def_t, (const char*)option + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Supported'. +/// +/// @par ABNF: Supported / k +/// Supported = ( "Supported" / "k" ) HCOLON [option-tag *(COMMA option-tag)] +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Supported_s +{ + TSIP_DECLARE_HEADER; + + tsk_strings_L_t *options; +} +tsip_header_Supported_t; + +TINYSIP_API tsip_header_Supported_t* tsip_header_Supported_create(const char* option); +TINYSIP_API tsip_header_Supported_t* tsip_header_Supported_create_null(); + +TINYSIP_API tsip_header_Supported_t *tsip_header_Supported_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Supported_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_SUPPORTED_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Target_Dialog.h b/tinySIP/include/tinysip/headers/tsip_header_Target_Dialog.h new file mode 100644 index 0000000..185fdf9 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Target_Dialog.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Target_Dialog.h + * @brief SIP header 'Target-Dialog'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_TARGET_DIALOG_H_ +#define _TSIP_HEADER_TARGET_DIALOG_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Target-Dialog'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Target_Dialog_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Target_Dialog_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_TARGET_DIALOG_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Timestamp.h b/tinySIP/include/tinysip/headers/tsip_header_Timestamp.h new file mode 100644 index 0000000..6492824 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Timestamp.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Timestamp.h + * @brief SIP header 'Timestamp'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_TIMESTAMP_H_ +#define _TSIP_HEADER_TIMESTAMP_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Timestamp'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Timestamp_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Timestamp_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_TIMESTAMP_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_To.h b/tinySIP/include/tinysip/headers/tsip_header_To.h new file mode 100644 index 0000000..92970f1 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_To.h @@ -0,0 +1,70 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_To.h + * @brief SIP header 'To'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_TO_H_ +#define _TSIP_HEADER_TO_H_ + +#include "tinysip_config.h" +#include "tinysip/tsip_uri.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_TO_VA_ARGS(display_name, uri, tag) tsip_header_To_def_t, (const char*)display_name, (const tsip_uri_t*)uri, (const char*)tag + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'To' . +/// +/// @par ABNF: To = To = ( "To" / "t" ) HCOLON ( name-addr / addr-spec ) *( SEMI to-param ) +/// to-param = tag-param / generic-param +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_To_s +{ + TSIP_DECLARE_HEADER; + + char *display_name; + tsip_uri_t *uri; + char *tag; +} +tsip_header_To_t; + +TINYSIP_API tsip_header_To_t* tsip_header_To_create(const char* display_name, const tsip_uri_t* uri, const char* tag); +TINYSIP_API tsip_header_To_t* tsip_header_To_create_null(); + +TINYSIP_API tsip_header_To_t *tsip_header_To_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_To_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_TO_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Unsupported.h b/tinySIP/include/tinysip/headers/tsip_header_Unsupported.h new file mode 100644 index 0000000..d58f8d4 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Unsupported.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Unsupported.h + * @brief SIP header 'Unsupported'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_UNSUPPORTED_H_ +#define _TSIP_HEADER_UNSUPPORTED_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Unsupported'. +/// +/// @par ABNF +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Unsupported_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Unsupported_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_UNSUPPORTED_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_User_Agent.h b/tinySIP/include/tinysip/headers/tsip_header_User_Agent.h new file mode 100644 index 0000000..a69c454 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_User_Agent.h @@ -0,0 +1,65 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_User_Agent.h + * @brief SIP header 'User-Agent'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_USER_AGENT_H_ +#define _TSIP_HEADER_USER_AGENT_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +#define TSIP_HEADER_USER_AGENT_VA_ARGS(ua) tsip_header_User_Agent_def_t, (const char*)ua + +#define TSIP_HEADER_USER_AGENT_DEFAULT "IM-client/OMA1.0 doubango/v1.0.0" +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'User-Agent'. +/// +/// @par ABNF : User-Agent = "User-Agent" HCOLON server-val *(LWS server-val) +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_User_Agent_s +{ + TSIP_DECLARE_HEADER; + char *value; +} +tsip_header_User_Agent_t; + +TINYSIP_API tsip_header_User_Agent_t* tsip_header_User_Agent_create(const char* ua); +TINYSIP_API tsip_header_User_Agent_t* tsip_header_User_Agent_create_null(); + +TINYSIP_API tsip_header_User_Agent_t *tsip_header_User_Agent_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_User_Agent_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_USER_AGENT_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Via.h b/tinySIP/include/tinysip/headers/tsip_header_Via.h new file mode 100644 index 0000000..dca22a7 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Via.h @@ -0,0 +1,107 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Via.h + * @brief SIP Via/v header as per RFC 3261 subclause 20.42. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef TINYSIP_HEADER_VIA_H +#define TINYSIP_HEADER_VIA_H + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +#include "tsk_object.h" + +TSIP_BEGIN_DECLS + + +#define TSIP_HEADER_VIA_VA_ARGS(proto_name, proto_version, transport, host, port) tsip_header_Via_def_t, (const char*)proto_name, (const char*)proto_version, (const char*)transport, (const char*)host, (uint16_t)port + + +#define TSIP_HEADER_VIA_HAS_RPORT(self) ((self)->rport!=0) +#define TSIP_HEADER_VIA_HAS_TTL(self) ((self)->ttl!=0) +#define TSIP_HEADER_VIA_UNRELIABLE_TRANS(self) (tsk_striequals("UDP", (self)->transport)) +#define TSIP_HEADER_VIA_RELIABLE_TRANS(self) !(TSIP_HEADER_VIA_UNRELIABLE_TRANS(self)) +#define TSIP_HEADER_VIA_PROTO_NAME_DEFAULT "SIP" +#define TSIP_HEADER_VIA_PROTO_VERSION_DEFAULT "2.0" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP Via/v header as per RFC 3261 subclause 20.42. +/// ABNF: Via = ( "Via" / "v" ) HCOLON via-parm *(COMMA via-parm) +/// via-parm = sent-protocol LWS sent-by *( SEMI via-params ) +/// via-params = via-ttl / via-maddr / via-received / via-branch / via-compression / response-port / via-extension +/// via-ttl = "ttl" EQUAL ttl +/// via-maddr = "maddr" EQUAL host +/// via-received = "received" EQUAL (IPv4address / IPv6address) +/// via-branch = "branch" EQUAL token +/// via-compression = "comp" EQUAL ("sigcomp" / other-compression) +/// other-compression = token +/// response-port = "rport" [EQUAL 1*DIGIT] +/// via-extension = generic-param +/// sent-protocol = protocol-name SLASH protocol-version SLASH transport +/// protocol-name = "SIP" / token +/// protocol-version = token +/// transport = "UDP" / "TCP" / "TLS" / "SCTP" / "TLS-SCTP" / other-transport +/// sent-by = host [ COLON port ] +/// ttl = 1*3DIGIT +/// +/// @author Mamadou +/// @date 12/5/2009 +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Via_s +{ + TSIP_DECLARE_HEADER; + + char *branch; + char *host; + uint16_t port; + char *comp; + char *sigcomp_id; + char *received; + char *maddr; + char *proto_name; + char *proto_version; + char *transport; + + int32_t rport; + int32_t ttl; +} +tsip_header_Via_t; + +typedef tsk_list_t tsip_header_Vias_L_t; + +TINYSIP_API tsip_header_Via_t* tsip_header_Via_create(const char* proto_name, const char* proto_version, const char* transport, const char* host, uint16_t port); +TINYSIP_API tsip_header_Via_t* tsip_header_Via_create_null(); + +TINYSIP_API tsip_header_Vias_L_t *tsip_header_Via_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Via_def_t; + +TSIP_END_DECLS + +#endif /* TINYSIP_HEADER_VIA_H */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_WWW_Authenticate.h b/tinySIP/include/tinysip/headers/tsip_header_WWW_Authenticate.h new file mode 100644 index 0000000..5de99d9 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_WWW_Authenticate.h @@ -0,0 +1,79 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_WWW_Authenticate.h + * @brief SIP header 'WWW-Authenticate'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_WWW_AUTHENTICATE_H_ +#define _TSIP_HEADER_WWW_AUTHENTICATE_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'WWW-Authenticate'. +/// +/// @par ABNF = WWW-Authenticate = "WWW-Authenticate" HCOLON challenge +/// challenge = ("Digest" LWS digest-cln *(COMMA digest-cln)) / other-challenge +/// other-challenge = auth-scheme / auth-param *(COMMA auth-param) +/// digest-cln = realm / domain / nonce / opaque / stale / algorithm / qop-options / auth-param +/// realm = "realm" EQUAL realm-value +/// realm-value = quoted-string +/// domain = "domain" EQUAL LDQUOT URI *( 1*SP URI ) RDQUOT +/// URI = absoluteURI / abs-path +/// opaque = "opaque" EQUAL quoted-string +/// stale = "stale" EQUAL ( "true" / "false" ) +/// qop-options = "qop" EQUAL LDQUOT qop-value *("," qop-value) RDQUOT +/// qop-value = "auth" / "auth-int" / token +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_WWW_Authenticate_s +{ + TSIP_DECLARE_HEADER; + + char* scheme; + char* realm; + char* domain; + char* nonce; + char* opaque; + tsk_bool_t stale; + char* algorithm; + char* qop; +} +tsip_header_WWW_Authenticate_t; + +tsip_header_WWW_Authenticate_t *tsip_header_WWW_Authenticate_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_WWW_Authenticate_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_WWW_AUTHENTICATE_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_Warning.h b/tinySIP/include/tinysip/headers/tsip_header_Warning.h new file mode 100644 index 0000000..6c16112 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_Warning.h @@ -0,0 +1,72 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_Warning.h + * @brief SIP header 'Warning. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_WARNING_H_ +#define _TSIP_HEADER_WARNING_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Warning'. +/// +/// @par ABNF: Warning = "Warning" HCOLON warning-value *(COMMA warning-value) +/// warning-value = warn-code SP warn-agent SP warn-text +/// warn-code = 3DIGIT +/// warn-agent = hostport / pseudonym +/// warn-text = quoted-string +/// pseudonym = token +/// +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Warning_s +{ + TSIP_DECLARE_HEADER; + + int32_t code; + char* agent; + char* text; +} +tsip_header_Warning_t; + +typedef tsk_list_t tsip_header_Warnings_L_t; + +tsip_header_Warning_t* tsip_header_Warning_create(); + +tsip_header_Warnings_L_t *tsip_header_Warning_parse(const char *data, tsk_size_t size); + +TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Warning_def_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_WARNING_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_header_accept.h b/tinySIP/include/tinysip/headers/tsip_header_accept.h new file mode 100644 index 0000000..1742051 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_header_accept.h @@ -0,0 +1,57 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header_accept.h + * @brief SIP header 'Accept-Contact'. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef _TSIP_HEADER_ACCEPT_H_ +#define _TSIP_HEADER_ACCEPT_H_ + +#include "tinysip_config.h" +#include "tinysip/headers/tsip_header.h" + +TSIP_BEGIN_DECLS + +// The ' in the media-range field is used for doxygen (escape) and is not part of the abnf. +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// +/// @brief SIP header 'Accept' as per RFC 3261 subclause 20.1. +/// +/// @par ABNF = Accept = "Accept" HCOLON [ accept-range *(COMMA accept-range) ] ; example: ; +/// Accept: application/dialog-info+xml +/// accept-range = media-range *(SEMI accept-param) +/// media-range = ( "*'/*" / ( m-type SLASH "*" ) / ( m-type SLASH m-subtype ) ) *( SEMI m-parameter ) +//////////////////////////////////////////////////////////////////////////////////////////////////// +typedef struct tsip_header_Accept_s +{ + TSIP_DECLARE_HEADER; +} +tsip_header_Accept_t; + +TSIP_END_DECLS + +#endif /* _TSIP_HEADER_ACCEPT_H_ */ + diff --git a/tinySIP/include/tinysip/headers/tsip_headers.h b/tinySIP/include/tinysip/headers/tsip_headers.h new file mode 100644 index 0000000..b520cc4 --- /dev/null +++ b/tinySIP/include/tinysip/headers/tsip_headers.h @@ -0,0 +1,89 @@ +/* +* Copyright (C) 2010-2011 Mamadou Diop. +* +* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with DOUBANGO. +* +*/ + +/**@file tsip_header.h + * @brief List of all supported 3GPP/SIP headers. + * + * @author Mamadou Diop <diopmamadou(at)doubango[dot]org> + * + + */ +#ifndef TINYSIP_HEADERS_H +#define TINYSIP_HEADERS_H + +#include "tinysip_config.h" + +#include "tinysip/headers/tsip_header_Allow.h" +#include "tinysip/headers/tsip_header_Allow_Events.h" +#include "tinysip/headers/tsip_header_Authorization.h" +#include "tinysip/headers/tsip_header_Call_ID.h" +#include "tinysip/headers/tsip_header_Contact.h" +#include "tinysip/headers/tsip_header_CSeq.h" +#include "tinysip/headers/tsip_header_Date.h" +#include "tinysip/headers/tsip_header_Dummy.h" +#include "tinysip/headers/tsip_header_Event.h" +#include "tinysip/headers/tsip_header_Expires.h" +#include "tinysip/headers/tsip_header_From.h" +#include "tinysip/headers/tsip_header_Max_Forwards.h" +#include "tinysip/headers/tsip_header_Min_Expires.h" +#include "tinysip/headers/tsip_header_Min_SE.h" +#include "tinysip/headers/tsip_header_Path.h" +#include "tinysip/headers/tsip_header_P_Access_Network_Info.h" +#include "tinysip/headers/tsip_header_P_Asserted_Identity.h" +#include "tinysip/headers/tsip_header_P_Associated_URI.h" +#include "tinysip/headers/tsip_header_P_Charging_Function_Addresses.h" +#include "tinysip/headers/tsip_header_P_Preferred_Identity.h" +#include "tinysip/headers/tsip_header_Privacy.h" +#include "tinysip/headers/tsip_header_Proxy_Authenticate.h" +#include "tinysip/headers/tsip_header_Proxy_Authorization.h" +#include "tinysip/headers/tsip_header_Proxy_Require.h" +#include "tinysip/headers/tsip_header_RAck.h" +#include "tinysip/headers/tsip_header_Record_Route.h" +#include "tinysip/headers/tsip_header_Refer_Sub.h" +#include "tinysip/headers/tsip_header_Refer_To.h" +#include "tinysip/headers/tsip_header_Referred_By.h" +#include "tinysip/headers/tsip_header_Require.h" +#include "tinysip/headers/tsip_header_Route.h" +#include "tinysip/headers/tsip_header_RSeq.h" +#include "tinysip/headers/tsip_header_Security_Client.h" +#include "tinysip/headers/tsip_header_Security_Server.h" +#include "tinysip/headers/tsip_header_Security_Verify.h" +#include "tinysip/headers/tsip_header_Server.h" +#include "tinysip/headers/tsip_header_Session_Expires.h" +#include "tinysip/headers/tsip_header_Service_Route.h" +#include "tinysip/headers/tsip_header_SIP_ETag.h" +#include "tinysip/headers/tsip_header_SIP_If_Match.h" +#include "tinysip/headers/tsip_header_Subscription_State.h" +#include "tinysip/headers/tsip_header_Supported.h" +#include "tinysip/headers/tsip_header_To.h" +#include "tinysip/headers/tsip_header_User_Agent.h" +#include "tinysip/headers/tsip_header_Via.h" +#include "tinysip/headers/tsip_header_Warning.h" +#include "tinysip/headers/tsip_header_WWW_Authenticate.h" + +TSIP_BEGIN_DECLS + +TSIP_END_DECLS + + +#endif /* TINYSIP_HEADERS_H */ + |