From 4749f195b8835367e6dff9c7b2502c6ea50c75ec Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 8 Nov 2016 11:16:26 +0100 Subject: [PATCH] right way to do the callbacks --- coreapi/account_creator.c | 6 +++--- coreapi/account_creator.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/coreapi/account_creator.c b/coreapi/account_creator.c index d2071e6b3..c7d3c3207 100644 --- a/coreapi/account_creator.c +++ b/coreapi/account_creator.c @@ -61,12 +61,12 @@ void linphone_account_creator_cbs_set_user_data(LinphoneAccountCreatorCbs *cbs, cbs->user_data = ud; } -void *linphone_account_creator_cbs_get_update_hash(const LinphoneAccountCreatorCbs *cbs) { +LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_update_hash(const LinphoneAccountCreatorCbs *cbs) { return cbs->update_hash; } -void linphone_account_creator_cbs_set_update_hash(LinphoneAccountCreatorCbs *cbs, void *ud) { - cbs->update_hash = ud; +void linphone_account_creator_cbs_set_update_hash(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb) { + cbs->update_hash = cb; } LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_is_account_used(const LinphoneAccountCreatorCbs *cbs) { diff --git a/coreapi/account_creator.h b/coreapi/account_creator.h index b52f715dd..16b702722 100644 --- a/coreapi/account_creator.h +++ b/coreapi/account_creator.h @@ -392,14 +392,14 @@ LINPHONE_PUBLIC void linphone_account_creator_cbs_set_user_data(LinphoneAccountC * @param[in] cbs LinphoneAccountCreatorCbs object. * @return The user pointer associated with the LinphoneAccountCreatorCbs object. **/ -LINPHONE_PUBLIC void *linphone_account_creator_cbs_get_update_hash(const LinphoneAccountCreatorCbs *cbs); +LINPHONE_PUBLIC LinphoneAccountCreatorCbsStatusCb linphone_account_creator_cbs_get_update_hash(const LinphoneAccountCreatorCbs *cbs); /** * Assign a user pointer to a LinphoneAccountCreatorCbs object. * @param[in] cbs LinphoneAccountCreatorCbs object. * @param[in] ud The user pointer to associate with the LinphoneAccountCreatorCbs object. **/ -LINPHONE_PUBLIC void linphone_account_creator_cbs_set_update_hash(LinphoneAccountCreatorCbs *cbs, void *ud); +LINPHONE_PUBLIC void linphone_account_creator_cbs_set_update_hash(LinphoneAccountCreatorCbs *cbs, LinphoneAccountCreatorCbsStatusCb cb); /** * Get the current linked tested callback.