mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 21:58:08 +00:00
feat(Event): add conference event
This commit is contained in:
parent
3c51f52fa6
commit
0e37546ef3
3 changed files with 105 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
54
src/event/conference-event.cpp
Normal file
54
src/event/conference-event.cpp
Normal file
|
|
@ -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 <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
|
||||
49
src/event/conference-event.h
Normal file
49
src/event/conference-event.h
Normal file
|
|
@ -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 <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_
|
||||
Loading…
Add table
Reference in a new issue