From 0a4fab598726255c28d4a1c7877d373bf3ec0156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Mon, 7 Dec 2015 11:23:17 +0100 Subject: [PATCH] Add a method to LinphoneCore to get a pointer to the internal conference object --- coreapi/conference.cc | 4 ++-- coreapi/conference.h | 2 +- coreapi/linphonecore.c | 4 ++++ coreapi/linphonecore.h | 3 +++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/coreapi/conference.cc b/coreapi/conference.cc index 237a703fc..6bcf85841 100644 --- a/coreapi/conference.cc +++ b/coreapi/conference.cc @@ -653,11 +653,11 @@ void TransportConference::transferStateChanged(LinphoneCore *lc, LinphoneCall *t LinphoneConference *linphone_media_conference_new(LinphoneCore *core) { - return new MediaConference(core); + return (LinphoneConference *) new MediaConference(core); } LinphoneConference *linphone_transport_conference_new(LinphoneCore *core) { - return new TransportConference(core); + return (LinphoneConference *) new TransportConference(core); } void linphone_conference_free(LinphoneConference *obj) { diff --git a/coreapi/conference.h b/coreapi/conference.h index d10b78a56..e18faf046 100644 --- a/coreapi/conference.h +++ b/coreapi/conference.h @@ -28,7 +28,7 @@ #include "linphonecore.h" -typedef void LinphoneConference; +typedef struct _LinphoneConference LinphoneConference; typedef enum { LinphoneConferenceClassMedia, diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index e3176e590..4f4790f80 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -7473,3 +7473,7 @@ int linphone_core_stop_conference_recording(LinphoneCore *lc) { if(lc->conf_ctx) return linphone_conference_stop_recording(lc->conf_ctx); return -1; } + +LinphoneConference *linphone_core_get_conference(LinphoneCore *lc) { + return lc->conf_ctx; +} \ No newline at end of file diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index f8fcec461..41cc65346 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -3803,6 +3803,8 @@ LINPHONE_PUBLIC const char *linphone_core_get_user_certificates_path(LinphoneCor */ LINPHONE_PUBLIC LinphoneCall* linphone_core_find_call_from_uri(const LinphoneCore *lc, const char *uri); +typedef struct _LinphoneConference LinphoneConference; + LINPHONE_PUBLIC int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call); LINPHONE_PUBLIC int linphone_core_add_all_to_conference(LinphoneCore *lc); /** @@ -3835,6 +3837,7 @@ LINPHONE_PUBLIC int linphone_core_terminate_conference(LinphoneCore *lc); LINPHONE_PUBLIC int linphone_core_get_conference_size(LinphoneCore *lc); LINPHONE_PUBLIC int linphone_core_start_conference_recording(LinphoneCore *lc, const char *path); LINPHONE_PUBLIC int linphone_core_stop_conference_recording(LinphoneCore *lc); +LINPHONE_PUBLIC LinphoneConference *linphone_core_get_conference(LinphoneCore *lc); /** * Get the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer * @ingroup initializing