Commit f2924982 authored by Ronan's avatar Ronan

chore(doc): fix bad doc in many places + set right types when needed

parent 1548254b
......@@ -188,8 +188,8 @@ LINPHONE_PUBLIC bool_t linphone_address_weak_equal (const LinphoneAddress *addre
LINPHONE_PUBLIC bool_t linphone_address_equal (const LinphoneAddress *address1, const LinphoneAddress *address2);
/**
* Get the header encoded in the address.
* @param address the address
* Get the header encoded in the address.
* @param header_name the header name
**/
LINPHONE_PUBLIC const char *linphone_address_get_header (const LinphoneAddress *address, const char *header_name);
......
This diff is collapsed.
......@@ -22,9 +22,11 @@
#include "linphone/api/c-types.h"
// =============================================================================
#ifdef __cplusplus
extern "C" {
#endif
extern "C" {
#endif // ifdef __cplusplus
/**
* @addtogroup misc
......@@ -34,88 +36,88 @@ extern "C" {
/**
* Constructs a LinphoneMagicSearch object
**/
LINPHONE_PUBLIC LinphoneMagicSearch *linphone_magic_search_new(LinphoneCore *lc);
LINPHONE_PUBLIC LinphoneMagicSearch *linphone_magic_search_new (LinphoneCore *lc);
/**
* Increment reference count of LinphoneMagicSearch object.
**/
LINPHONE_PUBLIC LinphoneMagicSearch *linphone_magic_search_ref(LinphoneMagicSearch *magicSearch);
LINPHONE_PUBLIC LinphoneMagicSearch *linphone_magic_search_ref (LinphoneMagicSearch *magic_search);
/**
* Decrement reference count of LinphoneMagicSearch object. When dropped to zero, memory is freed.
**/
LINPHONE_PUBLIC void linphone_magic_search_unref(LinphoneMagicSearch *magicSearch);
LINPHONE_PUBLIC void linphone_magic_search_unref (LinphoneMagicSearch *magic_search);
/**
* Set the minimum value used to calculate the weight in search
* @param[in] weight minimum weight
**/
LINPHONE_PUBLIC void linphone_magic_search_set_min_weight(LinphoneMagicSearch *magicSearch, const unsigned int weight);
LINPHONE_PUBLIC void linphone_magic_search_set_min_weight (LinphoneMagicSearch *magic_search, unsigned int weight);
/**
* @return the minimum value used to calculate the weight in search
**/
LINPHONE_PUBLIC unsigned int linphone_magic_search_get_min_weight(const LinphoneMagicSearch *magicSearch);
LINPHONE_PUBLIC unsigned int linphone_magic_search_get_min_weight (const LinphoneMagicSearch *magic_search);
/**
* Set the maximum value used to calculate the weight in search
* @param[in] weight maximum weight
**/
LINPHONE_PUBLIC void linphone_magic_search_set_max_weight(LinphoneMagicSearch *magicSearch, const unsigned int weight);
LINPHONE_PUBLIC void linphone_magic_search_set_max_weight (LinphoneMagicSearch *magic_search, unsigned int weight);
/**
* @return the maximum value used to calculate the weight in search
**/
LINPHONE_PUBLIC unsigned int linphone_magic_search_get_max_weight(const LinphoneMagicSearch *magicSearch);
LINPHONE_PUBLIC unsigned int linphone_magic_search_get_max_weight (const LinphoneMagicSearch *magic_search);
/**
* @return the delimiter used to find matched filter word
**/
LINPHONE_PUBLIC const char *linphone_magic_search_get_delimiter(const LinphoneMagicSearch *magicSearch);
LINPHONE_PUBLIC const char *linphone_magic_search_get_delimiter (const LinphoneMagicSearch *magic_search);
/**
* Set the delimiter used to find matched filter word
* @param[in] delimiter delimiter (example "-_.,")
**/
LINPHONE_PUBLIC void linphone_magic_search_set_delimiter(LinphoneMagicSearch *magicSearch, const char *delimiter);
LINPHONE_PUBLIC void linphone_magic_search_set_delimiter (LinphoneMagicSearch *magic_search, const char *delimiter);
/**
* @return if the delimiter search is used
**/
LINPHONE_PUBLIC bool_t linphone_magic_search_get_use_delimiter(LinphoneMagicSearch *magicSearch);
LINPHONE_PUBLIC bool_t linphone_magic_search_get_use_delimiter (LinphoneMagicSearch *magic_search);
/**
* Enable or disable the delimiter in search
* @param[in] enable
**/
LINPHONE_PUBLIC void linphone_magic_search_set_use_delimiter(LinphoneMagicSearch *magicSearch, bool_t enable);
LINPHONE_PUBLIC void linphone_magic_search_set_use_delimiter (LinphoneMagicSearch *magic_search, bool_t enable);
/**
* @return the number of the maximum SearchResult which will be return
**/
LINPHONE_PUBLIC unsigned int linphone_magic_search_get_search_limit(const LinphoneMagicSearch *magicSearch);
LINPHONE_PUBLIC unsigned int linphone_magic_search_get_search_limit (const LinphoneMagicSearch *magic_search);
/**
* Set the number of the maximum SearchResult which will be return
* @param[in] limit
**/
LINPHONE_PUBLIC void linphone_magic_search_set_search_limit(LinphoneMagicSearch *magicSearch, const unsigned int limit);
LINPHONE_PUBLIC void linphone_magic_search_set_search_limit (LinphoneMagicSearch *magic_search, unsigned int limit);
/**
* @return if the search is limited
**/
LINPHONE_PUBLIC bool_t linphone_magic_search_get_limited_search(const LinphoneMagicSearch *magicSearch);
LINPHONE_PUBLIC bool_t linphone_magic_search_get_limited_search (const LinphoneMagicSearch *magic_search);
/**
* Enable or disable the limited search
* @param[in] limited
**/
LINPHONE_PUBLIC void linphone_magic_search_set_limited_search(LinphoneMagicSearch *magicSearch, const bool_t limited);
LINPHONE_PUBLIC void linphone_magic_search_set_limited_search (LinphoneMagicSearch *magic_search, bool_t limited);
/**
* Reset the cache to begin a new search
**/
LINPHONE_PUBLIC void linphone_magic_search_reset_search_cache(LinphoneMagicSearch *magicSearch);
LINPHONE_PUBLIC void linphone_magic_search_reset_search_cache (LinphoneMagicSearch *magic_search);
/**
* Create a sorted list of SearchResult from SipUri, Contact name,
......@@ -124,13 +126,17 @@ LINPHONE_PUBLIC void linphone_magic_search_reset_search_cache(LinphoneMagicSearc
* During the first search, a cache is created and used for the next search
* Use linphone_magic_search_reset_search_cache() to begin a new search
* @param[in] filter word we search
* @param[in] withDomain domain which we want to search only
* @param[in] domain domain which we want to search only
* - "" for searching in all contact
* - "*" for searching in contact with sip SipUri
* - "yourdomain" for searching in contact from "yourdomain" domain
* @return sorted list of \bctbx_list{LinphoneSearchResult}
**/
LINPHONE_PUBLIC bctbx_list_t* linphone_magic_search_get_contact_list_from_filter(LinphoneMagicSearch *magicSearch, const char *filter, const char *withDomain);
LINPHONE_PUBLIC bctbx_list_t* linphone_magic_search_get_contact_list_from_filter (
LinphoneMagicSearch *magic_search,
const char *filter,
const char *domain
);
/**
* @}
......
......@@ -177,7 +177,7 @@ LINPHONE_PUBLIC float linphone_call_params_get_sent_framerate(const LinphoneCall
LINPHONE_PUBLIC const LinphoneVideoDefinition * linphone_call_params_get_sent_video_definition(const LinphoneCallParams *cp);
/**
* @biref Gets the size of the video that is sent.
* @brief Gets the size of the video that is sent.
* @param[in] cp #LinphoneCalParams object
* @return The sent video size or MS_VIDEO_SIZE_UNKNOWN if not available.
* @deprecated Use #linphone_call_params_get_sent_video_definition() instead. Deprecated since 2017-03-28.
......
......@@ -522,7 +522,7 @@ typedef void (*LinphoneCoreCbsEcCalibrationResultCb)(LinphoneCore *lc, LinphoneE
typedef void (*LinphoneCoreCbsEcCalibrationAudioInitCb)(LinphoneCore *lc);
/**
* @biref Function prototype used by #linphone_core_cbs_set_ec_calibrator_audio_uninit().
* @brief Function prototype used by #linphone_core_cbs_set_ec_calibrator_audio_uninit().
* @param lc The core.
*/
typedef void (*LinphoneCoreCbsEcCalibrationAudioUninitCb)(LinphoneCore *lc);
......
......@@ -803,7 +803,7 @@ LINPHONE_PUBLIC char * linphone_core_compress_log_collection(void);
LINPHONE_PUBLIC void linphone_core_reset_log_collection(void);
/**
* @bref Define a log handler.
* @brief Define a log handler.
* @param logfunc The function pointer of the log handler.
* @deprecated Use #linphone_logging_service_cbs_set_log_message_written() instead. Deprecated since 2017-10-10.
* @donotwrap
......@@ -1274,7 +1274,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_decline_call(Li
LINPHONE_PUBLIC LinphoneStatus linphone_core_terminate_all_calls(LinphoneCore *lc);
/**
* @biref Pauses the call. If a music file has been setup using linphone_core_set_play_file(),
* @brief Pauses the call. If a music file has been setup using linphone_core_set_play_file(),
* this file will be played to the remote user.
*
* The only way to resume a paused call is to call linphone_core_resume_call().
......@@ -3507,7 +3507,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_preferred_video_size(
LINPHONE_PUBLIC void linphone_core_set_preview_video_definition(LinphoneCore *lc, LinphoneVideoDefinition *vdef);
/**
* @biref Sets the video size for the captured (preview) video.
* @brief Sets the video size for the captured (preview) video.
*
* This method is for advanced usage where a video capture must be set independently of the size of the stream actually sent through the call.
* This allows for example to have the preview window with HD resolution even if due to bandwidth constraint the sent video size is small.
......
......@@ -416,7 +416,7 @@ LINPHONE_PUBLIC LinphoneBuffer *linphone_factory_create_buffer_from_string(Linph
/**
* Creates an object #LinphoneConfig
* @param[in] factory the #LinphoneFactory
* @param[in] the path of the config
* @param[in] path the path of the config
* @return a #LinphoneConfig
*/
LINPHONE_PUBLIC LinphoneConfig *linphone_factory_create_config(LinphoneFactory *factory, const char *path);
......@@ -424,8 +424,8 @@ LINPHONE_PUBLIC LinphoneConfig *linphone_factory_create_config(LinphoneFactory *
/**
* Creates an object #LinphoneConfig
* @param[in] factory the #LinphoneFactory
* @param[in] the path of the config
* @param[in] the path of the factory
* @param[in] path the path of the config
* @param[in] path the path of the factory
* @return a #LinphoneConfig
*/
LINPHONE_PUBLIC LinphoneConfig *linphone_factory_create_config_with_factory(LinphoneFactory *factory, const char *path, const char *factory_path);
......@@ -433,6 +433,7 @@ LINPHONE_PUBLIC LinphoneConfig *linphone_factory_create_config_with_factory(Linp
/**
* Creates an object #LinphoneConfig
* @param[in] factory the #LinphoneFactory
* @param[in] data the config data
* @return a #LinphoneConfig
*/
LINPHONE_PUBLIC LinphoneConfig *linphone_factory_create_config_from_string(LinphoneFactory *factory, const char *data);
......@@ -454,14 +455,14 @@ LINPHONE_PUBLIC void linphone_factory_set_user_data(LinphoneFactory *factory, vo
/**
* Sets the log collection path
* @param[in] factory the #LinphoneFactory
* @param[in] the path of the logs
* @param[in] path the path of the logs
*/
LINPHONE_PUBLIC void linphone_factory_set_log_collection_path(LinphoneFactory *factory, const char *path);
/**
* Enables or disables log collection
* @param[in] factory the #LinphoneFactory
* @param[in] the policy for log collection
* @param[in] state the policy for log collection
*/
LINPHONE_PUBLIC void linphone_factory_enable_log_collection(LinphoneFactory *factory, LinphoneLogCollectionState state);
......
......@@ -17,15 +17,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "search/magic-search.h"
#include "c-wrapper/c-wrapper.h"
#include "search/magic-search.h"
// =============================================================================
using namespace std;
L_DECLARE_C_OBJECT_IMPL(MagicSearch);
LinphoneMagicSearch *linphone_core_create_magic_search(LinphoneCore *lc) {
shared_ptr<LinphonePrivate::MagicSearch> cppPtr = make_shared<LinphonePrivate::MagicSearch>(L_GET_CPP_PTR_FROM_C_OBJECT(lc));
shared_ptr<LinphonePrivate::MagicSearch> cppPtr = make_shared<LinphonePrivate::MagicSearch>(
L_GET_CPP_PTR_FROM_C_OBJECT(lc)
);
LinphoneMagicSearch *object = L_INIT(MagicSearch);
L_SET_CPP_PTR_FROM_C_OBJECT(object, cppPtr);
......@@ -36,67 +40,73 @@ LinphoneMagicSearch *linphone_magic_search_new(LinphoneCore *lc) {
return linphone_core_create_magic_search(lc);
}
LinphoneMagicSearch *linphone_magic_search_ref(LinphoneMagicSearch *magicSearch) {
belle_sip_object_ref(magicSearch);
return magicSearch;
LinphoneMagicSearch *linphone_magic_search_ref (LinphoneMagicSearch *magic_search) {
belle_sip_object_ref(magic_search);
return magic_search;
}
void linphone_magic_search_unref(LinphoneMagicSearch *magicSearch) {
belle_sip_object_unref(magicSearch);
void linphone_magic_search_unref (LinphoneMagicSearch *magic_search) {
belle_sip_object_unref(magic_search);
}
void linphone_magic_search_set_min_weight(LinphoneMagicSearch *magicSearch, const unsigned int weight) {
L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->setMinWeight(weight);
void linphone_magic_search_set_min_weight (LinphoneMagicSearch *magic_search, unsigned int weight) {
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->setMinWeight(weight);
}
unsigned int linphone_magic_search_get_min_weight(const LinphoneMagicSearch *magicSearch) {
return L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->getMinWeight();
unsigned int linphone_magic_search_get_min_weight (const LinphoneMagicSearch *magic_search) {
return L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->getMinWeight();
}
void linphone_magic_search_set_max_weight(LinphoneMagicSearch *magicSearch, const unsigned int weight) {
L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->setMaxWeight(weight);
void linphone_magic_search_set_max_weight (LinphoneMagicSearch *magic_search, unsigned int weight) {
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->setMaxWeight(weight);
}
unsigned int linphone_magic_search_get_max_weight(const LinphoneMagicSearch *magicSearch) {
return L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->getMaxWeight();
unsigned int linphone_magic_search_get_max_weight (const LinphoneMagicSearch *magic_search) {
return L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->getMaxWeight();
}
const char *linphone_magic_search_get_delimiter(const LinphoneMagicSearch *magicSearch) {
return L_STRING_TO_C(L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->getDelimiter());
const char *linphone_magic_search_get_delimiter (const LinphoneMagicSearch *magic_search) {
return L_STRING_TO_C(L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->getDelimiter());
}
void linphone_magic_search_set_delimiter(LinphoneMagicSearch *magicSearch, const char *delimiter) {
L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->setDelimiter(L_C_TO_STRING(delimiter));
void linphone_magic_search_set_delimiter (LinphoneMagicSearch *magic_search, char *delimiter) {
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->setDelimiter(L_C_TO_STRING(delimiter));
}
bool_t linphone_magic_search_get_use_delimiter(LinphoneMagicSearch *magicSearch) {
return L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->getUseDelimiter();
bool_t linphone_magic_search_get_use_delimiter (LinphoneMagicSearch *magic_search) {
return L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->getUseDelimiter();
}
void linphone_magic_search_set_use_delimiter(LinphoneMagicSearch *magicSearch, bool_t enable) {
L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->setUseDelimiter(enable);
void linphone_magic_search_set_use_delimiter (LinphoneMagicSearch *magic_search, bool_t enable) {
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->setUseDelimiter(enable);
}
unsigned int linphone_magic_search_get_search_limit(const LinphoneMagicSearch *magicSearch) {
return L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->getSearchLimit();
unsigned int linphone_magic_search_get_search_limit (const LinphoneMagicSearch *magic_search) {
return L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->getSearchLimit();
}
void linphone_magic_search_set_search_limit(LinphoneMagicSearch *magicSearch, const unsigned int limit) {
L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->setSearchLimit(limit);
void linphone_magic_search_set_search_limit (LinphoneMagicSearch *magic_search, unsigned int limit) {
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->setSearchLimit(limit);
}
bool_t linphone_magic_search_get_limited_search(const LinphoneMagicSearch *magicSearch) {
return L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->getLimitedSearch();
bool_t linphone_magic_search_get_limited_search (const LinphoneMagicSearch *magic_search) {
return L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->getLimitedSearch();
}
void linphone_magic_search_set_limited_search(LinphoneMagicSearch *magicSearch, const bool_t limited) {
L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->setLimitedSearch(limited);
void linphone_magic_search_set_limited_search (LinphoneMagicSearch *magic_search, bool_t limited) {
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->setLimitedSearch(limited);
}
void linphone_magic_search_reset_search_cache(LinphoneMagicSearch *magicSearch) {
L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->resetSearchCache();
void linphone_magic_search_reset_search_cache (LinphoneMagicSearch *magic_search) {
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->resetSearchCache();
}
bctbx_list_t* linphone_magic_search_get_contact_list_from_filter(LinphoneMagicSearch *magicSearch, const char *filter, const char *withDomain) {
return L_GET_RESOLVED_C_LIST_FROM_CPP_LIST(L_GET_CPP_PTR_FROM_C_OBJECT(magicSearch)->getContactListFromFilter(L_C_TO_STRING(filter), L_C_TO_STRING(withDomain)));
bctbx_list_t* linphone_magic_search_get_contact_list_from_filter (
LinphoneMagicSearch *magic_search,
const char *filter,
const char *domain
) {
return L_GET_RESOLVED_C_LIST_FROM_CPP_LIST(L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->getContactListFromFilter(
L_C_TO_STRING(filter), L_C_TO_STRING(domain)
));
}
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