mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
feat(Events): add a ConferenceSubjectEvent
This commit is contained in:
parent
22c6e1c482
commit
894391c13b
11 changed files with 128 additions and 19 deletions
|
|
@ -34,6 +34,7 @@
|
|||
F(ConferenceParticipantSetAdmin) \
|
||||
F(ConferenceParticipantUnsetAdmin) \
|
||||
F(ConferenceParticipantDeviceAdded) \
|
||||
F(ConferenceParticipantDeviceRemoved)
|
||||
F(ConferenceParticipantDeviceRemoved) \
|
||||
F(ConferenceSubjectChanged)
|
||||
|
||||
#endif // ifndef _EVENT_LOG_ENUMS_H_
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
|
|||
event-log/conference-participant-device-event.h
|
||||
event-log/conference-participant-event-p.h
|
||||
event-log/conference-participant-event.h
|
||||
event-log/conference-subject-event.h
|
||||
event-log/event-log-p.h
|
||||
event-log/event-log.h
|
||||
hacks/hacks.h
|
||||
|
|
@ -174,6 +175,7 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
|
|||
event-log/conference-event.cpp
|
||||
event-log/conference-participant-device-event.cpp
|
||||
event-log/conference-participant-event.cpp
|
||||
event-log/conference-subject-event.cpp
|
||||
event-log/event-log.cpp
|
||||
hacks/hacks.cpp
|
||||
logger/logger.cpp
|
||||
|
|
|
|||
|
|
@ -455,6 +455,7 @@ MainDb::MainDb () : AbstractDb(*new MainDbPrivate) {}
|
|||
case EventLog::Type::ConferenceParticipantUnsetAdmin:
|
||||
case EventLog::Type::ConferenceParticipantDeviceAdded:
|
||||
case EventLog::Type::ConferenceParticipantDeviceRemoved:
|
||||
case EventLog::Type::ConferenceSubjectChanged:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
|
||||
class ConferenceEventPrivate : public EventLogPrivate {
|
||||
private:
|
||||
Address address;
|
||||
Address conferenceAddress;
|
||||
|
||||
L_DECLARE_PUBLIC(ConferenceEvent);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,34 +26,35 @@ using namespace std;
|
|||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
ConferenceEvent::ConferenceEvent (Type type, const Address &address) :
|
||||
ConferenceEvent::ConferenceEvent (Type type, const Address &conferenceAddress) :
|
||||
EventLog(*new ConferenceEventPrivate, type) {
|
||||
L_D();
|
||||
L_ASSERT(type == Type::ConferenceCreated || type == Type::ConferenceDestroyed);
|
||||
d->address = address;
|
||||
d->conferenceAddress = conferenceAddress;
|
||||
}
|
||||
|
||||
ConferenceEvent::ConferenceEvent (const ConferenceEvent &src) : ConferenceEvent(src.getType(), src.getAddress()) {}
|
||||
ConferenceEvent::ConferenceEvent (const ConferenceEvent &src) :
|
||||
ConferenceEvent(src.getType(), src.getConferenceAddress()) {}
|
||||
|
||||
ConferenceEvent::ConferenceEvent (ConferenceEventPrivate &p, Type type, const Address &address) :
|
||||
ConferenceEvent::ConferenceEvent (ConferenceEventPrivate &p, Type type, const Address &conferenceAddress) :
|
||||
EventLog(p, type) {
|
||||
L_D();
|
||||
d->address = address;
|
||||
}
|
||||
L_D();
|
||||
d->conferenceAddress = conferenceAddress;
|
||||
}
|
||||
|
||||
ConferenceEvent &ConferenceEvent::operator= (const ConferenceEvent &src) {
|
||||
L_D();
|
||||
if (this != &src) {
|
||||
EventLog::operator=(src);
|
||||
d->address = src.getPrivate()->address;
|
||||
d->conferenceAddress = src.getPrivate()->conferenceAddress;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
const Address &ConferenceEvent::getAddress () const {
|
||||
const Address &ConferenceEvent::getConferenceAddress () const {
|
||||
L_D();
|
||||
return d->address;
|
||||
return d->conferenceAddress;
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -31,16 +31,15 @@ class ConferenceEventPrivate;
|
|||
|
||||
class LINPHONE_PUBLIC ConferenceEvent : public EventLog {
|
||||
public:
|
||||
ConferenceEvent (Type type, const Address &address);
|
||||
ConferenceEvent (Type type, const Address &conferenceAddress);
|
||||
ConferenceEvent (const ConferenceEvent &src);
|
||||
virtual ~ConferenceEvent () = default;
|
||||
|
||||
ConferenceEvent &operator= (const ConferenceEvent &src);
|
||||
|
||||
const Address &getAddress () const;
|
||||
const Address &getConferenceAddress () const;
|
||||
|
||||
protected:
|
||||
ConferenceEvent (ConferenceEventPrivate &p, Type type, const Address &address);
|
||||
ConferenceEvent (ConferenceEventPrivate &p, Type type, const Address &conferenceAddress);
|
||||
|
||||
private:
|
||||
L_DECLARE_PRIVATE(ConferenceEvent);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ ConferenceParticipantDeviceEvent::ConferenceParticipantDeviceEvent (
|
|||
ConferenceParticipantDeviceEvent::ConferenceParticipantDeviceEvent (const ConferenceParticipantDeviceEvent &src) :
|
||||
ConferenceParticipantDeviceEvent(
|
||||
src.getType(),
|
||||
src.getAddress(),
|
||||
src.getConferenceAddress(),
|
||||
src.getParticipantAddress(),
|
||||
src.getGruuAddress()
|
||||
) {}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ ConferenceParticipantEvent::ConferenceParticipantEvent (
|
|||
}
|
||||
|
||||
ConferenceParticipantEvent::ConferenceParticipantEvent (const ConferenceParticipantEvent &src) :
|
||||
ConferenceParticipantEvent(src.getType(), src.getAddress(), src.getParticipantAddress()) {}
|
||||
ConferenceParticipantEvent(src.getType(), src.getConferenceAddress(), src.getParticipantAddress()) {}
|
||||
|
||||
ConferenceParticipantEvent::ConferenceParticipantEvent (
|
||||
ConferenceParticipantEventPrivate &p,
|
||||
|
|
|
|||
60
src/event-log/conference-subject-event.cpp
Normal file
60
src/event-log/conference-subject-event.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* conference-subject-event.cpp
|
||||
* Copyright (C) 2010-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 2
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "conference-event-p.h"
|
||||
#include "conference-subject-event.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
using namespace std;
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class ConferenceSubjectEventPrivate : public ConferenceEventPrivate {
|
||||
public:
|
||||
string subject;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
ConferenceSubjectEvent::ConferenceSubjectEvent (const Address &address, const string &subject) :
|
||||
ConferenceEvent(*new ConferenceSubjectEventPrivate, Type::ConferenceSubjectChanged, address) {
|
||||
L_D();
|
||||
d->subject = subject;
|
||||
}
|
||||
|
||||
ConferenceSubjectEvent::ConferenceSubjectEvent (const ConferenceSubjectEvent &src) :
|
||||
ConferenceSubjectEvent(src.getConferenceAddress(), src.getSubject()) {}
|
||||
|
||||
ConferenceSubjectEvent &ConferenceSubjectEvent::operator= (const ConferenceSubjectEvent &src) {
|
||||
L_D();
|
||||
if (this != &src) {
|
||||
ConferenceEvent::operator=(src);
|
||||
d->subject = src.getPrivate()->subject;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
const string &ConferenceSubjectEvent::getSubject () const {
|
||||
L_D();
|
||||
return d->subject;
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
46
src/event-log/conference-subject-event.h
Normal file
46
src/event-log/conference-subject-event.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* conference-subject-event.h
|
||||
* Copyright (C) 2010-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 2
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _CONFERENCE_SUBJECT_EVENT_H_
|
||||
#define _CONFERENCE_SUBJECT_EVENT_H_
|
||||
|
||||
#include "conference-event.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class ConferenceSubjectEventPrivate;
|
||||
|
||||
class LINPHONE_PUBLIC ConferenceSubjectEvent : public ConferenceEvent {
|
||||
public:
|
||||
ConferenceSubjectEvent (const Address &conferenceAddress, const std::string &subject);
|
||||
ConferenceSubjectEvent (const ConferenceSubjectEvent &src);
|
||||
|
||||
ConferenceSubjectEvent &operator= (const ConferenceSubjectEvent &src);
|
||||
|
||||
const std::string &getSubject () const;
|
||||
|
||||
private:
|
||||
L_DECLARE_PRIVATE(ConferenceSubjectEvent);
|
||||
};
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
||||
#endif // ifndef _CONFERENCE_SUBJECT_EVENT_H_
|
||||
|
|
@ -39,7 +39,6 @@ public:
|
|||
|
||||
EventLog ();
|
||||
EventLog (const EventLog &src);
|
||||
virtual ~EventLog () = default;
|
||||
|
||||
EventLog &operator= (const EventLog &src);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue