Commit f9fc3e1a authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Change the state of the client group chat room to "created" when it has been created remotely.

parent 35f48398
......@@ -87,11 +87,13 @@ void ClientGroupChatRoom::removeParticipants (const list<shared_ptr<Participant>
// -----------------------------------------------------------------------------
void ClientGroupChatRoom::onConferenceCreated (const Address &addr) {
// TODO
L_D(ClientGroupChatRoom);
d->setState(ChatRoom::State::Created);
}
void ClientGroupChatRoom::onConferenceTerminated (const Address &addr) {
// TODO
L_D(ClientGroupChatRoom);
d->setState(ChatRoom::State::Terminated);
}
void ClientGroupChatRoom::onParticipantAdded (const Address &addr) {
......@@ -137,4 +139,13 @@ void ClientGroupChatRoom::onParticipantSetAdmin (const Address &addr, bool isAdm
cb(cr, L_GET_C_BACK_PTR(participant), isAdmin);
}
// -----------------------------------------------------------------------------
void ClientGroupChatRoom::onCallSessionStateChanged (const CallSession &session, LinphoneCallState state, const std::string &message) {
if (state == LinphoneCallConnected) {
// TODO: Get the conference ID instead of the remote address
onConferenceCreated(session.getRemoteAddress());
}
}
LINPHONE_END_NAMESPACE
......@@ -24,6 +24,7 @@
#include "chat/chat-room.h"
#include "conference/remote-conference.h"
#include "conference/session/call-session.h"
#include "linphone/types.h"
......@@ -57,6 +58,10 @@ private:
void onParticipantRemoved (const Address &addr) override;
void onParticipantSetAdmin (const Address &addr, bool isAdmin) override;
private:
/* CallSessionListener */
void onCallSessionStateChanged (const CallSession &session, LinphoneCallState state, const std::string &message) override;
private:
L_DECLARE_PRIVATE(ClientGroupChatRoom);
L_DISABLE_COPY(ClientGroupChatRoom);
......
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