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

This commit is contained in:
Ghislain MARY 2017-09-25 14:11:31 +02:00
parent 35f48398f4
commit f9fc3e1a81
2 changed files with 18 additions and 2 deletions

View file

@ -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

View file

@ -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);