Commit 644c537c authored by Simon Morlat's avatar Simon Morlat
Browse files

Merge remote-tracking branch 'origin/master' into dev_http

Conflicts:
	include/belle-sip/Makefile.am
	include/belle-sip/belle-sip.h
	src/Makefile.am
	src/belle_sip_internal.h
parents 957298c1 46e5106e
......@@ -44,6 +44,7 @@ LOCAL_SRC_FILES := \
belle_sdpLexer.c \
belle_sdpParser.c \
belle_sip_object.c \
belle_sip_dict.c \
belle_sip_parameters.c \
belle_sip_resolver.c \
belle_sip_uri_impl.c \
......
......@@ -29,9 +29,11 @@ LT_INIT(win32-dll disable-static)
dnl Workaround for mingw, whose compiler doesn't check in /usr/include ...
case "$target_os" in
*mingw*)
if test "$prefix" = "/usr" ; then
CPPFLAGS="$CPPFLAGS -I/usr/include"
LDFLAGS="$LDFLAGS -L/usr/lib"
if test "$cross_compiling" != "yes"; then
if test "$prefix" = "/usr" ; then
CPPFLAGS="$CPPFLAGS -I/usr/include"
LDFLAGS="$LDFLAGS -L/usr/lib"
fi
fi
;;
esac
......@@ -85,7 +87,7 @@ ANTLR_LIBS="$ANTLR_LIBS -lantlr3c"
dnl check antlr headers
CPPFLAGS_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $ANTLR_CFLAGS"
CPPFLAGS="$ANTLR_CFLAGS $CPPFLAGS"
AC_CHECK_HEADERS([antlr3.h], [found_antlr3=yes])
AC_CHECK_DECL( [antlr3StringStreamNew]
,[AC_DEFINE(HAVE_ANTLR_STRING_STREAM_NEW,1,[Defined when antlr 3.4 api is detected])]
......@@ -255,6 +257,10 @@ AM_CONDITIONAL(ENABLE_TESTS, test x$tests_enabled = xyes && test x$found_cunit =
# Checks for typedefs, structures, and compiler characteristics.
# Eliminate -lstdc++ addition to postdeps for cross compiles.
postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
# Checks for library functions.
AC_CHECK_LIB(rt, clock_gettime)
AC_CHECK_LIB(dl, dlopen)
......
......@@ -21,6 +21,7 @@ bellesip_HEADERS=\
refresher.h \
defs.h \
resolver.h \
dict.h \
http-provider.h \
http-message.h \
http-listener.h
......
......@@ -22,6 +22,7 @@
#include "belle-sip/defs.h"
#include "belle-sip/object.h"
#include "belle-sip/dict.h"
/**
* This enum declares all object types used in belle-sip (see belle_sip_object_t)
......@@ -114,6 +115,7 @@ BELLE_SIP_DECLARE_TYPES_BEGIN(belle_sip,1)
BELLE_SIP_TYPE_ID(belle_sip_dns_srv_t),
BELLE_SIP_TYPE_ID(belle_sip_simple_resolver_context_t),
BELLE_SIP_TYPE_ID(belle_sip_combined_resolver_context_t),
BELLE_SIP_TYPE_ID(belle_sip_dict_t),
BELLE_SIP_TYPE_ID(belle_http_provider_t),
BELLE_SIP_TYPE_ID(belle_http_request_t),
BELLE_SIP_TYPE_ID(belle_http_response_t),
......
/*
belle-sip - SIP (RFC3261) library.
Copyright (C) 2010 Belledonne Communications SARL
This program 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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DICT_H
#define DICT_H
#ifndef WIN32
#include <sys/types.h>
#endif
#include <inttypes.h>
#include "object.h"
BELLE_SIP_BEGIN_DECLS
typedef struct belle_sip_dict belle_sip_dict_t;
#define BELLE_SIP_DICT(obj) BELLE_SIP_CAST(obj,belle_sip_dict_t)
/**
* @brief belle_sip_dict_create
* @return an instance of a belle_sip_dict_t object.
* @note The object is not owned by default.
* @note all belle_sip_dict_set_* functions will overwrite existing values.
*/
BELLESIP_EXPORT belle_sip_dict_t* belle_sip_dict_create();
/**
* @brief belle_sip_dict_set_int stores an integer into the dictionary
* @param obj the dictionary instance
* @param key the name of the integer to store
* @param value value to store
*/
BELLESIP_EXPORT void belle_sip_dict_set_int(belle_sip_dict_t* obj, const char* key, int value);
/**
* @brief belle_sip_dict_get_int retrieves an integer from the dictionary
* @param obj the dictionary instance
* @param key name of the integer to retrieve
* @param default_value value to return if the key is not found
* @return the searched integer if the key exists, default_value if not found
*/
BELLESIP_EXPORT int belle_sip_dict_get_int(belle_sip_dict_t* obj, const char* key, int default_value);
/**
* @brief belle_sip_dict_set_string stores a string into the dictionary
* @param obj the dictionary instance
* @param key the name of the string to store
* @param value value to store
*/
BELLESIP_EXPORT void belle_sip_dict_set_string(belle_sip_dict_t* obj, const char* key, const char*value);
/**
* @brief belle_sip_dict_get_string retrieves a string from the dictionary
* @param obj the dictionary instance
* @param key the name of the string to retrieve
* @param default_value
* @return the searched string if the key exists, default_value if not found
*/
BELLESIP_EXPORT const char* belle_sip_dict_get_string(belle_sip_dict_t* obj, const char* key, const char* default_value);
/**
* @brief belle_sip_dict_set_int64 stores an int64 in the dictionary
* @param obj the dictionary instance
* @param key the name of the integer to store
* @param value value to store
*/
BELLESIP_EXPORT void belle_sip_dict_set_int64(belle_sip_dict_t* obj, const char* key, int64_t value);
/**
* @brief belle_sip_dict_get_int64 retrieves an int64 from the dictionary
* @param obj the dictionary instance
* @param key the name of the integer to retrieve
* @param default_value value to return if the key is not found
* @return the searched int64 if the key exists, default_value if not found
*/
BELLESIP_EXPORT int64_t belle_sip_dict_get_int64(belle_sip_dict_t* obj, const char* key, int64_t default_value);
/**
* @brief belle_sip_dict_remove will erase the value for a key
* @param obj the dictionary instance
* @param key the name of the integer to remove
* @return 0 if the key was found, 1 otherwise
*/
BELLESIP_EXPORT int belle_sip_dict_remove(belle_sip_dict_t* obj, const char* key);
/**
* @brief belle_sip_dict_clear will clear the object's dictionary.
* @param obj the dictionary instance
*/
BELLESIP_EXPORT void belle_sip_dict_clear(belle_sip_dict_t* obj);
/**
* Clones the source dictionary into the dst dictionary. The dst dictionary is cleared before the cloning
* is done.
* @param src source dictionary
* @param dst destination dictionary
*/
BELLESIP_EXPORT void belle_sip_dict_clone( const belle_sip_dict_t* src, belle_sip_dict_t* dst);
/**
* Merge the source dictionary into the destination dictionary.
*
* Same function as #belle_sip_dict_clone, except the destination dictionary is not cleared before inserting the source data.
* This overwrites common keys, and keeps existing keys.
*/
BELLESIP_EXPORT void belle_sip_dict_merge( const belle_sip_dict_t* src, belle_sip_dict_t* dst);
/**
* @brief belle_sip_dict_haskey tells if a key exists in the dictionary.
* @param obj the dictionary instance
* @param key the key to look for
* @return 1 if the key exists, 0 otherwise
* @todo create unit test
*/
BELLESIP_EXPORT int belle_sip_dict_haskey(belle_sip_dict_t* obj, const char* key);
/**
* Apply a function for all keys stored in the dictionary
*/
BELLESIP_EXPORT void belle_sip_dict_foreach(const belle_sip_dict_t* obj, void (*apply_func)(const char*, void*, void*), void* userdata);
BELLE_SIP_END_DECLS
#endif // DICT_H
/*
belle-sip - SIP (RFC3261) library.
Copyright (C) 2010 Belledonne Communications SARL
Copyright (C) 2010 Belledonne Communications SARL
This program 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.
This program 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.
This program 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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef belle_sip_object_h
......@@ -77,40 +77,42 @@ typedef unsigned int belle_sip_type_id_t;
* It is the base class for all belle sip non trivial objects.
* It owns a reference count which allows to trigger the destruction of the object when the last
* user of it calls belle_sip_object_unref().
*
*
* It contains a generic data store that allows users to store named data in it and retrieve them afterwards.
*
* About object lifecycle<br>
* In belle-sip, objects can be, depending on their types, initially owned, that there are created with a ref count of 1, or
* initially unowned, that is with reference count of 0. Such objets are also referred as "floating object". They are automatically destroyed
* by the main loop iteration, so a floating object can be seen as a temporary object, until someones calls belle_sip_object_ref() on it.
*
* In order to know whether a kind of object is initially owned or initially unowned, you can use the test program tester/belle_sip_object_destribe.
*
* In order to know whether a kind of object is initially owned or initially unowned, you can use the test program tester/belle_sip_object_describe.
* This tool gives the hierarchy and properties of the object type whose name is supplied in argument. For example:
*
*
* <pre>./tester/belle_sip_object_describe belle_sip_request_t</pre>
*
*
* The object memory management depends slightly on whether an object type is created initially owned or not.
* In order not to be lost and make memory fault or leaks, consider the following rules:
*
*
* When an object is of type initially unowned:
* * call belle_sip_object_ref() on it only if you need a pointer to this object to be used outside the scope of the current function.
* * call belle_sip_object_unref() on it only if you previously called belle_sip_object_ref().
*
*
* When an object is of type initially owned:
* * you can safely store its pointer.
* * use belle_sip_object_unref() when you no longer need it.
*
* Also, keep in mind that most objects of belle-sip are initially unowned, especially
*
* Also, keep in mind that most objects of belle-sip are initially unowned, especially
* * all objects who are usually required to be used inside another object (for example: an URI is part of a from header, a contact header is part of a message)
* * all objects whose lifecyle is maintained by the stack: transactions, dialogs.
*
*
* On the contrary, top level objects whose lifecyle belongs only to the application are initially owned:
* * belle_sip_provider_t, belle_sip_stack_t, belle_sip_source_t.
*
*
* Internally, belle-sip objects containing pointers to other objects must take a reference count on the other objects they hold; and leave this reference
* when they no longer need it. This rule must be strictly followed by developers doing things inside belle-sip.
**/
typedef struct _belle_sip_object belle_sip_object_t;
typedef void (*belle_sip_object_destroy_t)(belle_sip_object_t*);
typedef void (*belle_sip_object_clone_t)(belle_sip_object_t* obj, const belle_sip_object_t *orig);
......@@ -138,12 +140,13 @@ struct _belle_sip_object{
struct weak_ref *weak_refs;
struct belle_sip_object_pool *pool;
struct _belle_sip_list *pool_iterator;
struct _belle_sip_list *data_store;
};
BELLE_SIP_BEGIN_DECLS
BELLESIP_VAR_EXPORT belle_sip_object_vptr_t belle_sip_object_t_vptr;
BELLESIP_VAR_EXPORT belle_sip_object_vptr_t belle_sip_object_t_vptr;
BELLESIP_EXPORT belle_sip_object_t * _belle_sip_object_new(size_t objsize, belle_sip_object_vptr_t *vptr);
......@@ -163,7 +166,7 @@ int belle_sip_object_is_unowed(const belle_sip_object_t *obj);
/**
* Increments reference counter, which prevents the object from being destroyed.
* If the object is initially unowed, this acquires the first reference.
*
*
**/
BELLESIP_EXPORT belle_sip_object_t * belle_sip_object_ref(void *obj);
......@@ -202,9 +205,9 @@ void _belle_sip_object_copy(belle_sip_object_t *newobj, const belle_sip_object_t
/**
* Clone an object.
*
*
* This clone function makes a deep copy of all object internal structure, so that the new object and the reference object have no dependencies at all.
*
*
**/
BELLESIP_EXPORT belle_sip_object_t *belle_sip_object_clone(const belle_sip_object_t *obj);
......@@ -215,6 +218,75 @@ BELLESIP_EXPORT belle_sip_object_t *belle_sip_object_clone(const belle_sip_objec
belle_sip_object_t *belle_sip_object_clone_and_ref(const belle_sip_object_t *obj);
typedef void (*belle_sip_data_destroy)(void* data);
typedef void* (*belle_sip_data_clone)(const char* name, void* data);
/**
* Add an entry to the object's embedded data store, with the key name specified.
* The destroy function is used when the data is cleaned.
*
* If an entry already exists, the existing data will be cleaned by calling its destroy function and the new data will be placed instead.
*
* Returns -1 in case of error, 0 in case the insertion was successful, and 1 if existing data was present.
**/
BELLESIP_EXPORT int belle_sip_object_data_set( belle_sip_object_t *obj, const char* name, void* data, belle_sip_data_destroy destroy_func );
/**
* Retrieve data that has been stored in the object data store.
**/
BELLESIP_EXPORT void* belle_sip_object_data_get( belle_sip_object_t *obj, const char* name );
/**
* Return 1 if the key exists in the data store, 0 otherwise
**/
BELLESIP_EXPORT int belle_sip_object_data_exists( belle_sip_object_t *obj, const char* name );
/**
* Destroys the named data associated by the name provided.
*
* Returns 0 for success, -1 for error
**/
BELLESIP_EXPORT int belle_sip_object_data_remove( belle_sip_object_t *obj, const char* name);
/**
* Retrieve the data from the data store and removes it from the data store, without calling the destructor.
* This transfers ownership of the data to the caller, which will be in charge of releasing it.
**/
BELLESIP_EXPORT void* belle_sip_object_data_grab( belle_sip_object_t* obj, const char* name);
/**
* Clears all data in the object's storage, invoking the destroy_func when possible
**/
BELLESIP_EXPORT void belle_sip_object_data_clear( belle_sip_object_t* obj );
/**
* clones the object's data store to another one, using the provided clone function to clone individual data items.
*
* The destination data store will be cleaned before pushing the source data into it.
* For a merge, use #belle_sip_object_data_merge.
* This is equivalent to the following code:
* {
* belle_sip_object_data_clear(dst);
* belle_sip_object_data_merge(src, dst, clone_func);
* }
*
* Note that providing NULL as a cloning function will simply assign the src object's data to the dst object.
*
**/
BELLESIP_EXPORT void belle_sip_object_data_clone( const belle_sip_object_t* src, belle_sip_object_t* dst, belle_sip_data_clone clone_func);
/**
* Merge the source data store into the destination data store.
*
* Same function as #belle_sip_object_data_clone, except the destination data store is not cleared before inserting the source data.
* This overwrites common keys, and keeps existing keys.
*/
BELLESIP_EXPORT void belle_sip_object_data_merge( const belle_sip_object_t* src, belle_sip_object_t* dst, belle_sip_data_clone clone_func);
/**
* Apply a function for each entry in the data store
*/
BELLESIP_EXPORT void belle_sip_object_data_foreach( const belle_sip_object_t* obj, void (*apply_func)(const char* key, void* data, void* userdata), void* userdata);
/**
* Returns a string describing the inheritance diagram and implemented interfaces of object obj.
**/
......@@ -292,7 +364,7 @@ typedef struct belle_sip_interface_desc{
typedef struct struct_methods_##interface_name BELLE_SIP_INTERFACE_METHODS_TYPE(interface_name);\
struct struct_methods_##interface_name {\
belle_sip_interface_desc_t desc;\
#define BELLE_SIP_DECLARE_INTERFACE_END };
......@@ -339,23 +411,25 @@ belle_sip_object_pool_t * belle_sip_object_pool_get_current();
int belle_sip_object_pool_cleanable(belle_sip_object_pool_t *pool);
void belle_sip_object_pool_clean(belle_sip_object_pool_t *obj);
BELLE_SIP_DECLARE_VPTR(belle_sip_object_t);
BELLE_SIP_END_DECLS
/**
* Adding a new type in belle-sip in 5 steps
* =========================================
*
*
* Let's suppose you want to add an object called belle_sip_something_t
* 1) Declare the type in the enum in belle-sip.h:
* BELLE_SIP_TYPE_ID(belle_sip_something_t)
* 2) Declare the api of the new object in .h, including a typedef and a cast macro:
* typedef struct belle_sip_something belle_sip_something_t;
* #define BELLE_SIP_SOMETHING(obj) BELLE_SIP_CAST(obj,belle_sip_something_t)
*
*
* belle_sip_something_t *belle_sip_something_create(int arg1, int arg2);
* void belle_sip_something_do_cooking(belle_sip_something_t *obj);
* Do not add any destructor, belle_sip_object_unref() does it for all objects.
*
*
* 3) in the c file contaning the object's implementation, define the internal structure for your object.
* The first field of the struct must be the parent type.
* struct belle_sip_something{
......@@ -369,7 +443,7 @@ BELLE_SIP_END_DECLS
* static void belle_sip_something_destroy(belle_sip_something_t *obj){
* if (obj->mychar) belle_sip_free(obj->mychar);
* }
*
*
* belle_sip_something_t *belle_sip_something_create(int arg1, int arg2){
* belle_sip_something_t *obj=belle_sip_object_new(belle_sip_something_t);
* obj->myint1=arg1;
......@@ -380,7 +454,7 @@ BELLE_SIP_END_DECLS
* Declare the interfaces implemented by the object (to be documented) and instanciate its "vptr", necessary for dynamic casting.
* BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(belle_sip_something_t);
* BELLE_SIP_INSTANCIATE_VPTR(belle_sip_something_t, belle_sip_object_t,belle_sip_something_destroy, NULL, NULL,FALSE);
*
*
* 5) in .h file included everywhere in the source (typically belle_sip_internal.h), declare the vptr
* BELLE_SIP_DECLARE_VPTR(belle_sip_dns_srv_t);
*/
......
......@@ -54,6 +54,10 @@ BELLESIP_EXPORT int belle_sip_stack_get_dns_timeout(const belle_sip_stack_t *sta
BELLESIP_EXPORT void belle_sip_stack_set_dns_timeout(belle_sip_stack_t *stack, int timeout);
BELLESIP_EXPORT unsigned char belle_sip_stack_dns_srv_enabled(const belle_sip_stack_t *stack);
BELLESIP_EXPORT void belle_sip_stack_enable_dns_srv(belle_sip_stack_t *stack, unsigned char enable);
/**
* Can be used to simulate network transmission delays, for tests.
**/
......
......@@ -63,6 +63,7 @@ libbellesip_la_SOURCES= \
transports/stream_listeningpoint.c \
refresher.c \
dns.c dns.h \
belle_sip_dict.c \
http-provider.c \
http-message.c
......
/*
belle-sip - SIP (RFC3261) library.
Copyright (C) 2010 Belledonne Communications SARL
This program 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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "belle-sip/dict.h"
#include "belle-sip/object.h"
#include "belle-sip/belle-sip.h"
#include "belle_sip_internal.h"
#define BELLE_SIP_DICT(obj) BELLE_SIP_CAST(obj,belle_sip_dict_t)
static void belle_sip_dict_string_destroy( void* data )
{
belle_sip_free(data);
}
static void* belle_sip_dict_string_clone( const char* str, void* data )
{
(void)str;
return belle_sip_strdup((const char*)data);
}
belle_sip_dict_t* belle_sip_dict_create()
{
return belle_sip_object_new(belle_sip_dict_t);
}
static void belle_sip_dict_destroy( belle_sip_dict_t* obj)
{
}
void belle_sip_dict_set_int(belle_sip_dict_t* obj, const char* key, int value)
{
char tmp[30];
snprintf(tmp,sizeof(tmp),"%i",value);
belle_sip_dict_set_string(obj, key, tmp);
}
int belle_sip_dict_get_int(belle_sip_dict_t* obj, const char* key, int default_value)
{
const char *str=belle_sip_object_data_get(BELLE_SIP_OBJECT(obj),key);
if (str!=NULL) {
int ret=0;
if (strstr(str,"0x")==str){
sscanf(str,"%x",&ret);
}else ret=atoi(str);
return ret;
}
else return default_value;
}
void belle_sip_dict_set_string(belle_sip_dict_t* obj, const char*key, const char*value)
{
belle_sip_object_data_set( BELLE_SIP_OBJECT(obj), key, (void*)belle_sip_strdup(value), belle_sip_dict_string_destroy );
}
const char* belle_sip_dict_get_string(belle_sip_dict_t* obj, const char* key, const char* default_value)
{
void* data = belle_sip_object_data_get( BELLE_SIP_OBJECT(obj), key );
if( data ) return (const char *)data;
else return default_value;
}
void belle_sip_dict_set_int64(belle_sip_dict_t* obj, const char* key, int64_t value)
{
char tmp[30];
snprintf(tmp,sizeof(tmp),"%"PRId64"",value);
belle_sip_dict_set_string(obj,key,tmp);
}
int64_t belle_sip_dict_get_int64(belle_sip_dict_t* obj, const char* key, int64_t default_value)
{
const char *str= belle_sip_object_data_get( BELLE_SIP_OBJECT(obj), key );
if (str!=NULL) {
#ifdef WIN32
return (int64_t)_atoi64(str);
#else
return atoll(str);
#endif
}
else return default_value;
}
int belle_sip_dict_remove(belle_sip_dict_t* obj, const char*key)
{
return belle_sip_object_data_remove(BELLE_SIP_OBJECT(obj), key);
}
void belle_sip_dict_clone( const belle_sip_dict_t* src, belle_sip_dict_t* dst)
{
belle_sip_dict_clear(dst);
belle_sip_dict_merge(src, dst);
}
void belle_sip_dict_merge( const belle_sip_dict_t* src, belle_sip_dict_t* dst)
{
belle_sip_object_data_merge(BELLE_SIP_OBJECT(src), BELLE_SIP_OBJECT(dst), belle_sip_dict_string_clone);
}
int belle_sip_dict_haskey(belle_sip_dict_t* obj, const char* key)
{
return belle_sip_object_data_exists(BELLE_SIP_OBJECT(obj), key);
}
void belle_sip_dict_foreach(const belle_sip_dict_t* obj, void (*apply_func)(const char*, void*, void*), void* userdata)
{
belle_sip_object_data_foreach(BELLE_SIP_OBJECT(obj),apply_func, userdata);
}
void belle_sip_dict_clear(belle_sip_dict_t* obj)
{
return belle_sip_object_data_clear(BELLE_SIP_OBJECT(obj));
}
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(belle_sip_dict_t);
BELLE_SIP_INSTANCIATE_VPTR(belle_sip_dict_t, belle_sip_object_t,
belle_sip_dict_destroy,
NULL,
NULL,
TRUE);
/*
belle-sip - SIP (RFC3261) library.
Copyright (C) 2010 Belledonne Communications SARL
Copyright (C) 2010 Belledonne Communications SARL
This program 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.
This program is free software: you can redistribute it and/or modify