diff --git a/src/conference/handlers/local-conference-event-handler.cpp b/src/conference/handlers/local-conference-event-handler.cpp index 9847a93e9..a866c8c5f 100644 --- a/src/conference/handlers/local-conference-event-handler.cpp +++ b/src/conference/handlers/local-conference-event-handler.cpp @@ -524,4 +524,10 @@ void LocalConferenceEventHandler::setChatRoomId (const ChatRoomId &chatRoomId) { d->chatRoomId = chatRoomId; } +ChatRoomId LocalConferenceEventHandler::getChatRoomId () const { + L_D(); + return d->chatRoomId; +} + + LINPHONE_END_NAMESPACE diff --git a/src/conference/handlers/local-conference-event-handler.h b/src/conference/handlers/local-conference-event-handler.h index b44095f73..4912493f3 100644 --- a/src/conference/handlers/local-conference-event-handler.h +++ b/src/conference/handlers/local-conference-event-handler.h @@ -51,6 +51,7 @@ public: void setLastNotify (unsigned int lastNotify); void setChatRoomId (const ChatRoomId &chatRoomId); + ChatRoomId getChatRoomId () const; private: L_DECLARE_PRIVATE(LocalConferenceEventHandler); diff --git a/src/conference/handlers/local-conference-list-event-handler.cpp b/src/conference/handlers/local-conference-list-event-handler.cpp index 37869db0f..b3b4e38ee 100644 --- a/src/conference/handlers/local-conference-list-event-handler.cpp +++ b/src/conference/handlers/local-conference-list-event-handler.cpp @@ -16,7 +16,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* + +#include "local-conference-event-handler.h" #include "local-conference-list-event-handler.h" // ============================================================================= @@ -27,5 +28,32 @@ LINPHONE_BEGIN_NAMESPACE // ----------------------------------------------------------------------------- +void LocalConferenceListEventHandler::subscribeReceived (const string &xmlBody) { + +} + +void LocalConferenceListEventHandler::notify () { + +} + +// ----------------------------------------------------------------------------- + +void LocalConferenceListEventHandler::addHandler (shared_ptr handler) { + handlers.push_back(handler); +} + +shared_ptr LocalConferenceListEventHandler::findHandler (const ChatRoomId &chatRoomId) const { + for (const auto &handler : handlers) { + if (handler->getChatRoomId() == chatRoomId) + return handler; + } + + return nullptr; +} + +const list> &LocalConferenceListEventHandler::getHandlers () const { + return handlers; +} + LINPHONE_END_NAMESPACE -*/ + diff --git a/src/conference/handlers/local-conference-list-event-handler.h b/src/conference/handlers/local-conference-list-event-handler.h index 1da508dd7..3a5a46721 100644 --- a/src/conference/handlers/local-conference-list-event-handler.h +++ b/src/conference/handlers/local-conference-list-event-handler.h @@ -16,10 +16,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* + #ifndef _L_LOCAL_CONFERENCE_LIST_EVENT_HANDLER_H_ #define _L_LOCAL_CONFERENCE_LIST_EVENT_HANDLER_H_ +#include +#include + +#include "chat/chat-room/chat-room-id.h" #include "linphone/utils/general.h" // ============================================================================= @@ -28,11 +32,12 @@ LINPHONE_BEGIN_NAMESPACE class LocalConferenceEventHandler; -class LocalConferenceListEventHandler : public Object { +class LocalConferenceListEventHandler { public: - void subscribeReceived (); + void subscribeReceived (const std::string &xmlBody); void notify (); void addHandler (std::shared_ptr handler); + std::shared_ptr findHandler (const ChatRoomId &chatRoomId) const; const std::list> &getHandlers () const; private: @@ -43,4 +48,4 @@ private: LINPHONE_END_NAMESPACE #endif // ifndef _L_LOCAL_CONFERENCE_LIST_EVENT_HANDLER_H_ -*/ +