diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 82a01ba77..aa481ec68 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,6 +39,7 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES db/provider/db-session.h enums.h event/call-event.h + event/conference-event.h event/event.h event/message-event.h logger/logger.h @@ -66,6 +67,7 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES db/provider/db-session-provider.cpp db/provider/db-session.cpp event/call-event.cpp + event/conference-event.cpp event/event.cpp event/message-event.cpp logger/logger.cpp diff --git a/src/event/conference-event.cpp b/src/event/conference-event.cpp new file mode 100644 index 000000000..9cd2e9d11 --- /dev/null +++ b/src/event/conference-event.cpp @@ -0,0 +1,54 @@ +/* + * conference-event.cpp + * Copyright (C) 2017 Belledonne Communications SARL + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "event-p.h" + +#include "conference-event.h" + +// ============================================================================= + +using namespace std; + +LINPHONE_BEGIN_NAMESPACE + +class ConferenceEventPrivate : public EventPrivate { +public: + shared_ptr
address; +}; + +// ----------------------------------------------------------------------------- + +ConferenceEvent::ConferenceEvent (Type type, const shared_ptr
&address) : Event(*new ConferenceEventPrivate, type) { + L_D(ConferenceEvent); + L_ASSERT(address); + d->address = address; +} + +ConferenceEvent::ConferenceEvent (const ConferenceEvent &src) : ConferenceEvent(src.getType(), src.getAddress()) {} + +ConferenceEvent &ConferenceEvent::operator= (const ConferenceEvent &src) { + L_D(ConferenceEvent); + if (this != &src) { + Event::operator=(src); + d->address = src.getPrivate()->address; + } + + return *this; +} + +LINPHONE_END_NAMESPACE diff --git a/src/event/conference-event.h b/src/event/conference-event.h new file mode 100644 index 000000000..c7e0d7803 --- /dev/null +++ b/src/event/conference-event.h @@ -0,0 +1,49 @@ +/* + * conference-event.h + * Copyright (C) 2017 Belledonne Communications SARL + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef _CONFERENCE_EVENT_H_ +#define _CONFERENCE_EVENT_H_ + +#include + +#include "event.h" + +// ============================================================================= + +LINPHONE_BEGIN_NAMESPACE + +class Address; +class Conference; +class ConferenceEventPrivate; + +class LINPHONE_PUBLIC ConferenceEvent : public Event { +public: + ConferenceEvent (Type type, const std::shared_ptr
&address); + ConferenceEvent (const ConferenceEvent &src); + + ConferenceEvent &operator= (const ConferenceEvent &src); + + std::shared_ptr
getAddress () const; + +private: + L_DECLARE_PRIVATE(ConferenceEvent); +}; + +LINPHONE_END_NAMESPACE + +#endif // ifndef _CONFERENCE_EVENT_H_