Commit 0e37546e authored by Ronan's avatar Ronan
Browse files

feat(Event): add conference event

parent 3c51f52f
......@@ -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
......
/*
* 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 <http://www.gnu.org/licenses/>.
*/
#include "event-p.h"
#include "conference-event.h"
// =============================================================================
using namespace std;
LINPHONE_BEGIN_NAMESPACE
class ConferenceEventPrivate : public EventPrivate {
public:
shared_ptr<Address> address;
};
// -----------------------------------------------------------------------------
ConferenceEvent::ConferenceEvent (Type type, const shared_ptr<Address> &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
/*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _CONFERENCE_EVENT_H_
#define _CONFERENCE_EVENT_H_
#include <memory>
#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> &address);
ConferenceEvent (const ConferenceEvent &src);
ConferenceEvent &operator= (const ConferenceEvent &src);
std::shared_ptr<Address> getAddress () const;
private:
L_DECLARE_PRIVATE(ConferenceEvent);
};
LINPHONE_END_NAMESPACE
#endif // ifndef _CONFERENCE_EVENT_H_
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment