mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 23:58:17 +00:00
Fixes conflicts between François and Ghislain's "internal" parameter of vtables
This commit is contained in:
parent
38dfb9ab6f
commit
41545fadbd
4 changed files with 4 additions and 17 deletions
|
|
@ -1686,7 +1686,6 @@ static void linphone_core_init(LinphoneCore * lc, const LinphoneCoreVTable *vtab
|
|||
LinphoneCoreVTable* local_vtable= linphone_core_v_table_new();
|
||||
LinphoneCoreVTable *internal_vtable = linphone_core_v_table_new();
|
||||
|
||||
linphone_core_v_table_set_internal(internal_vtable, TRUE);
|
||||
ms_message("Initializing LinphoneCore %s", linphone_core_get_version());
|
||||
|
||||
lc->config=lp_config_ref(config);
|
||||
|
|
@ -1696,9 +1695,9 @@ static void linphone_core_init(LinphoneCore * lc, const LinphoneCoreVTable *vtab
|
|||
linphone_task_list_init(&lc->hooks);
|
||||
|
||||
internal_vtable->notify_received = linphone_core_internal_notify_received;
|
||||
_linphone_core_add_listener(lc, internal_vtable, TRUE);
|
||||
_linphone_core_add_listener(lc, internal_vtable, TRUE, TRUE);
|
||||
memcpy(local_vtable,vtable,sizeof(LinphoneCoreVTable));
|
||||
_linphone_core_add_listener(lc, local_vtable, TRUE, TRUE);
|
||||
_linphone_core_add_listener(lc, local_vtable, TRUE, FALSE);
|
||||
|
||||
linphone_core_set_state(lc,LinphoneGlobalStartup,"Starting up");
|
||||
ortp_init();
|
||||
|
|
|
|||
|
|
@ -2108,7 +2108,6 @@ typedef struct _LinphoneCoreVTable{
|
|||
LinphoneCoreLogCollectionUploadStateChangedCb log_collection_upload_state_changed; /**< Callback to upload collected logs */
|
||||
LinphoneCoreLogCollectionUploadProgressIndicationCb log_collection_upload_progress_indication; /**< Callback to indicate log collection upload progress */
|
||||
void *user_data; /**<User data associated with the above callbacks */
|
||||
bool_t internal;
|
||||
} LinphoneCoreVTable;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1412,9 +1412,6 @@ typedef struct _VTableReference VTableReference;
|
|||
|
||||
void v_table_reference_destroy(VTableReference *ref);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_core_v_table_set_internal(LinphoneCoreVTable *table, bool_t internal);
|
||||
bool_t linphone_core_v_table_is_internal(LinphoneCoreVTable *table);
|
||||
|
||||
void _linphone_core_add_listener(LinphoneCore *lc, LinphoneCoreVTable *vtable, bool_t autorelease, bool_t internal);
|
||||
|
||||
#ifdef VIDEO_ENABLED
|
||||
|
|
|
|||
|
|
@ -33,14 +33,6 @@ void* linphone_core_v_table_get_user_data(LinphoneCoreVTable *table) {
|
|||
return table->user_data;
|
||||
}
|
||||
|
||||
void linphone_core_v_table_set_internal(LinphoneCoreVTable *table, bool_t internal) {
|
||||
table->internal = internal;
|
||||
}
|
||||
|
||||
bool_t linphone_core_v_table_is_internal(LinphoneCoreVTable *table) {
|
||||
return table->internal;
|
||||
}
|
||||
|
||||
void linphone_core_v_table_destroy(LinphoneCoreVTable* table) {
|
||||
ms_free(table);
|
||||
}
|
||||
|
|
@ -74,12 +66,12 @@ static void cleanup_dead_vtable_refs(LinphoneCore *lc){
|
|||
}\
|
||||
if (has_cb) ms_message("Linphone core [%p] notifying [%s]",lc,#function_name)
|
||||
|
||||
#define NOTIFY_IF_EXIST_INTERNAL(function_name, internal, ...) \
|
||||
#define NOTIFY_IF_EXIST_INTERNAL(function_name, internal_val, ...) \
|
||||
MSList* iterator; \
|
||||
VTableReference *ref; \
|
||||
bool_t has_cb = FALSE; \
|
||||
for (iterator=lc->vtable_refs; iterator!=NULL; iterator=iterator->next)\
|
||||
if ((ref=(VTableReference*)iterator->data)->valid && (lc->current_vtable=ref->vtable)->function_name && (linphone_core_v_table_is_internal(lc->current_vtable) == internal)) {\
|
||||
if ((ref=(VTableReference*)iterator->data)->valid && (lc->current_vtable=ref->vtable)->function_name && (ref->internal == internal_val)) {\
|
||||
lc->current_vtable->function_name(__VA_ARGS__);\
|
||||
has_cb = TRUE;\
|
||||
}\
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue