Commit d0e48986 authored by Ghislain MARY's avatar Ghislain MARY

Rename and document conference factory uri API.

parent 437f4366
......@@ -124,7 +124,9 @@ LinphoneChatRoom *linphone_core_get_chat_room(LinphoneCore *lc, const LinphoneAd
}
LinphoneChatRoom * linphone_core_create_client_group_chat_room(LinphoneCore *lc) {
return linphone_client_group_chat_room_new(lc);
LinphoneChatRoom *cr = _linphone_client_group_chat_room_new(lc);
lc->chatrooms = bctbx_list_append(lc->chatrooms, cr);
return cr;
}
void linphone_core_delete_chat_room(LinphoneCore *lc, LinphoneChatRoom *cr) {
......
......@@ -7067,12 +7067,12 @@ LinphoneConference *linphone_core_get_conference(LinphoneCore *lc) {
return lc->conf_ctx;
}
void linphone_core_set_chat_conference_factory_uri(LinphoneCore *lc, const char *uri) {
lp_config_set_string(linphone_core_get_config(lc), "misc", "chat_conference_factory_uri", uri);
void linphone_core_set_conference_factory_uri(LinphoneCore *lc, const char *uri) {
lp_config_set_string(linphone_core_get_config(lc), "misc", "conference_factory_uri", uri);
}
const char * linphone_core_get_chat_conference_factory_uri(const LinphoneCore *lc) {
return lp_config_get_string(linphone_core_get_config(lc), "misc", "chat_conference_factory_uri", nullptr);
const char * linphone_core_get_conference_factory_uri(const LinphoneCore *lc) {
return lp_config_get_string(linphone_core_get_config(lc), "misc", "conference_factory_uri", nullptr);
}
void linphone_core_set_tls_cert(LinphoneCore *lc, const char *tls_cert) {
......
......@@ -460,7 +460,7 @@ void _linphone_proxy_config_release_ops(LinphoneProxyConfig *obj);
/*chat*/
LinphoneChatRoom * linphone_chat_room_new(LinphoneCore *core, const LinphoneAddress *addr);
LinphoneChatRoom * linphone_client_group_chat_room_new(LinphoneCore *lc);
LinphoneChatRoom *_linphone_client_group_chat_room_new(LinphoneCore *core);
void linphone_chat_room_release(LinphoneChatRoom *cr);
void linphone_chat_room_set_call(LinphoneChatRoom *cr, LinphoneCall *call);
bctbx_list_t * linphone_chat_room_get_transient_messages(const LinphoneChatRoom *cr);
......
......@@ -4169,9 +4169,19 @@ LINPHONE_PUBLIC LinphoneStatus linphone_core_stop_conference_recording(LinphoneC
*/
LINPHONE_PUBLIC LinphoneConference *linphone_core_get_conference(LinphoneCore *lc);
void linphone_core_set_chat_conference_factory_uri(LinphoneCore *lc, const char *uri);
/**
* Set the conference factory uri.
* @param[in] lc A #LinphoneCore object
* @param[in] uri The uri of the conference factory
*/
void linphone_core_set_conference_factory_uri(LinphoneCore *lc, const char *uri);
const char * linphone_core_get_chat_conference_factory_uri(const LinphoneCore *lc);
/**
* Get the conference factory uri.
* @param[in] lc A #LinphoneCore object
* @return The uri of the conference factory
*/
const char * linphone_core_get_conference_factory_uri(const LinphoneCore *lc);
/**
* @}
......
......@@ -278,8 +278,8 @@ LinphoneChatRoom *linphone_chat_room_new (LinphoneCore *core, const LinphoneAddr
return cr;
}
LinphoneChatRoom *linphone_client_group_chat_room_new (LinphoneCore *core) {
const char *factoryUri = linphone_core_get_chat_conference_factory_uri(core);
LinphoneChatRoom *_linphone_client_group_chat_room_new (LinphoneCore *core) {
const char *factoryUri = linphone_core_get_conference_factory_uri(core);
if (!factoryUri)
return nullptr;
LinphoneAddress *factoryAddr = linphone_address_new(factoryUri);
......
......@@ -33,7 +33,7 @@ ClientGroupChatRoomPrivate::ClientGroupChatRoomPrivate (LinphoneCore *core) : Ch
ClientGroupChatRoom::ClientGroupChatRoom (LinphoneCore *core, const Address &me)
: ChatRoom(*new ChatRoomPrivate(core)), RemoteConference(core, me, nullptr) {
string factoryUri = linphone_core_get_chat_conference_factory_uri(core);
string factoryUri = linphone_core_get_conference_factory_uri(core);
focus = make_shared<Participant>(factoryUri);
CallSessionParams csp;
shared_ptr<CallSession> session = focus->getPrivate()->createSession(*this, &csp, false, this);
......
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