From bb5b22b93259a20fd22e5539c77d5a5a9b44b31a Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 21 Nov 2017 10:43:20 +0100 Subject: [PATCH] Use IdentityAddress in conference. --- src/c-wrapper/api/c-chat-room.cpp | 6 ++- src/chat/chat-room/basic-chat-room.cpp | 10 ++--- src/chat/chat-room/basic-chat-room.h | 8 ++-- src/chat/chat-room/client-group-chat-room-p.h | 2 +- src/chat/chat-room/client-group-chat-room.cpp | 38 +++++++++---------- src/chat/chat-room/client-group-chat-room.h | 14 +++---- src/chat/chat-room/server-group-chat-room-p.h | 4 +- .../chat-room/server-group-chat-room-stub.cpp | 14 +++---- src/chat/chat-room/server-group-chat-room.h | 8 ++-- src/conference/conference-interface.h | 10 ++--- src/conference/conference-listener.h | 8 ++-- src/conference/conference-p.h | 4 +- src/conference/conference.cpp | 19 +++++----- src/conference/conference.h | 12 +++--- .../local-conference-event-handler.cpp | 24 ++++++------ src/conference/local-conference.cpp | 12 +++--- src/conference/local-conference.h | 6 +-- src/conference/participant-device.cpp | 2 +- src/conference/participant-device.h | 2 +- src/conference/participant-p.h | 2 - src/conference/participant.cpp | 19 +++------- src/conference/participant.h | 6 +-- src/conference/remote-conference.cpp | 16 ++++---- src/conference/remote-conference.h | 12 +++--- tester/conference-event-tester.cpp | 38 +++++++++---------- 25 files changed, 143 insertions(+), 153 deletions(-) diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp index e3014b4e4..9ea256016 100644 --- a/src/c-wrapper/api/c-chat-room.cpp +++ b/src/c-wrapper/api/c-chat-room.cpp @@ -234,7 +234,11 @@ void linphone_chat_room_add_participant (LinphoneChatRoom *cr, const LinphoneAdd } void linphone_chat_room_add_participants (LinphoneChatRoom *cr, const bctbx_list_t *addresses) { - L_GET_CPP_PTR_FROM_C_OBJECT(cr)->addParticipants(L_GET_RESOLVED_CPP_LIST_FROM_C_LIST(addresses, Address), nullptr, false); + list lAddr = L_GET_RESOLVED_CPP_LIST_FROM_C_LIST(addresses, Address); + list lIdentAddr; + for (const auto &addr : lAddr) + lIdentAddr.push_back(LinphonePrivate::IdentityAddress(addr)); + L_GET_CPP_PTR_FROM_C_OBJECT(cr)->addParticipants(lIdentAddr, nullptr, false); } bool_t linphone_chat_room_can_handle_participants (const LinphoneChatRoom *cr) { diff --git a/src/chat/chat-room/basic-chat-room.cpp b/src/chat/chat-room/basic-chat-room.cpp index a02a58657..42bfa4459 100644 --- a/src/chat/chat-room/basic-chat-room.cpp +++ b/src/chat/chat-room/basic-chat-room.cpp @@ -46,16 +46,16 @@ bool BasicChatRoom::canHandleParticipants () const { return false; } -const Address &BasicChatRoom::getConferenceAddress () const { +const IdentityAddress &BasicChatRoom::getConferenceAddress () const { lError() << "a BasicChatRoom does not have a conference address"; - return Utils::getEmptyConstRefObject
(); + return Utils::getEmptyConstRefObject(); } -void BasicChatRoom::addParticipant (const Address &, const CallSessionParams *, bool) { +void BasicChatRoom::addParticipant (const IdentityAddress &, const CallSessionParams *, bool) { lError() << "addParticipant() is not allowed on a BasicChatRoom"; } -void BasicChatRoom::addParticipants (const list
&, const CallSessionParams *, bool) { +void BasicChatRoom::addParticipants (const list &, const CallSessionParams *, bool) { lError() << "addParticipants() is not allowed on a BasicChatRoom"; } @@ -67,7 +67,7 @@ void BasicChatRoom::removeParticipants (const list> &) { lError() << "removeParticipants() is not allowed on a BasicChatRoom"; } -shared_ptr BasicChatRoom::findParticipant (const Address &) const { +shared_ptr BasicChatRoom::findParticipant (const IdentityAddress &) const { lError() << "findParticipant() is not allowed on a BasicChatRoom"; return nullptr; } diff --git a/src/chat/chat-room/basic-chat-room.h b/src/chat/chat-room/basic-chat-room.h index 21268e29d..a234eee30 100644 --- a/src/chat/chat-room/basic-chat-room.h +++ b/src/chat/chat-room/basic-chat-room.h @@ -34,17 +34,17 @@ class LINPHONE_PUBLIC BasicChatRoom : public ChatRoom { public: CapabilitiesMask getCapabilities () const override; - const Address &getConferenceAddress () const override; + const IdentityAddress &getConferenceAddress () const override; bool canHandleParticipants () const override; - void addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) override; - void addParticipants (const std::list
&addresses, const CallSessionParams *params, bool hasMedia) override; + void addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) override; + void addParticipants (const std::list &addresses, const CallSessionParams *params, bool hasMedia) override; void removeParticipant (const std::shared_ptr &participant) override; void removeParticipants (const std::list> &participants) override; - std::shared_ptr findParticipant (const Address &addr) const override; + std::shared_ptr findParticipant (const IdentityAddress &addr) const override; std::shared_ptr getMe () const override; int getNbParticipants () const override; diff --git a/src/chat/chat-room/client-group-chat-room-p.h b/src/chat/chat-room/client-group-chat-room-p.h index 6a8871cd5..82366fef3 100644 --- a/src/chat/chat-room/client-group-chat-room-p.h +++ b/src/chat/chat-room/client-group-chat-room-p.h @@ -31,7 +31,7 @@ class ClientGroupChatRoomPrivate : public ChatRoomPrivate { public: ClientGroupChatRoomPrivate () = default; - std::list
cleanAddressesList (const std::list
&addresses) const; + std::list cleanAddressesList (const std::list &addresses) const; std::shared_ptr createSession (); void notifyReceived (const std::string &body); void multipartNotifyReceived (const std::string &body); diff --git a/src/chat/chat-room/client-group-chat-room.cpp b/src/chat/chat-room/client-group-chat-room.cpp index 0661a4627..996ece990 100644 --- a/src/chat/chat-room/client-group-chat-room.cpp +++ b/src/chat/chat-room/client-group-chat-room.cpp @@ -39,13 +39,13 @@ LINPHONE_BEGIN_NAMESPACE // ----------------------------------------------------------------------------- -list
ClientGroupChatRoomPrivate::cleanAddressesList (const list
&addresses) const { +list ClientGroupChatRoomPrivate::cleanAddressesList (const list &addresses) const { L_Q(); - list
cleanedList(addresses); + list cleanedList(addresses); cleanedList.sort(); cleanedList.unique(); for (auto it = cleanedList.begin(); it != cleanedList.end();) { - if (q->findParticipant(*it) || (q->getMe()->getAddress() == IdentityAddress(*it))) + if (q->findParticipant(*it) || (q->getMe()->getAddress() == *it)) it = cleanedList.erase(it); else it++; @@ -64,7 +64,7 @@ shared_ptr ClientGroupChatRoomPrivate::createSession () { shared_ptr focus = qConference->getPrivate()->focus; shared_ptr session = focus->getPrivate()->createSession(*q, &csp, false, q); const Address &myAddress = q->getMe()->getAddress(); - session->configure(LinphoneCallOutgoing, nullptr, nullptr, myAddress, focus->getContactAddress()); + session->configure(LinphoneCallOutgoing, nullptr, nullptr, myAddress, focus->getAddress()); session->initiateOutgoing(); return session; } @@ -105,25 +105,25 @@ bool ClientGroupChatRoom::canHandleParticipants () const { return RemoteConference::canHandleParticipants(); } -const Address &ClientGroupChatRoom::getConferenceAddress () const { +const IdentityAddress &ClientGroupChatRoom::getConferenceAddress () const { return RemoteConference::getConferenceAddress(); } -void ClientGroupChatRoom::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) { - list
addresses; +void ClientGroupChatRoom::addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) { + list addresses; addresses.push_back(addr); addParticipants(addresses, params, hasMedia); } void ClientGroupChatRoom::addParticipants ( - const list
&addresses, + const list &addresses, const CallSessionParams *params, bool hasMedia ) { L_D(); L_D_T(RemoteConference, dConference); - list
addressesList = d->cleanAddressesList(addresses); + list addressesList = d->cleanAddressesList(addresses); if (addressesList.empty()) return; @@ -166,7 +166,7 @@ void ClientGroupChatRoom::removeParticipants (const list RemoteConference::removeParticipants(participants); } -shared_ptr ClientGroupChatRoom::findParticipant (const Address &addr) const { +shared_ptr ClientGroupChatRoom::findParticipant (const IdentityAddress &addr) const { return RemoteConference::findParticipant(addr); } @@ -264,7 +264,7 @@ void ClientGroupChatRoom::leave () { void ClientGroupChatRoom::onChatMessageReceived (const shared_ptr &msg) {} -void ClientGroupChatRoom::onConferenceCreated (const Address &addr) { +void ClientGroupChatRoom::onConferenceCreated (const IdentityAddress &addr) { L_D(); L_D_T(RemoteConference, dConference); dConference->conferenceAddress = addr; @@ -272,14 +272,14 @@ void ClientGroupChatRoom::onConferenceCreated (const Address &addr) { getCore()->getPrivate()->insertChatRoom(getSharedFromThis()); } -void ClientGroupChatRoom::onConferenceTerminated (const Address &addr) { +void ClientGroupChatRoom::onConferenceTerminated (const IdentityAddress &addr) { L_D(); L_D_T(RemoteConference, dConference); dConference->eventHandler->resetLastNotify(); d->setState(ChatRoom::State::Terminated); } -void ClientGroupChatRoom::onFirstNotifyReceived (const Address &addr) { +void ClientGroupChatRoom::onFirstNotifyReceived (const IdentityAddress &addr) { L_D(); d->setState(ChatRoom::State::Created); getCore()->getPrivate()->insertChatRoomWithDb(getSharedFromThis()); @@ -288,7 +288,7 @@ void ClientGroupChatRoom::onFirstNotifyReceived (const Address &addr) { void ClientGroupChatRoom::onParticipantAdded (const shared_ptr &event, bool isFullState) { L_D_T(RemoteConference, dConference); - const Address &addr = event->getParticipantAddress(); + const IdentityAddress &addr = event->getParticipantAddress(); if (isMe(addr)) return; @@ -318,7 +318,7 @@ void ClientGroupChatRoom::onParticipantRemoved (const shared_ptrgetParticipantAddress(); + const IdentityAddress &addr = event->getParticipantAddress(); shared_ptr participant = findParticipant(addr); if (!participant) { lWarning() << "Participant " << addr.asString() << " removed but not in the list of participants!"; @@ -337,7 +337,7 @@ void ClientGroupChatRoom::onParticipantRemoved (const shared_ptr &event, bool isFullState) { - const Address &addr = event->getParticipantAddress(); + const IdentityAddress &addr = event->getParticipantAddress(); shared_ptr participant; if (isMe(addr)) participant = getMe(); @@ -383,7 +383,7 @@ void ClientGroupChatRoom::onSubjectChanged (const shared_ptr &event, bool isFullState) { - const Address &addr = event->getParticipantAddress(); + const IdentityAddress &addr = event->getParticipantAddress(); shared_ptr participant; if (isMe(addr)) participant = getMe(); @@ -410,7 +410,7 @@ void ClientGroupChatRoom::onParticipantDeviceAdded (const shared_ptr &event, bool isFullState) { (void)isFullState; - const Address &addr = event->getParticipantAddress(); + const IdentityAddress &addr = event->getParticipantAddress(); shared_ptr participant; if (isMe(addr)) participant = getMe(); @@ -450,7 +450,7 @@ void ClientGroupChatRoom::onCallSessionStateChanged ( if (state == LinphoneCallConnected) { if (d->state == ChatRoom::State::CreationPending) { - Address addr(session->getRemoteContactAddress()->asStringUriOnly()); + IdentityAddress addr(session->getRemoteContactAddress()->asStringUriOnly()); onConferenceCreated(addr); if (session->getRemoteContactAddress()->hasParam("isfocus")) dConference->eventHandler->subscribe(getChatRoomId()); diff --git a/src/chat/chat-room/client-group-chat-room.h b/src/chat/chat-room/client-group-chat-room.h index 3edaabb55..0702f59c9 100644 --- a/src/chat/chat-room/client-group-chat-room.h +++ b/src/chat/chat-room/client-group-chat-room.h @@ -43,17 +43,17 @@ public: CapabilitiesMask getCapabilities () const override; - const Address &getConferenceAddress () const override; + const IdentityAddress &getConferenceAddress () const override; bool canHandleParticipants () const override; - void addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) override; - void addParticipants (const std::list
&addresses, const CallSessionParams *params, bool hasMedia) override; + void addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) override; + void addParticipants (const std::list &addresses, const CallSessionParams *params, bool hasMedia) override; void removeParticipant (const std::shared_ptr &participant) override; void removeParticipants (const std::list> &participants) override; - std::shared_ptr findParticipant (const Address &addr) const override; + std::shared_ptr findParticipant (const IdentityAddress &addr) const override; std::shared_ptr getMe () const override; int getNbParticipants () const override; @@ -73,9 +73,9 @@ private: void onChatMessageReceived (const std::shared_ptr &msg) override; - void onConferenceCreated (const Address &addr) override; - void onConferenceTerminated (const Address &addr) override; - void onFirstNotifyReceived (const Address &addr) override; + void onConferenceCreated (const IdentityAddress &addr) override; + void onConferenceTerminated (const IdentityAddress &addr) override; + void onFirstNotifyReceived (const IdentityAddress &addr) override; void onParticipantAdded (const std::shared_ptr &event, bool isFullState) override; void onParticipantRemoved (const std::shared_ptr &event, bool isFullState) override; void onParticipantSetAdmin (const std::shared_ptr &event, bool isFullState) override; diff --git a/src/chat/chat-room/server-group-chat-room-p.h b/src/chat/chat-room/server-group-chat-room-p.h index 9a8b18c17..b2a945e0d 100644 --- a/src/chat/chat-room/server-group-chat-room-p.h +++ b/src/chat/chat-room/server-group-chat-room-p.h @@ -37,7 +37,7 @@ class ServerGroupChatRoomPrivate : public ChatRoomPrivate { public: ServerGroupChatRoomPrivate () = default; - std::shared_ptr addParticipant (const Address &addr); + std::shared_ptr addParticipant (const IdentityAddress &addr); void confirmCreation (); void confirmJoining (SalCallOp *op); std::shared_ptr findRemovedParticipant (const std::shared_ptr &session) const; @@ -46,7 +46,7 @@ public: void subscribeReceived (LinphoneEvent *event); void update (SalCallOp *op); - void dispatchMessage (const Address &fromAddr, const Content &content); + void dispatchMessage (const IdentityAddress &fromAddr, const Content &content); void storeOrUpdateMessage (const std::shared_ptr &msg) override; LinphoneReason messageReceived (SalOp *op, const SalMessage *msg) override; void setConferenceAddress (const IdentityAddress &confAddr); diff --git a/src/chat/chat-room/server-group-chat-room-stub.cpp b/src/chat/chat-room/server-group-chat-room-stub.cpp index 97e694bc3..6ad6d6d73 100644 --- a/src/chat/chat-room/server-group-chat-room-stub.cpp +++ b/src/chat/chat-room/server-group-chat-room-stub.cpp @@ -29,7 +29,7 @@ LINPHONE_BEGIN_NAMESPACE // ----------------------------------------------------------------------------- -shared_ptr ServerGroupChatRoomPrivate::addParticipant (const Address &) { +shared_ptr ServerGroupChatRoomPrivate::addParticipant (const IdentityAddress &) { return nullptr; } @@ -55,7 +55,7 @@ void ServerGroupChatRoomPrivate::update (SalCallOp *) {} // ----------------------------------------------------------------------------- -void ServerGroupChatRoomPrivate::dispatchMessage (const Address &, const Content &) {} +void ServerGroupChatRoomPrivate::dispatchMessage (const IdentityAddress &, const Content &) {} void ServerGroupChatRoomPrivate::storeOrUpdateMessage (const shared_ptr &) {} @@ -79,7 +79,7 @@ bool ServerGroupChatRoomPrivate::isAdminLeft () const { ServerGroupChatRoom::ServerGroupChatRoom (const shared_ptr &core, SalCallOp *op) : ChatRoom(*new ServerGroupChatRoomPrivate, core, ChatRoomId(IdentityAddress(op->get_to()), IdentityAddress(op->get_to()))), -LocalConference(core, Address(op->get_to()), nullptr) {} +LocalConference(core, IdentityAddress(op->get_to()), nullptr) {} int ServerGroupChatRoom::getCapabilities () const { return 0; @@ -89,11 +89,11 @@ bool ServerGroupChatRoom::canHandleParticipants () const { return false; } -void ServerGroupChatRoom::addParticipant (const Address &, const CallSessionParams *, bool) {} +void ServerGroupChatRoom::addParticipant (const IdentityAddress &, const CallSessionParams *, bool) {} -void ServerGroupChatRoom::addParticipants (const list
&, const CallSessionParams *, bool) {} +void ServerGroupChatRoom::addParticipants (const list &, const CallSessionParams *, bool) {} -const Address &ServerGroupChatRoom::getConferenceAddress () const { +const IdentityAddress &ServerGroupChatRoom::getConferenceAddress () const { return LocalConference::getConferenceAddress(); } @@ -101,7 +101,7 @@ void ServerGroupChatRoom::removeParticipant (const shared_ptr void ServerGroupChatRoom::removeParticipants (const list> &) {} -shared_ptr ServerGroupChatRoom::findParticipant (const Address &) const { +shared_ptr ServerGroupChatRoom::findParticipant (const IdentityAddress &) const { return nullptr; } diff --git a/src/chat/chat-room/server-group-chat-room.h b/src/chat/chat-room/server-group-chat-room.h index f57606722..c93e593de 100644 --- a/src/chat/chat-room/server-group-chat-room.h +++ b/src/chat/chat-room/server-group-chat-room.h @@ -41,17 +41,17 @@ public: CapabilitiesMask getCapabilities () const override; - const Address &getConferenceAddress () const override; + const IdentityAddress &getConferenceAddress () const override; bool canHandleParticipants () const override; - void addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) override; - void addParticipants (const std::list
&addresses, const CallSessionParams *params, bool hasMedia) override; + void addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) override; + void addParticipants (const std::list &addresses, const CallSessionParams *params, bool hasMedia) override; void removeParticipant (const std::shared_ptr &participant) override; void removeParticipants (const std::list> &participants) override; - std::shared_ptr findParticipant (const Address &addr) const override; + std::shared_ptr findParticipant (const IdentityAddress &addr) const override; std::shared_ptr getMe () const override; int getNbParticipants () const override; diff --git a/src/conference/conference-interface.h b/src/conference/conference-interface.h index 104d7dbbc..fd08fc0c3 100644 --- a/src/conference/conference-interface.h +++ b/src/conference/conference-interface.h @@ -29,7 +29,7 @@ LINPHONE_BEGIN_NAMESPACE -class Address; +class IdentityAddress; class CallSessionParams; class Participant; @@ -37,11 +37,11 @@ class LINPHONE_PUBLIC ConferenceInterface { public: virtual ~ConferenceInterface() = default; - virtual void addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) = 0; - virtual void addParticipants (const std::list
&addresses, const CallSessionParams *params, bool hasMedia) = 0; + virtual void addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) = 0; + virtual void addParticipants (const std::list &addresses, const CallSessionParams *params, bool hasMedia) = 0; virtual bool canHandleParticipants () const = 0; - virtual std::shared_ptr findParticipant (const Address &addr) const = 0; - virtual const Address &getConferenceAddress () const = 0; + virtual std::shared_ptr findParticipant (const IdentityAddress &addr) const = 0; + virtual const IdentityAddress &getConferenceAddress () const = 0; virtual std::shared_ptr getMe () const = 0; virtual int getNbParticipants () const = 0; virtual std::list> getParticipants () const = 0; diff --git a/src/conference/conference-listener.h b/src/conference/conference-listener.h index b4946cd9d..e6e6ab402 100644 --- a/src/conference/conference-listener.h +++ b/src/conference/conference-listener.h @@ -31,13 +31,13 @@ LINPHONE_BEGIN_NAMESPACE -class Address; +class IdentityAddress; class ConferenceListener { public: - virtual void onConferenceCreated (const Address &addr) = 0; - virtual void onConferenceTerminated (const Address &addr) = 0; - virtual void onFirstNotifyReceived (const Address &addr) = 0; + virtual void onConferenceCreated (const IdentityAddress &addr) = 0; + virtual void onConferenceTerminated (const IdentityAddress &addr) = 0; + virtual void onFirstNotifyReceived (const IdentityAddress &addr) = 0; virtual void onParticipantAdded (const std::shared_ptr &event, bool isFullState) = 0; virtual void onParticipantRemoved (const std::shared_ptr &event, bool isFullState) = 0; virtual void onParticipantSetAdmin (const std::shared_ptr &event, bool isFullState) = 0; diff --git a/src/conference/conference-p.h b/src/conference/conference-p.h index f036e6da0..1a163cf34 100644 --- a/src/conference/conference-p.h +++ b/src/conference/conference-p.h @@ -20,7 +20,7 @@ #ifndef _CONFERENCE_P_H_ #define _CONFERENCE_P_H_ -#include "address/address.h" +#include "address/identity-address.h" #include "conference.h" // ============================================================================= @@ -32,7 +32,7 @@ class Participant; class ConferencePrivate { public: - Address conferenceAddress; + IdentityAddress conferenceAddress; std::list> participants; protected: diff --git a/src/conference/conference.cpp b/src/conference/conference.cpp index bb7cd4e67..8ea32bedc 100644 --- a/src/conference/conference.cpp +++ b/src/conference/conference.cpp @@ -32,7 +32,7 @@ LINPHONE_BEGIN_NAMESPACE Conference::Conference ( ConferencePrivate &p, const shared_ptr &core, - const Address &myAddress, + const IdentityAddress &myAddress, CallListener *listener ) : CoreAccessor(core), mPrivate(&p) { L_D(); @@ -54,12 +54,12 @@ shared_ptr Conference::getActiveParticipant () const { // ----------------------------------------------------------------------------- -void Conference::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) { +void Conference::addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) { lError() << "Conference class does not handle addParticipant() generically"; } -void Conference::addParticipants (const list
&addresses, const CallSessionParams *params, bool hasMedia) { - list
sortedAddresses(addresses); +void Conference::addParticipants (const list &addresses, const CallSessionParams *params, bool hasMedia) { + list sortedAddresses(addresses); sortedAddresses.sort(); sortedAddresses.unique(); for (const auto &addr: sortedAddresses) { @@ -73,7 +73,7 @@ bool Conference::canHandleParticipants () const { return true; } -const Address &Conference::getConferenceAddress () const { +const IdentityAddress &Conference::getConferenceAddress () const { L_D(); return d->conferenceAddress; } @@ -208,12 +208,13 @@ void Conference::onResetFirstVideoFrameDecoded (const shared_ptr Conference::findParticipant (const Address &addr) const { +shared_ptr Conference::findParticipant (const IdentityAddress &addr) const { L_D(); - IdentityAddress simpleAddr(addr); + IdentityAddress searchedAddr(addr); + searchedAddr.setGruu(""); for (const auto &participant : d->participants) { - if (participant->getAddress() == simpleAddr) + if (participant->getAddress() == searchedAddr) return participant; } @@ -231,7 +232,7 @@ shared_ptr Conference::findParticipant (const shared_ptrme->getAddress() == simpleAddr; diff --git a/src/conference/conference.h b/src/conference/conference.h index d89536343..f7a723cd4 100644 --- a/src/conference/conference.h +++ b/src/conference/conference.h @@ -48,11 +48,11 @@ public: std::shared_ptr findParticipant (const std::shared_ptr &session) const; /* ConferenceInterface */ - void addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) override; - void addParticipants (const std::list
&addresses, const CallSessionParams *params, bool hasMedia) override; + void addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) override; + void addParticipants (const std::list &addresses, const CallSessionParams *params, bool hasMedia) override; bool canHandleParticipants () const override; - std::shared_ptr findParticipant (const Address &addr) const override; - const Address &getConferenceAddress () const override; + std::shared_ptr findParticipant (const IdentityAddress &addr) const override; + const IdentityAddress &getConferenceAddress () const override; std::shared_ptr getMe () const override; int getNbParticipants () const override; std::list> getParticipants () const override; @@ -85,11 +85,11 @@ protected: explicit Conference ( ConferencePrivate &p, const std::shared_ptr &core, - const Address &myAddress, + const IdentityAddress &myAddress, CallListener *listener = nullptr ); - bool isMe (const Address &addr) const; + bool isMe (const IdentityAddress &addr) const; ConferencePrivate *mPrivate = nullptr; diff --git a/src/conference/handlers/local-conference-event-handler.cpp b/src/conference/handlers/local-conference-event-handler.cpp index 63a8633d2..6876e3d13 100644 --- a/src/conference/handlers/local-conference-event-handler.cpp +++ b/src/conference/handlers/local-conference-event-handler.cpp @@ -102,7 +102,7 @@ string LocalConferenceEventHandlerPrivate::createNotify (ConferenceType confInfo } string LocalConferenceEventHandlerPrivate::createNotifyFullState (int notifyId) { - string entity = conf->getConferenceAddress().asStringUriOnly(); + string entity = conf->getConferenceAddress().asString(); string subject = conf->getSubject(); ConferenceType confInfo = ConferenceType(entity); UsersType users; @@ -122,7 +122,7 @@ string LocalConferenceEventHandlerPrivate::createNotifyFullState (int notifyId) user.setState(StateType::full); for (const auto &device : participant->getPrivate()->getDevices()) { - const string &gruu = device->getGruu().asString(); + const string &gruu = device->getAddress().asString(); EndpointType endpoint = EndpointType(); endpoint.setEntity(gruu); endpoint.setState(StateType::full); @@ -224,7 +224,7 @@ string LocalConferenceEventHandlerPrivate::createNotifyMultipart (int notifyId) } string LocalConferenceEventHandlerPrivate::createNotifyParticipantAdded (const Address &addr, int notifyId) { - string entity = conf->getConferenceAddress().asStringUriOnly(); + string entity = conf->getConferenceAddress().asString(); ConferenceType confInfo = ConferenceType(entity); UsersType users; confInfo.setUsers(users); @@ -235,7 +235,7 @@ string LocalConferenceEventHandlerPrivate::createNotifyParticipantAdded (const A shared_ptr p = conf->findParticipant(addr); if (p) { for (const auto &device : p->getPrivate()->getDevices()) { - const string &gruu = device->getGruu().asString(); + const string &gruu = device->getAddress().asString(); EndpointType endpoint = EndpointType(); endpoint.setEntity(gruu); endpoint.setState(StateType::full); @@ -254,7 +254,7 @@ string LocalConferenceEventHandlerPrivate::createNotifyParticipantAdded (const A } string LocalConferenceEventHandlerPrivate::createNotifyParticipantRemoved (const Address &addr, int notifyId) { - string entity = conf->getConferenceAddress().asStringUriOnly(); + string entity = conf->getConferenceAddress().asString(); ConferenceType confInfo = ConferenceType(entity); UsersType users; confInfo.setUsers(users); @@ -268,7 +268,7 @@ string LocalConferenceEventHandlerPrivate::createNotifyParticipantRemoved (const } string LocalConferenceEventHandlerPrivate::createNotifyParticipantAdmined (const Address &addr, bool isAdmin, int notifyId) { - string entity = conf->getConferenceAddress().asStringUriOnly(); + string entity = conf->getConferenceAddress().asString(); ConferenceType confInfo = ConferenceType(entity); UsersType users; confInfo.setUsers(users); @@ -289,7 +289,7 @@ string LocalConferenceEventHandlerPrivate::createNotifySubjectChanged (int notif } string LocalConferenceEventHandlerPrivate::createNotifySubjectChanged (const string &subject, int notifyId) { - string entity = conf->getConferenceAddress().asStringUriOnly(); + string entity = conf->getConferenceAddress().asString(); ConferenceType confInfo = ConferenceType(entity); ConferenceDescriptionType confDescr = ConferenceDescriptionType(); confDescr.setSubject(subject); @@ -299,7 +299,7 @@ string LocalConferenceEventHandlerPrivate::createNotifySubjectChanged (const str } string LocalConferenceEventHandlerPrivate::createNotifyParticipantDeviceAdded (const Address &addr, const Address &gruu, int notifyId) { - string entity = conf->getConferenceAddress().asStringUriOnly(); + string entity = conf->getConferenceAddress().asString(); ConferenceType confInfo = ConferenceType(entity); UsersType users; confInfo.setUsers(users); @@ -323,7 +323,7 @@ string LocalConferenceEventHandlerPrivate::createNotifyParticipantDeviceAdded (c } string LocalConferenceEventHandlerPrivate::createNotifyParticipantDeviceRemoved (const Address &addr, const Address &gruu, int notifyId) { - string entity = conf->getConferenceAddress().asStringUriOnly(); + string entity = conf->getConferenceAddress().asString(); ConferenceType confInfo = ConferenceType(entity); UsersType users; confInfo.setUsers(users); @@ -383,16 +383,16 @@ void LocalConferenceEventHandler::subscribeReceived (LinphoneEvent *lev) { if (linphone_event_get_subscription_state(lev) == LinphoneSubscriptionActive) { unsigned int lastNotify = static_cast(Utils::stoi(linphone_event_get_custom_header(lev, "Last-Notify-Version"))); if (lastNotify == 0) { - lInfo() << "Sending initial notify of conference:" << d->conf->getConferenceAddress().asStringUriOnly() << " to: " << device->getGruu().asString(); + lInfo() << "Sending initial notify of conference:" << d->conf->getConferenceAddress().asString() << " to: " << device->getAddress().asString(); device->setConferenceSubscribeEvent(lev); d->notifyFullState(d->createNotifyFullState(), device); } else if (lastNotify < d->lastNotify) { - lInfo() << "Sending all missed notify for conference:" << d->conf->getConferenceAddress().asStringUriOnly() << + lInfo() << "Sending all missed notify for conference:" << d->conf->getConferenceAddress().asString() << " from: " << lastNotify << " to: " << participant->getAddress().asString(); d->notifyParticipantDevice(d->createNotifyMultipart(static_cast(lastNotify)), device); } else if (lastNotify > d->lastNotify) { lError() << "last notify received by client: [" << lastNotify <<"] for conference:" << - d->conf->getConferenceAddress().asStringUriOnly() << + d->conf->getConferenceAddress().asString() << " should not be higher than last notify sent by server: [" << d->lastNotify << "]"; } } else if (linphone_event_get_subscription_state(lev) == LinphoneSubscriptionTerminated) diff --git a/src/conference/local-conference.cpp b/src/conference/local-conference.cpp index f550bb59f..45c3707c5 100644 --- a/src/conference/local-conference.cpp +++ b/src/conference/local-conference.cpp @@ -28,7 +28,7 @@ using namespace std; LINPHONE_BEGIN_NAMESPACE -LocalConference::LocalConference (const shared_ptr &core, const Address &myAddress, CallListener *listener) +LocalConference::LocalConference (const shared_ptr &core, const IdentityAddress &myAddress, CallListener *listener) : Conference(*new LocalConferencePrivate, core, myAddress, listener) { L_D(); d->eventHandler.reset(new LocalConferenceEventHandler(this)); @@ -36,7 +36,7 @@ LocalConference::LocalConference (const shared_ptr &core, const Address &m // ----------------------------------------------------------------------------- -void LocalConference::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) { +void LocalConference::addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) { L_D(); shared_ptr participant = findParticipant(addr); if (participant) @@ -57,18 +57,16 @@ void LocalConference::removeParticipant (const shared_ptr &pa } } -list
LocalConference::parseResourceLists (const string &xmlBody) { +list LocalConference::parseResourceLists (const string &xmlBody) { istringstream data(xmlBody); unique_ptr rl = LinphonePrivate::Xsd::ResourceLists::parseResourceLists( data, Xsd::XmlSchema::Flags::dont_validate ); - list
addresses = list
(); + list addresses = list(); for (const auto &l : rl->getList()) { for (const auto &entry : l.getEntry()) { - Address addr(entry.getUri()); - if (entry.getDisplayName().present()) - addr.setDisplayName(entry.getDisplayName().get()); + IdentityAddress addr(entry.getUri()); addresses.push_back(addr); } } diff --git a/src/conference/local-conference.h b/src/conference/local-conference.h index 079acda7e..6948f3010 100644 --- a/src/conference/local-conference.h +++ b/src/conference/local-conference.h @@ -32,13 +32,13 @@ class LocalConference : public Conference { friend class ServerGroupChatRoomPrivate; public: - LocalConference (const std::shared_ptr &core, const Address &myAddress, CallListener *listener = nullptr); + LocalConference (const std::shared_ptr &core, const IdentityAddress &myAddress, CallListener *listener = nullptr); /* ConferenceInterface */ - void addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) override; + void addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) override; void removeParticipant (const std::shared_ptr &participant) override; - std::list
parseResourceLists (const std::string &xmlBody); + std::list parseResourceLists (const std::string &xmlBody); private: L_DECLARE_PRIVATE(LocalConference); diff --git a/src/conference/participant-device.cpp b/src/conference/participant-device.cpp index 9e4695218..d7e759484 100644 --- a/src/conference/participant-device.cpp +++ b/src/conference/participant-device.cpp @@ -39,7 +39,7 @@ ParticipantDevice::~ParticipantDevice () { } bool ParticipantDevice::operator== (const ParticipantDevice &device) const { - return (mGruu == device.getGruu()); + return (mGruu == device.getAddress()); } void ParticipantDevice::setConferenceSubscribeEvent (LinphoneEvent *ev) { diff --git a/src/conference/participant-device.h b/src/conference/participant-device.h index d466df80f..0190baa66 100644 --- a/src/conference/participant-device.h +++ b/src/conference/participant-device.h @@ -41,7 +41,7 @@ public: bool operator== (const ParticipantDevice &device) const; - inline const IdentityAddress &getGruu () const { return mGruu; } + inline const IdentityAddress &getAddress () const { return mGruu; } inline std::shared_ptr getSession () const { return mSession; } inline void setSession (std::shared_ptr session) { mSession = session; } diff --git a/src/conference/participant-p.h b/src/conference/participant-p.h index aa754c2af..1f5af8552 100644 --- a/src/conference/participant-p.h +++ b/src/conference/participant-p.h @@ -40,7 +40,6 @@ public: inline void removeSession () { session.reset(); } inline void setAddress (const IdentityAddress &newAddr) { addr = newAddr; } inline void setAdmin (bool isAdmin) { this->isAdmin = isAdmin; } - inline void setContactAddress (const Address &contactAddr) { this->contactAddr = contactAddr; } std::shared_ptr findDevice (const IdentityAddress &gruu) const; std::shared_ptr findDevice (const std::shared_ptr &session); const std::list> &getDevices () const; @@ -49,7 +48,6 @@ public: private: IdentityAddress addr; - Address contactAddr; bool isAdmin = false; std::shared_ptr session; std::list> devices; diff --git a/src/conference/participant.cpp b/src/conference/participant.cpp index 47aac4c06..d4f8b2746 100644 --- a/src/conference/participant.cpp +++ b/src/conference/participant.cpp @@ -47,7 +47,7 @@ shared_ptr ParticipantPrivate::createSession ( shared_ptr ParticipantPrivate::findDevice (const IdentityAddress &gruu) const { for (const auto &device : devices) { - if (device->getGruu() == gruu) + if (device->getAddress() == gruu) return device; } return nullptr; @@ -76,7 +76,7 @@ shared_ptr ParticipantPrivate::addDevice (const IdentityAddre void ParticipantPrivate::removeDevice (const IdentityAddress &gruu) { for (auto it = devices.begin(); it != devices.end(); it++) { - if ((*it)->getGruu() == gruu) { + if ((*it)->getAddress() == gruu) { devices.erase(it); return; } @@ -85,16 +85,14 @@ void ParticipantPrivate::removeDevice (const IdentityAddress &gruu) { // ============================================================================= -Participant::Participant (const Address &address) : Object(*new ParticipantPrivate) { +Participant::Participant (const IdentityAddress &address) : Object(*new ParticipantPrivate) { L_D(); - d->contactAddr = address; - d->addr = IdentityAddress(address); + d->addr = address; } -Participant::Participant (Address &&address) : Object(*new ParticipantPrivate) { +Participant::Participant (IdentityAddress &&address) : Object(*new ParticipantPrivate) { L_D(); - d->contactAddr = move(address); - d->addr = IdentityAddress(address); + d->addr = address; } // ----------------------------------------------------------------------------- @@ -104,11 +102,6 @@ const IdentityAddress& Participant::getAddress () const { return d->addr; } -const Address& Participant::getContactAddress () const { - L_D(); - return d->contactAddr; -} - // ----------------------------------------------------------------------------- bool Participant::isAdmin () const { diff --git a/src/conference/participant.h b/src/conference/participant.h index 9b1b3b482..00c0a687a 100644 --- a/src/conference/participant.h +++ b/src/conference/participant.h @@ -22,7 +22,6 @@ #include -#include "address/address.h" #include "address/identity-address.h" #include "object/object.h" #include "conference/params/call-session-params.h" @@ -50,11 +49,10 @@ class Participant : public Object { friend class ServerGroupChatRoomPrivate; public: - explicit Participant (const Address &address); - explicit Participant (Address &&address); + explicit Participant (const IdentityAddress &address); + explicit Participant (IdentityAddress &&address); const IdentityAddress& getAddress () const; - const Address& getContactAddress () const; bool isAdmin () const; private: diff --git a/src/conference/remote-conference.cpp b/src/conference/remote-conference.cpp index 603939bbf..eced72bde 100644 --- a/src/conference/remote-conference.cpp +++ b/src/conference/remote-conference.cpp @@ -30,7 +30,7 @@ LINPHONE_BEGIN_NAMESPACE RemoteConference::RemoteConference ( const shared_ptr &core, - const Address &myAddress, + const IdentityAddress &myAddress, CallListener *listener ) : Conference(*new RemoteConferencePrivate, core, myAddress, listener) { L_D(); @@ -44,7 +44,7 @@ RemoteConference::~RemoteConference () { // ----------------------------------------------------------------------------- -void RemoteConference::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) { +void RemoteConference::addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) { L_D(); shared_ptr participant = findParticipant(addr); if (participant) @@ -66,13 +66,11 @@ void RemoteConference::removeParticipant (const shared_ptr &p } } -string RemoteConference::getResourceLists (const list
&addresses) const { +string RemoteConference::getResourceLists (const list &addresses) const { Xsd::ResourceLists::ResourceLists rl = Xsd::ResourceLists::ResourceLists(); Xsd::ResourceLists::ListType l = Xsd::ResourceLists::ListType(); for (const auto &addr : addresses) { - Xsd::ResourceLists::EntryType entry = Xsd::ResourceLists::EntryType(addr.asStringUriOnly()); - if (!addr.getDisplayName().empty()) - entry.setDisplayName(Xsd::ResourceLists::DisplayName(addr.getDisplayName())); + Xsd::ResourceLists::EntryType entry = Xsd::ResourceLists::EntryType(addr.asString()); l.getEntry().push_back(entry); } rl.getList().push_back(l); @@ -85,14 +83,14 @@ string RemoteConference::getResourceLists (const list
&addresses) const // ----------------------------------------------------------------------------- -void RemoteConference::onConferenceCreated (const Address &addr) {} +void RemoteConference::onConferenceCreated (const IdentityAddress &addr) {} -void RemoteConference::onConferenceTerminated (const Address &addr) { +void RemoteConference::onConferenceTerminated (const IdentityAddress &addr) { L_D(); d->eventHandler->unsubscribe(); } -void RemoteConference::onFirstNotifyReceived (const Address &addr) {} +void RemoteConference::onFirstNotifyReceived (const IdentityAddress &addr) {} void RemoteConference::onParticipantAdded (const std::shared_ptr &event, bool isFullState) { (void)event; diff --git a/src/conference/remote-conference.h b/src/conference/remote-conference.h index fa85faeb6..13613c615 100644 --- a/src/conference/remote-conference.h +++ b/src/conference/remote-conference.h @@ -34,20 +34,20 @@ class LINPHONE_PUBLIC RemoteConference : public Conference, public ConferenceLis friend class ClientGroupChatRoomPrivate; public: - RemoteConference (const std::shared_ptr &core, const Address &myAddress, CallListener *listener = nullptr); + RemoteConference (const std::shared_ptr &core, const IdentityAddress &myAddress, CallListener *listener = nullptr); virtual ~RemoteConference(); /* ConferenceInterface */ - void addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) override; + void addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) override; void removeParticipant (const std::shared_ptr &participant) override; - std::string getResourceLists (const std::list
&addresses) const; + std::string getResourceLists (const std::list &addresses) const; protected: /* ConferenceListener */ - void onConferenceCreated (const Address &addr) override; - void onConferenceTerminated (const Address &addr) override; - void onFirstNotifyReceived (const Address &addr) override; + void onConferenceCreated (const IdentityAddress &addr) override; + void onConferenceTerminated (const IdentityAddress &addr) override; + void onFirstNotifyReceived (const IdentityAddress &addr) override; void onParticipantAdded (const std::shared_ptr &event, bool isFullState) override; void onParticipantRemoved (const std::shared_ptr &event, bool isFullState) override; void onParticipantSetAdmin (const std::shared_ptr &event, bool isFullState) override; diff --git a/tester/conference-event-tester.cpp b/tester/conference-event-tester.cpp index ff1ae2930..5cb142c5b 100644 --- a/tester/conference-event-tester.cpp +++ b/tester/conference-event-tester.cpp @@ -448,9 +448,9 @@ public: ~ConferenceEventTester (); private: - void onConferenceCreated (const Address &addr) override; - void onConferenceTerminated (const Address &addr) override; - void onFirstNotifyReceived (const Address &addr) override; + void onConferenceCreated (const IdentityAddress &addr) override; + void onConferenceTerminated (const IdentityAddress &addr) override; + void onFirstNotifyReceived (const IdentityAddress &addr) override; void onParticipantAdded (const shared_ptr &event, bool isFullState) override; void onParticipantRemoved (const shared_ptr &event, bool isFullState) override; void onParticipantSetAdmin (const shared_ptr &event, bool isFullState) override; @@ -473,28 +473,28 @@ ConferenceEventTester::~ConferenceEventTester () { delete handler; } -void ConferenceEventTester::onConferenceCreated (const Address &addr) {} +void ConferenceEventTester::onConferenceCreated (const IdentityAddress &addr) {} -void ConferenceEventTester::onConferenceTerminated (const Address &addr) {} +void ConferenceEventTester::onConferenceTerminated (const IdentityAddress &addr) {} -void ConferenceEventTester::onFirstNotifyReceived (const Address &addr) {} +void ConferenceEventTester::onFirstNotifyReceived (const IdentityAddress &addr) {} void ConferenceEventTester::onParticipantAdded (const shared_ptr &event, bool isFullState) { (void)isFullState; // unused - const Address addr = event->getParticipantAddress(); + const IdentityAddress addr = event->getParticipantAddress(); participants.insert(pair(addr.asString(), FALSE)); participantDevices.insert(pair(addr.asString(), 0)); } void ConferenceEventTester::onParticipantRemoved (const shared_ptr &event, bool isFullState) { (void)isFullState; // unused - const Address addr = event->getParticipantAddress(); + const IdentityAddress addr = event->getParticipantAddress(); participants.erase(addr.asString()); participantDevices.erase(addr.asString()); } void ConferenceEventTester::onParticipantSetAdmin (const shared_ptr &event, bool isFullState) { (void)isFullState; // unused - const Address addr = event->getParticipantAddress(); + const IdentityAddress addr = event->getParticipantAddress(); auto it = participants.find(addr.asString()); if (it != participants.end()) it->second = (event->getType() == EventLog::Type::ConferenceParticipantSetAdmin); @@ -507,7 +507,7 @@ void ConferenceEventTester::onSubjectChanged(const shared_ptr &event, bool isFullState) { (void)isFullState; // unused - const Address addr = event->getParticipantAddress(); + const IdentityAddress addr = event->getParticipantAddress(); auto it = participantDevices.find(addr.asString()); if (it != participantDevices.end()) it->second++; @@ -516,7 +516,7 @@ void ConferenceEventTester::onParticipantDeviceAdded (const shared_ptr &event, bool isFullState) { (void)isFullState; // unused - const Address addr = event->getParticipantAddress(); + const IdentityAddress addr = event->getParticipantAddress(); auto it = participantDevices.find(addr.asString()); if (it != participantDevices.end() && it->second > 0) it->second--; @@ -827,7 +827,7 @@ void send_first_notify() { LocalConferenceEventHandlerPrivate *localHandlerPrivate = L_GET_PRIVATE( L_ATTR_GET(L_GET_PRIVATE(localConf), eventHandler) ); - const_cast
(localConf.getConferenceAddress()) = addr; + const_cast(localConf.getConferenceAddress()) = addr; string notify = localHandlerPrivate->createNotifyFullState(); const_cast(tester.handler->getChatRoomId().getPeerAddress()) = addr; @@ -876,7 +876,7 @@ void send_added_notify() { LocalConferenceEventHandlerPrivate *localHandlerPrivate = L_GET_PRIVATE( L_ATTR_GET(L_GET_PRIVATE(localConf), eventHandler) ); - const_cast
(localConf.getConferenceAddress()) = addr; + const_cast(localConf.getConferenceAddress()) = addr; string notify = localHandlerPrivate->createNotifyFullState(); const_cast(tester.handler->getChatRoomId().getPeerAddress()) = addr; @@ -932,7 +932,7 @@ void send_removed_notify() { LocalConferenceEventHandlerPrivate *localHandlerPrivate = L_GET_PRIVATE( L_ATTR_GET(L_GET_PRIVATE(localConf), eventHandler) ); - const_cast
(localConf.getConferenceAddress()) = addr; + const_cast(localConf.getConferenceAddress()) = addr; string notify = localHandlerPrivate->createNotifyFullState(); const_cast(tester.handler->getChatRoomId().getPeerAddress()) = addr; @@ -985,7 +985,7 @@ void send_admined_notify() { LocalConferenceEventHandlerPrivate *localHandlerPrivate = L_GET_PRIVATE( L_ATTR_GET(L_GET_PRIVATE(localConf), eventHandler) ); - const_cast
(localConf.getConferenceAddress()) = addr; + const_cast(localConf.getConferenceAddress()) = addr; string notify = localHandlerPrivate->createNotifyFullState(); const_cast(tester.handler->getChatRoomId().getPeerAddress()) = addr; @@ -1037,7 +1037,7 @@ void send_unadmined_notify() { LocalConferenceEventHandlerPrivate *localHandlerPrivate = L_GET_PRIVATE( L_ATTR_GET(L_GET_PRIVATE(localConf), eventHandler) ); - const_cast
(localConf.getConferenceAddress()) = addr; + const_cast(localConf.getConferenceAddress()) = addr; string notify = localHandlerPrivate->createNotifyFullState(); const_cast(tester.handler->getChatRoomId().getPeerAddress()) = addr; @@ -1091,7 +1091,7 @@ void send_subject_changed_notify () { LocalConferenceEventHandlerPrivate *localHandlerPrivate = L_GET_PRIVATE( L_ATTR_GET(L_GET_PRIVATE(localConf), eventHandler) ); - const_cast
(localConf.getConferenceAddress()) = addr; + const_cast(localConf.getConferenceAddress()) = addr; string notify = localHandlerPrivate->createNotifyFullState(); const_cast(tester.handler->getChatRoomId().getPeerAddress()) = addr; @@ -1150,7 +1150,7 @@ void send_device_added_notify() { LocalConferenceEventHandlerPrivate *localHandlerPrivate = L_GET_PRIVATE( L_ATTR_GET(L_GET_PRIVATE(localConf), eventHandler) ); - const_cast
(localConf.getConferenceAddress()) = addr; + const_cast(localConf.getConferenceAddress()) = addr; string notify = localHandlerPrivate->createNotifyFullState(); const_cast(tester.handler->getChatRoomId().getPeerAddress()) = addr; @@ -1203,7 +1203,7 @@ void send_device_removed_notify() { LocalConferenceEventHandlerPrivate *localHandlerPrivate = L_GET_PRIVATE( L_ATTR_GET(L_GET_PRIVATE(localConf), eventHandler) ); - const_cast
(localConf.getConferenceAddress()) = addr; + const_cast(localConf.getConferenceAddress()) = addr; string notify = localHandlerPrivate->createNotifyFullState(); const_cast(tester.handler->getChatRoomId().getPeerAddress()) = addr;