Commit 725c663a authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI

Export belle_sip_dict_t API correctly.

parent fbe1ae17
......@@ -23,6 +23,7 @@
#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)
......@@ -33,7 +34,7 @@ typedef struct belle_sip_dict belle_sip_dict_t;
* @note The object is not owned by default.
* @note all belle_sip_dict_set_* functions will overwrite existing values.
*/
belle_sip_dict_t* belle_sip_dict_create();
BELLESIP_EXPORT belle_sip_dict_t* belle_sip_dict_create();
/**
* @brief belle_sip_dict_set_int stores an integer into the dictionary
......@@ -41,7 +42,7 @@ belle_sip_dict_t* belle_sip_dict_create();
* @param key the name of the integer to store
* @param value value to store
*/
void belle_sip_dict_set_int(belle_sip_dict_t* obj, const char* key, int value);
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
......@@ -50,7 +51,7 @@ void belle_sip_dict_set_int(belle_sip_dict_t* obj, const char* key, int value);
* @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
*/
int belle_sip_dict_get_int(belle_sip_dict_t* obj, const char* key, int default_value);
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
......@@ -58,7 +59,7 @@ int belle_sip_dict_get_int(belle_sip_dict_t* obj, const char* key, int default_v
* @param key the name of the string to store
* @param value value to store
*/
void belle_sip_dict_set_string(belle_sip_dict_t* obj, const char* key, const char*value);
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
......@@ -66,7 +67,7 @@ void belle_sip_dict_set_string(belle_sip_dict_t* obj, const char* key, const cha
* @param default_value
* @return the searched string if the key exists, default_value if not found
*/
const char* belle_sip_dict_get_string(belle_sip_dict_t* obj, const char* key, const char* default_value);
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
......@@ -74,7 +75,7 @@ const char* belle_sip_dict_get_string(belle_sip_dict_t* obj, const char* key, co
* @param key the name of the integer to store
* @param value value to store
*/
void belle_sip_dict_set_int64(belle_sip_dict_t* obj, const char* key, int64_t value);
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
......@@ -83,7 +84,7 @@ void belle_sip_dict_set_int64(belle_sip_dict_t* obj, const char* key, int64_t va
* @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
*/
int64_t belle_sip_dict_get_int64(belle_sip_dict_t* obj, const char* key, int64_t default_value);
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
......@@ -91,13 +92,13 @@ int64_t belle_sip_dict_get_int64(belle_sip_dict_t* obj, const char* key, int64_t
* @param key the name of the integer to remove
* @return 0 if the key was found, 1 otherwise
*/
int belle_sip_dict_remove(belle_sip_dict_t* obj, const char* key);
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
*/
void belle_sip_dict_clear(belle_sip_dict_t* obj);
BELLESIP_EXPORT void belle_sip_dict_clear(belle_sip_dict_t* obj);
/**
* @brief belle_sip_dict_haskey tells if a key exists in the dictionary.
......@@ -106,6 +107,8 @@ void belle_sip_dict_clear(belle_sip_dict_t* obj);
* @return 1 if the key exists, 0 otherwise
* @todo create unit test
*/
int belle_sip_dict_haskey(belle_sip_dict_t* obj, const char* key);
BELLESIP_EXPORT int belle_sip_dict_haskey(belle_sip_dict_t* obj, const char* key);
BELLE_SIP_END_DECLS
#endif // DICT_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment