Commit d5d0ed50 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Added callback setter for globalStateChanged

parent 28ec18d5
......@@ -173,6 +173,10 @@ LinphoneCoreCbs *linphone_core_get_current_callbacks(const LinphoneCore *lc) {
return lc->current_cbs;
}
void linphone_core_cbs_set_global_state_changed(LinphoneCoreCbs *cbs, LinphoneCoreGlobalStateChangedCb cb) {
cbs->vtable->global_state_changed = cb;
}
void linphone_core_cbs_set_registration_state_changed(LinphoneCoreCbs *cbs, LinphoneCoreCbsRegistrationStateChangedCb cb) {
cbs->vtable->registration_state_changed = cb;
}
......@@ -277,7 +281,6 @@ void linphone_core_cbs_set_friend_list_removed(LinphoneCoreCbs *cbs, LinphoneCor
cbs->vtable->friend_list_removed = cb;
}
typedef belle_sip_object_t_vptr_t LinphoneCore_vptr_t;
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneCore);
BELLE_SIP_INSTANCIATE_VPTR(LinphoneCore, belle_sip_object_t,
......
......@@ -607,6 +607,13 @@ LINPHONE_PUBLIC void *linphone_core_cbs_get_user_data(const LinphoneCoreCbs *cbs
*/
LINPHONE_PUBLIC LinphoneCoreCbs *linphone_core_get_current_callbacks(const LinphoneCore *lc);
/**
* Set the #LinphoneCoreGlobalStateChangedCb callback.
* @param[in] cbs A #LinphoneCoreCbs.
* @param[in] cb The callback.
*/
LINPHONE_PUBLIC void linphone_core_cbs_set_global_state_changed(LinphoneCoreCbs *cbs, LinphoneCoreGlobalStateChangedCb cb);
/**
* Set the #LinphoneCoreCbsRegistrationStateChangedCb callback.
* @param[in] cbs A #LinphoneCoreCbs.
......
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