Commit 53b9758d authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Handle conference listener in client group chat room and wrap participant...

Handle conference listener in client group chat room and wrap participant manipulation callbacks in LinphoneChatRoomCbs.
parent ceec68bc
...@@ -48,6 +48,28 @@ typedef void (*LinphoneChatRoomCbsIsComposingReceivedCb) (LinphoneChatRoom *cr, ...@@ -48,6 +48,28 @@ typedef void (*LinphoneChatRoomCbsIsComposingReceivedCb) (LinphoneChatRoom *cr,
*/ */
typedef void (*LinphoneChatRoomCbsMessageReceivedCb) (LinphoneChatRoom *cr, LinphoneChatMessage *msg); typedef void (*LinphoneChatRoomCbsMessageReceivedCb) (LinphoneChatRoom *cr, LinphoneChatMessage *msg);
/**
* Callback used to notify a chat room that a participant has been added.
* @param[in] cr #LinphoneChatRoom object
* @param[in] participant The #LinphoneParticipant that has been added to the chat room
*/
typedef void (*LinphoneChatRoomCbsParticipantAddedCb) (LinphoneChatRoom *cr, LinphoneParticipant *participant);
/**
* Callback used to notify a chat room that a participant has been removed.
* @param[in] cr #LinphoneChatRoom object
* @param[in] participant The #LinphoneParticipant that has been removed from the chat room
*/
typedef void (*LinphoneChatRoomCbsParticipantRemovedCb) (LinphoneChatRoom *cr, LinphoneParticipant *participant);
/**
* Callback used to notify a chat room that the admin status of a participant has been changed.
* @param[in] cr #LinphoneChatRoom object
* @param[in] participant The #LinphoneParticipant for which the admin status has been changed
* @param[in] isAdmin The new admin status of the participant
*/
typedef void (*LinphoneChatRoomCbsParticipantAdminStatusChangedCb) (LinphoneChatRoom *cr, LinphoneParticipant *participant, bool_t isAdmin);
/** /**
* Callback used to notify a chat room state has changed. * Callback used to notify a chat room state has changed.
* @param[in] cr #LinphoneChatRoom object * @param[in] cr #LinphoneChatRoom object
......
...@@ -88,6 +88,48 @@ LINPHONE_PUBLIC LinphoneChatRoomCbsMessageReceivedCb linphone_chat_room_cbs_get_ ...@@ -88,6 +88,48 @@ LINPHONE_PUBLIC LinphoneChatRoomCbsMessageReceivedCb linphone_chat_room_cbs_get_
*/ */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_message_received (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsMessageReceivedCb cb); LINPHONE_PUBLIC void linphone_chat_room_cbs_set_message_received (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsMessageReceivedCb cb);
/**
* Get the participant added callback.
* @param[in] cbs LinphoneChatRoomCbs object.
* @return The current participant added callback.
*/
LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantAddedCb linphone_chat_room_cbs_get_participant_added (const LinphoneChatRoomCbs *cbs);
/**
* Set the participant added callback.
* @param[in] cbs LinphoneChatRoomCbs object.
* @param[in] cb The participant added callback to be used.
*/
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_added (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantAddedCb cb);
/**
* Get the participant removed callback.
* @param[in] cbs LinphoneChatRoomCbs object.
* @return The current participant removed callback.
*/
LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantRemovedCb linphone_chat_room_cbs_get_participant_removed (const LinphoneChatRoomCbs *cbs);
/**
* Set the participant removed callback.
* @param[in] cbs LinphoneChatRoomCbs object.
* @param[in] cb The participant removed callback to be used.
*/
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_removed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantRemovedCb cb);
/**
* Get the participant admin status changed callback.
* @param[in] cbs LinphoneChatRoomCbs object.
* @return The current participant admin status changed callback.
*/
LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantAdminStatusChangedCb linphone_chat_room_cbs_get_participant_admin_status_changed (const LinphoneChatRoomCbs *cbs);
/**
* Set the participant admin status changed callback.
* @param[in] cbs LinphoneChatRoomCbs object.
* @param[in] cb The participant admin status changed callback to be used.
*/
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_admin_status_changed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb);
/** /**
* Get the state changed callback. * Get the state changed callback.
* @param[in] cbs LinphoneChatRoomCbs object. * @param[in] cbs LinphoneChatRoomCbs object.
......
...@@ -28,6 +28,9 @@ struct _LinphoneChatRoomCbs { ...@@ -28,6 +28,9 @@ struct _LinphoneChatRoomCbs {
void *userData; void *userData;
LinphoneChatRoomCbsIsComposingReceivedCb isComposingReceivedCb; LinphoneChatRoomCbsIsComposingReceivedCb isComposingReceivedCb;
LinphoneChatRoomCbsMessageReceivedCb messageReceivedCb; LinphoneChatRoomCbsMessageReceivedCb messageReceivedCb;
LinphoneChatRoomCbsParticipantAddedCb participantAddedCb;
LinphoneChatRoomCbsParticipantRemovedCb participantRemovedCb;
LinphoneChatRoomCbsParticipantAdminStatusChangedCb participantAdminStatusChangedCb;
LinphoneChatRoomCbsStateChangedCb stateChangedCb; LinphoneChatRoomCbsStateChangedCb stateChangedCb;
LinphoneChatRoomCbsUndecryptableMessageReceivedCb undecryptableMessageReceivedCb; LinphoneChatRoomCbsUndecryptableMessageReceivedCb undecryptableMessageReceivedCb;
}; };
...@@ -82,6 +85,30 @@ void linphone_chat_room_cbs_set_message_received (LinphoneChatRoomCbs *cbs, Linp ...@@ -82,6 +85,30 @@ void linphone_chat_room_cbs_set_message_received (LinphoneChatRoomCbs *cbs, Linp
cbs->messageReceivedCb = cb; cbs->messageReceivedCb = cb;
} }
LinphoneChatRoomCbsParticipantAddedCb linphone_chat_room_cbs_get_participant_added (const LinphoneChatRoomCbs *cbs) {
return cbs->participantAddedCb;
}
void linphone_chat_room_cbs_set_participant_added (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantAddedCb cb) {
cbs->participantAddedCb = cb;
}
LinphoneChatRoomCbsParticipantRemovedCb linphone_chat_room_cbs_get_participant_removed (const LinphoneChatRoomCbs *cbs) {
return cbs->participantRemovedCb;
}
void linphone_chat_room_cbs_set_participant_removed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantRemovedCb cb) {
cbs->participantRemovedCb = cb;
}
LinphoneChatRoomCbsParticipantAdminStatusChangedCb linphone_chat_room_cbs_get_participant_admin_status_changed (const LinphoneChatRoomCbs *cbs) {
return cbs->participantAdminStatusChangedCb;
}
void linphone_chat_room_cbs_set_participant_admin_status_changed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb) {
cbs->participantAdminStatusChangedCb = cb;
}
LinphoneChatRoomCbsStateChangedCb linphone_chat_room_cbs_get_state_changed (const LinphoneChatRoomCbs *cbs) { LinphoneChatRoomCbsStateChangedCb linphone_chat_room_cbs_get_state_changed (const LinphoneChatRoomCbs *cbs) {
return cbs->stateChangedCb; return cbs->stateChangedCb;
} }
......
...@@ -44,7 +44,7 @@ static void _linphone_chat_room_destructor (LinphoneChatRoom *cr); ...@@ -44,7 +44,7 @@ static void _linphone_chat_room_destructor (LinphoneChatRoom *cr);
L_DECLARE_C_STRUCT_IMPL_WITH_XTORS(ChatRoom, ChatRoom, chat_room, L_DECLARE_C_STRUCT_IMPL_WITH_XTORS(ChatRoom, ChatRoom, chat_room,
_linphone_chat_room_constructor, _linphone_chat_room_destructor, _linphone_chat_room_constructor, _linphone_chat_room_destructor,
LinphoneChatRoomCbs * cbs; LinphoneChatRoomCbs *cbs;
LinphoneAddress *peerAddressCache; LinphoneAddress *peerAddressCache;
) )
......
...@@ -17,11 +17,15 @@ ...@@ -17,11 +17,15 @@
*/ */
#include "client-group-chat-room-p.h" #include "client-group-chat-room-p.h"
#include "c-wrapper/c-tools.h"
#include "conference/participant-p.h" #include "conference/participant-p.h"
#include "logger/logger.h" #include "logger/logger.h"
// ============================================================================= // =============================================================================
extern LinphoneChatRoom * _linphone_chat_room_init();
extern LinphoneParticipant * _linphone_participant_init();
using namespace std; using namespace std;
LINPHONE_BEGIN_NAMESPACE LINPHONE_BEGIN_NAMESPACE
...@@ -79,4 +83,57 @@ void ClientGroupChatRoom::removeParticipants (const list<shared_ptr<Participant> ...@@ -79,4 +83,57 @@ void ClientGroupChatRoom::removeParticipants (const list<shared_ptr<Participant>
// TODO // TODO
} }
// -----------------------------------------------------------------------------
void ClientGroupChatRoom::onConferenceCreated (const Address &addr) {
// TODO
}
void ClientGroupChatRoom::onConferenceTerminated (const Address &addr) {
// TODO
}
void ClientGroupChatRoom::onParticipantAdded (const Address &addr) {
shared_ptr<Participant> participant = findParticipant(addr);
if (participant) {
lWarning() << "Participant " << participant << " added but already in the list of participants!";
return;
}
participant = make_shared<Participant>(addr);
participants.push_back(participant);
LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this->shared_from_this(), ChatRoom, chat_room);
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
LinphoneChatRoomCbsParticipantAddedCb cb = linphone_chat_room_cbs_get_participant_added(cbs);
if (cb)
cb(cr, L_GET_C_BACK_PTR(participant, Participant, participant));
}
void ClientGroupChatRoom::onParticipantRemoved (const Address &addr) {
shared_ptr<Participant> participant = findParticipant(addr);
if (!participant) {
lWarning() << "Participant " << participant << " removed but not in the list of participants!";
return;
}
LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this->shared_from_this(), ChatRoom, chat_room);
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
LinphoneChatRoomCbsParticipantRemovedCb cb = linphone_chat_room_cbs_get_participant_removed(cbs);
if (cb)
cb(cr, L_GET_C_BACK_PTR(participant, Participant, participant));
participants.remove(participant);
}
void ClientGroupChatRoom::onParticipantSetAdmin (const Address &addr, bool isAdmin) {
shared_ptr<Participant> participant = findParticipant(addr);
if (!participant) {
lWarning() << "Participant " << participant << " admin status has been changed but is not in the list of participants!";
return;
}
participant->setAdmin(isAdmin);
LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this->shared_from_this(), ChatRoom, chat_room);
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb = linphone_chat_room_cbs_get_participant_admin_status_changed(cbs);
if (cb)
cb(cr, L_GET_C_BACK_PTR(participant, Participant, participant), isAdmin);
}
LINPHONE_END_NAMESPACE LINPHONE_END_NAMESPACE
...@@ -49,6 +49,14 @@ public: ...@@ -49,6 +49,14 @@ public:
void removeParticipant (const std::shared_ptr<const Participant> &participant); void removeParticipant (const std::shared_ptr<const Participant> &participant);
void removeParticipants (const std::list<std::shared_ptr<Participant>> &participants); void removeParticipants (const std::list<std::shared_ptr<Participant>> &participants);
private:
/* ConferenceListener */
void onConferenceCreated (const Address &addr);
void onConferenceTerminated (const Address &addr);
void onParticipantAdded (const Address &addr);
void onParticipantRemoved (const Address &addr);
void onParticipantSetAdmin (const Address &addr, bool isAdmin);
private: private:
L_DECLARE_PRIVATE(ClientGroupChatRoom); L_DECLARE_PRIVATE(ClientGroupChatRoom);
L_DISABLE_COPY(ClientGroupChatRoom); L_DISABLE_COPY(ClientGroupChatRoom);
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "participant-p.h" #include "participant-p.h"
#include "conference.h" #include "conference.h"
#include "logger/logger.h"
using namespace std; using namespace std;
...@@ -40,13 +41,13 @@ shared_ptr<Participant> Conference::getActiveParticipant () const { ...@@ -40,13 +41,13 @@ shared_ptr<Participant> Conference::getActiveParticipant () const {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
shared_ptr<Participant> Conference::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) { shared_ptr<Participant> Conference::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) {
activeParticipant = make_shared<Participant>(addr); lError() << "Conference class does not handle addParticipant() generically";
activeParticipant->getPrivate()->createSession(*this, params, hasMedia, this); return nullptr;
return activeParticipant;
} }
void Conference::addParticipants (const list<Address> &addresses, const CallSessionParams *params, bool hasMedia) { void Conference::addParticipants (const list<Address> &addresses, const CallSessionParams *params, bool hasMedia) {
// TODO for (const auto &addr : addresses)
addParticipant(addr, params, hasMedia);
} }
bool Conference::canHandleParticipants () const { bool Conference::canHandleParticipants () const {
...@@ -58,8 +59,7 @@ const string& Conference::getId () const { ...@@ -58,8 +59,7 @@ const string& Conference::getId () const {
} }
int Conference::getNbParticipants () const { int Conference::getNbParticipants () const {
// TODO return participants.size();
return 1;
} }
list<shared_ptr<Participant>> Conference::getParticipants () const { list<shared_ptr<Participant>> Conference::getParticipants () const {
...@@ -67,11 +67,12 @@ list<shared_ptr<Participant>> Conference::getParticipants () const { ...@@ -67,11 +67,12 @@ list<shared_ptr<Participant>> Conference::getParticipants () const {
} }
void Conference::removeParticipant (const shared_ptr<const Participant> &participant) { void Conference::removeParticipant (const shared_ptr<const Participant> &participant) {
// TODO lError() << "Conference class does not handle removeParticipant() generically";
} }
void Conference::removeParticipants (const list<shared_ptr<Participant>> &participants) { void Conference::removeParticipants (const list<shared_ptr<Participant>> &participants) {
// TODO for (const auto &p : participants)
removeParticipant(p);
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
...@@ -24,9 +24,10 @@ ...@@ -24,9 +24,10 @@
#include "private.h" #include "private.h"
// =============================================================================
using namespace std; using namespace std;
using namespace conference_info; using namespace conference_info;
using namespace LinphonePrivate;
LINPHONE_BEGIN_NAMESPACE LINPHONE_BEGIN_NAMESPACE
...@@ -39,7 +40,7 @@ public: ...@@ -39,7 +40,7 @@ public:
LocalConference *conf = nullptr; LocalConference *conf = nullptr;
}; };
LINPHONE_END_NAMESPACE // -----------------------------------------------------------------------------
void LocalConferenceEventHandlerPrivate::notifyFullState(string notify, LinphoneEvent *lev) { void LocalConferenceEventHandlerPrivate::notifyFullState(string notify, LinphoneEvent *lev) {
LinphoneContent *content = linphone_core_create_content(lev->lc); LinphoneContent *content = linphone_core_create_content(lev->lc);
...@@ -64,7 +65,8 @@ void LocalConferenceEventHandlerPrivate::notifyAllExcept(string notify, const Ad ...@@ -64,7 +65,8 @@ void LocalConferenceEventHandlerPrivate::notifyAllExcept(string notify, const Ad
} }
} }
// -------- Conference::LocalConferenceEventHandler public methods --------- // =============================================================================
LocalConferenceEventHandler::LocalConferenceEventHandler(LinphoneCore *core, LocalConference *localConf) : Object(*new LocalConferenceEventHandlerPrivate) { LocalConferenceEventHandler::LocalConferenceEventHandler(LinphoneCore *core, LocalConference *localConf) : Object(*new LocalConferenceEventHandlerPrivate) {
L_D(LocalConferenceEventHandler); L_D(LocalConferenceEventHandler);
xercesc::XMLPlatformUtils::Initialize(); xercesc::XMLPlatformUtils::Initialize();
...@@ -76,6 +78,8 @@ LocalConferenceEventHandler::~LocalConferenceEventHandler() { ...@@ -76,6 +78,8 @@ LocalConferenceEventHandler::~LocalConferenceEventHandler() {
xercesc::XMLPlatformUtils::Terminate(); xercesc::XMLPlatformUtils::Terminate();
} }
// -----------------------------------------------------------------------------
string LocalConferenceEventHandler::subscribeReceived(LinphoneEvent *lev) { string LocalConferenceEventHandler::subscribeReceived(LinphoneEvent *lev) {
L_D(LocalConferenceEventHandler); L_D(LocalConferenceEventHandler);
string entity = d->conf->getMe()->getAddress().asStringUriOnly(); string entity = d->conf->getMe()->getAddress().asStringUriOnly();
...@@ -163,3 +167,5 @@ string LocalConferenceEventHandler::notifyParticipantSetAdmin(const Address &add ...@@ -163,3 +167,5 @@ string LocalConferenceEventHandler::notifyParticipantSetAdmin(const Address &add
//d->notifyAllExcept(notify.str(), addr); //d->notifyAllExcept(notify.str(), addr);
return notify.str(); return notify.str();
} }
LINPHONE_END_NAMESPACE
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
#include "participant-p.h" #include "participant-p.h"
using namespace std; using namespace std;
using namespace LinphonePrivate;
LINPHONE_BEGIN_NAMESPACE
// ============================================================================= // =============================================================================
...@@ -42,32 +43,11 @@ shared_ptr<Participant> LocalConference::addParticipant (const Address &addr, co ...@@ -42,32 +43,11 @@ shared_ptr<Participant> LocalConference::addParticipant (const Address &addr, co
participant = make_shared<Participant>(addr); participant = make_shared<Participant>(addr);
participant->getPrivate()->createSession(*this, params, hasMedia, this); participant->getPrivate()->createSession(*this, params, hasMedia, this);
participants.push_back(participant); participants.push_back(participant);
activeParticipant = participant; if (!activeParticipant)
activeParticipant = participant;
return participant; return participant;
} }
void LocalConference::addParticipants (const list<Address> &addresses, const CallSessionParams *params, bool hasMedia) {
for (const auto &addr : addresses)
addParticipant(addr, params, hasMedia);
}
bool LocalConference::canHandleParticipants () const {
return true;
}
const string& LocalConference::getId () const {
return id;
}
int LocalConference::getNbParticipants () const {
participants.size();
return 1;
}
list<shared_ptr<Participant>> LocalConference::getParticipants () const {
return participants;
}
void LocalConference::removeParticipant (const shared_ptr<const Participant> &participant) { void LocalConference::removeParticipant (const shared_ptr<const Participant> &participant) {
for (const auto &p : participants) { for (const auto &p : participants) {
if (participant->getAddress().equal(p->getAddress())) { if (participant->getAddress().equal(p->getAddress())) {
...@@ -77,7 +57,4 @@ void LocalConference::removeParticipant (const shared_ptr<const Participant> &pa ...@@ -77,7 +57,4 @@ void LocalConference::removeParticipant (const shared_ptr<const Participant> &pa
} }
} }
void LocalConference::removeParticipants (const list<shared_ptr<Participant>> &participants) { LINPHONE_END_NAMESPACE
for (const auto &p : participants)
removeParticipant(p);
}
...@@ -36,13 +36,7 @@ public: ...@@ -36,13 +36,7 @@ public:
public: public:
/* ConferenceInterface */ /* ConferenceInterface */
virtual std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia); virtual std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia);
virtual void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia);
virtual bool canHandleParticipants () const;
virtual const std::string& getId () const;
virtual int getNbParticipants () const;
virtual std::list<std::shared_ptr<Participant>> getParticipants () const;
virtual void removeParticipant (const std::shared_ptr<const Participant> &participant); virtual void removeParticipant (const std::shared_ptr<const Participant> &participant);
virtual void removeParticipants (const std::list<std::shared_ptr<Participant>> &participants);
private: private:
L_DISABLE_COPY(LocalConference); L_DISABLE_COPY(LocalConference);
......
...@@ -68,4 +68,10 @@ void Participant::setAdmin (bool isAdmin) { ...@@ -68,4 +68,10 @@ void Participant::setAdmin (bool isAdmin) {
d->isAdmin = isAdmin; d->isAdmin = isAdmin;
} }
// =============================================================================
ostream & operator<< (ostream &strm, const shared_ptr<Participant> &participant) {
return strm << "'" << participant->getAddress().asString() << "'";
}
LINPHONE_END_NAMESPACE LINPHONE_END_NAMESPACE
...@@ -35,9 +35,9 @@ class Participant : public Object { ...@@ -35,9 +35,9 @@ class Participant : public Object {
friend class Call; friend class Call;
friend class CallPrivate; friend class CallPrivate;
friend class ClientGroupChatRoom; friend class ClientGroupChatRoom;
friend class Conference;
friend class LocalConference; friend class LocalConference;
friend class MediaSessionPrivate; friend class MediaSessionPrivate;
friend class RemoteConference;
public: public:
Participant (const Address &addr); Participant (const Address &addr);
...@@ -52,6 +52,8 @@ private: ...@@ -52,6 +52,8 @@ private:
L_DISABLE_COPY(Participant); L_DISABLE_COPY(Participant);
}; };
std::ostream & operator<< (std::ostream &strm, const std::shared_ptr<Participant> &participant);
LINPHONE_END_NAMESPACE LINPHONE_END_NAMESPACE
#endif // ifndef _PARTICIPANT_H_ #endif // ifndef _PARTICIPANT_H_
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
#include "private.h" #include "private.h"
#include "object/object-p.h" #include "object/object-p.h"
// =============================================================================
using namespace std; using namespace std;
using namespace conference_info; using namespace conference_info;
using namespace LinphonePrivate;
LINPHONE_BEGIN_NAMESPACE LINPHONE_BEGIN_NAMESPACE
...@@ -36,15 +37,14 @@ public: ...@@ -36,15 +37,14 @@ public:
LinphoneEvent *lev = nullptr; LinphoneEvent *lev = nullptr;
}; };
LINPHONE_END_NAMESPACE // =============================================================================
// -------- RemoteConferenceEventHandler public methods --------- RemoteConferenceEventHandler::RemoteConferenceEventHandler(LinphoneCore *core, ConferenceListener *listener)
RemoteConferenceEventHandler::RemoteConferenceEventHandler(LinphoneCore *core, ConferenceListener *listener, const Address &confAddr) : Object(*new RemoteConferenceEventHandlerPrivate) { : Object(*new RemoteConferenceEventHandlerPrivate) {
L_D(RemoteConferenceEventHandler); L_D(RemoteConferenceEventHandler);
xercesc::XMLPlatformUtils::Initialize(); xercesc::XMLPlatformUtils::Initialize();
d->core = core; d->core = core;
d->listener = listener; d->listener = listener;
d->confAddr = confAddr;
} }
RemoteConferenceEventHandler::~RemoteConferenceEventHandler() { RemoteConferenceEventHandler::~RemoteConferenceEventHandler() {
...@@ -54,6 +54,8 @@ RemoteConferenceEventHandler::~RemoteConferenceEventHandler() { ...@@ -54,6 +54,8 @@ RemoteConferenceEventHandler::~RemoteConferenceEventHandler() {
linphone_event_unref(d->lev); linphone_event_unref(d->lev);
} }
// -----------------------------------------------------------------------------
void RemoteConferenceEventHandler::subscribe(string confId) { void RemoteConferenceEventHandler::subscribe(string confId) {
L_D(RemoteConferenceEventHandler); L_D(RemoteConferenceEventHandler);
d->confId = confId; d->confId = confId;
...@@ -101,7 +103,16 @@ void RemoteConferenceEventHandler::notifyReceived(string xmlBody) { ...@@ -101,7 +103,16 @@ void RemoteConferenceEventHandler::notifyReceived(string xmlBody) {
} }
} }
// -----------------------------------------------------------------------------
string RemoteConferenceEventHandler::getConfId() { string RemoteConferenceEventHandler::getConfId() {
L_D(RemoteConferenceEventHandler);