Commit b675b297 authored by François Grisez's avatar François Grisez

Do not automatically enter the conference when the 'Transport' implementation is used

parent 4e972721
......@@ -26,6 +26,7 @@
#include "private.h"
#include "conference.h"
#include <mediastreamer2/msvolume.h>
#include <typeinfo>
namespace Linphone {
class Conference {
......@@ -726,3 +727,11 @@ void linphone_conference_on_call_stream_stopping(LinphoneConference *obj, Linpho
void linphone_conference_on_call_terminating(LinphoneConference *obj, LinphoneCall *call) {
((Conference *)obj)->onCallTerminating(call);
}
bool_t linphone_conference_check_class(LinphoneConference *obj, LinphoneConferenceClass _class) {
switch(_class) {
case LinphoneConferenceClassMedia: return typeid(obj) == typeid(MediaConference);
case LinphoneConferenceClassTransport: return typeid(obj) == typeid(TransportConference);
default: return FALSE;
}
}
......@@ -30,6 +30,11 @@
typedef void LinphoneConference;
typedef enum {
LinphoneConferenceClassMedia,
LinphoneConferenceClassTransport
} LinphoneConferenceClass;
LinphoneConference *linphone_media_conference_new(LinphoneCore *core);
LinphoneConference *linphone_transport_conference_new(LinphoneCore *core);
void linphone_conference_free(LinphoneConference *obj);
......@@ -55,4 +60,6 @@ void linphone_conference_on_call_stream_starting(LinphoneConference *obj, Linpho
void linphone_conference_on_call_stream_stopping(LinphoneConference *obj, LinphoneCall *call);
void linphone_conference_on_call_terminating(LinphoneConference *obj, LinphoneCall *call);
bool_t linphone_conference_check_class(LinphoneConference *obj, LinphoneConferenceClass _class);
#endif // CONFERENCE_H
......@@ -7420,7 +7420,9 @@ int linphone_core_add_all_to_conference(LinphoneCore *lc) {
calls=calls->next;
linphone_core_add_to_conference(lc, call);
}
linphone_core_enter_conference(lc);
if(lc->conf_ctx && linphone_conference_check_class(lc->conf_ctx, LinphoneConferenceClassMedia)) {
linphone_core_enter_conference(lc);
}
return 0;
}
......
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