X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=coreapi%2Flinphonecore_utils.h;h=b80992ad1471c6bc5c9aab370d8610087d6567a2;hb=e1830ee3077b47d1557a1292e8c8b80cd01fc403;hp=bd41ec2b9e9b1b9dd1440a39c3e98f5a9930bbc6;hpb=08b8b1220d6043afdff207d74a244b13a20b90db;p=linphone diff --git a/coreapi/linphonecore_utils.h b/coreapi/linphonecore_utils.h index bd41ec2b..b80992ad 100644 --- a/coreapi/linphonecore_utils.h +++ b/coreapi/linphonecore_utils.h @@ -56,19 +56,23 @@ void linphone_sound_daemon_destroy(LinphoneSoundDaemon *obj); * Enum describing the result of the echo canceller calibration process. **/ typedef enum { - LinphoneEcCalibratorInProgress, - LinphoneEcCalibratorDone, - LinphoneEcCalibratorFailed + LinphoneEcCalibratorInProgress, /**< The echo canceller calibration process is on going. */ + LinphoneEcCalibratorDone, /**< The echo canceller calibration has been performed and produced an echo delay measure. */ + LinphoneEcCalibratorFailed, /**< The echo canceller calibration process has failed. */ + LinphoneEcCalibratorDoneNoEcho /**< The echo canceller calibration has been performed and no echo has been detected. */ }LinphoneEcCalibratorStatus; typedef void (*LinphoneEcCalibrationCallback)(LinphoneCore *lc, LinphoneEcCalibratorStatus status, int delay_ms, void *data); +typedef void (*LinphoneEcCalibrationAudioInit)(void *data); +typedef void (*LinphoneEcCalibrationAudioUninit)(void *data); /** * * Start an echo calibration of the sound devices, in order to find adequate settings for the echo canceller automatically. **/ -int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibrationCallback cb, void *cb_data); +int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibrationCallback cb, + LinphoneEcCalibrationAudioInit audio_init_cb, LinphoneEcCalibrationAudioUninit audio_uninit_cb, void *cb_data); /** * @ingroup IOS * Special function to warm up dtmf feeback stream. #linphone_core_stop_dtmf_stream must() be called before entering FG mode @@ -86,6 +90,20 @@ typedef bool_t (*LinphoneCoreIterateHook)(void *data); void linphone_core_add_iterate_hook(LinphoneCore *lc, LinphoneCoreIterateHook hook, void *hook_data); void linphone_core_remove_iterate_hook(LinphoneCore *lc, LinphoneCoreIterateHook hook, void *hook_data); +/** + * @ingroup misc + *Function to get call country code from ISO 3166-1 alpha-2 code, ex: FR returns 33 + *@param iso country code alpha2 + *@return call country code or -1 if not found + */ +int linphone_dial_plan_lookup_ccc_from_iso(const char* iso); +/** + * @ingroup misc + *Function to get call country code from an e164 number, ex: +33952650121 will return 33 + *@param e164 phone number + *@return call country code or -1 if not found + */ +int linphone_dial_plan_lookup_ccc_from_e164(const char* e164); #ifdef __cplusplus }