forked from mirrors/linphone-iphone
feat(EventLog): add new ConferenceParticipantDevice event
This commit is contained in:
parent
bf1d1d4e75
commit
4ee2312949
9 changed files with 198 additions and 10 deletions
|
|
@ -32,6 +32,8 @@
|
|||
F(ConferenceParticipantAdded) \
|
||||
F(ConferenceParticipantRemoved) \
|
||||
F(ConferenceParticipantSetAdmin) \
|
||||
F(ConferenceParticipantUnsetAdmin)
|
||||
F(ConferenceParticipantUnsetAdmin) \
|
||||
F(ConferenceParticipantDeviceAdded) \
|
||||
F(ConferenceParticipantDeviceRemoved)
|
||||
|
||||
#endif // ifndef _EVENT_LOG_ENUMS_H_
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
|
|||
event-log/chat-message-event.h
|
||||
event-log/conference-event-p.h
|
||||
event-log/conference-event.h
|
||||
event-log/conference-participant-device-event.h
|
||||
event-log/conference-participant-event-p.h
|
||||
event-log/conference-participant-event.h
|
||||
event-log/event-log-p.h
|
||||
event-log/event-log.h
|
||||
|
|
@ -170,6 +172,7 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
|
|||
event-log/call-event.cpp
|
||||
event-log/chat-message-event.cpp
|
||||
event-log/conference-event.cpp
|
||||
event-log/conference-participant-device-event.cpp
|
||||
event-log/conference-participant-event.cpp
|
||||
event-log/event-log.cpp
|
||||
hacks/hacks.cpp
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public:
|
|||
std::list<std::shared_ptr<ChatMessage>> messages;
|
||||
std::list<std::shared_ptr<ChatMessage>> transientMessages;
|
||||
std::list<std::weak_ptr<ChatMessage>> weakMessages;
|
||||
std::shared_ptr<ChatMessage> pendingMessage = nullptr;
|
||||
std::shared_ptr<ChatMessage> pendingMessage;
|
||||
IsComposing isComposingHandler;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -453,6 +453,8 @@ MainDb::MainDb () : AbstractDb(*new MainDbPrivate) {}
|
|||
case EventLog::Type::ConferenceParticipantRemoved:
|
||||
case EventLog::Type::ConferenceParticipantSetAdmin:
|
||||
case EventLog::Type::ConferenceParticipantUnsetAdmin:
|
||||
case EventLog::Type::ConferenceParticipantDeviceAdded:
|
||||
case EventLog::Type::ConferenceParticipantDeviceRemoved:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
80
src/event-log/conference-participant-device-event.cpp
Normal file
80
src/event-log/conference-participant-device-event.cpp
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* conference-participant-device-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-participant-device-event.h"
|
||||
#include "conference-participant-event-p.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
using namespace std;
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class ConferenceParticipantDeviceEventPrivate : public ConferenceParticipantEventPrivate {
|
||||
public:
|
||||
Address gruuAddress;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
ConferenceParticipantDeviceEvent::ConferenceParticipantDeviceEvent (
|
||||
Type type,
|
||||
const Address &conferenceAddress,
|
||||
const Address &participantAddress,
|
||||
const Address &gruuAddress
|
||||
) : ConferenceParticipantEvent(
|
||||
*new ConferenceParticipantDeviceEventPrivate,
|
||||
type,
|
||||
conferenceAddress,
|
||||
participantAddress
|
||||
) {
|
||||
L_D();
|
||||
L_ASSERT(
|
||||
type == Type::ConferenceParticipantDeviceAdded ||
|
||||
type == Type::ConferenceParticipantDeviceRemoved
|
||||
);
|
||||
d->gruuAddress = gruuAddress;
|
||||
}
|
||||
|
||||
ConferenceParticipantDeviceEvent::ConferenceParticipantDeviceEvent (const ConferenceParticipantDeviceEvent &src) :
|
||||
ConferenceParticipantDeviceEvent(
|
||||
src.getType(),
|
||||
src.getAddress(),
|
||||
src.getParticipantAddress(),
|
||||
src.getGruuAddress()
|
||||
) {}
|
||||
|
||||
ConferenceParticipantDeviceEvent &ConferenceParticipantDeviceEvent::operator= (
|
||||
const ConferenceParticipantDeviceEvent &src
|
||||
) {
|
||||
L_D();
|
||||
if (this != &src) {
|
||||
ConferenceParticipantEvent::operator=(src);
|
||||
d->gruuAddress = src.getPrivate()->gruuAddress;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
const Address &ConferenceParticipantDeviceEvent::getGruuAddress () const {
|
||||
L_D();
|
||||
return d->gruuAddress;
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
51
src/event-log/conference-participant-device-event.h
Normal file
51
src/event-log/conference-participant-device-event.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* conference-participant-device-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_PARTICIPANT_DEVICE_EVENT_H_
|
||||
#define _CONFERENCE_PARTICIPANT_DEVICE_EVENT_H_
|
||||
|
||||
#include "conference-participant-event.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class ConferenceParticipantDeviceEventPrivate;
|
||||
|
||||
class LINPHONE_PUBLIC ConferenceParticipantDeviceEvent : public ConferenceParticipantEvent {
|
||||
public:
|
||||
ConferenceParticipantDeviceEvent (
|
||||
Type type,
|
||||
const Address &conferenceAddress,
|
||||
const Address &participantAddress,
|
||||
const Address &gruuAddress
|
||||
);
|
||||
ConferenceParticipantDeviceEvent (const ConferenceParticipantDeviceEvent &src);
|
||||
|
||||
ConferenceParticipantDeviceEvent &operator= (const ConferenceParticipantDeviceEvent &src);
|
||||
|
||||
const Address &getGruuAddress () const;
|
||||
|
||||
private:
|
||||
L_DECLARE_PRIVATE(ConferenceParticipantDeviceEvent);
|
||||
};
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
||||
#endif // ifndef _CONFERENCE_PARTICIPANT_DEVICE_EVENT_H_
|
||||
39
src/event-log/conference-participant-event-p.h
Normal file
39
src/event-log/conference-participant-event-p.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* conference-participant-event-p.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_PARTICIPANT_EVENT_P_H_
|
||||
#define _CONFERENCE_PARTICIPANT_EVENT_P_H_
|
||||
|
||||
#include "conference-event-p.h"
|
||||
#include "conference-participant-event.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class ConferenceParticipantEventPrivate : public ConferenceEventPrivate {
|
||||
private:
|
||||
Address participantAddress;
|
||||
|
||||
L_DECLARE_PUBLIC(ConferenceParticipantEvent);
|
||||
};
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
||||
#endif // ifndef _CONFERENCE_PARTICIPANT_EVENT_P_H_
|
||||
|
|
@ -17,9 +17,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "address/address.h"
|
||||
#include "conference-event-p.h"
|
||||
#include "conference-participant-event.h"
|
||||
#include "conference-participant-event-p.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
|
|
@ -27,11 +25,6 @@ using namespace std;
|
|||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class ConferenceParticipantEventPrivate : public ConferenceEventPrivate {
|
||||
public:
|
||||
Address participantAddress;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
ConferenceParticipantEvent::ConferenceParticipantEvent (
|
||||
|
|
@ -52,6 +45,16 @@ ConferenceParticipantEvent::ConferenceParticipantEvent (
|
|||
ConferenceParticipantEvent::ConferenceParticipantEvent (const ConferenceParticipantEvent &src) :
|
||||
ConferenceParticipantEvent(src.getType(), src.getAddress(), src.getParticipantAddress()) {}
|
||||
|
||||
ConferenceParticipantEvent::ConferenceParticipantEvent (
|
||||
ConferenceParticipantEventPrivate &p,
|
||||
Type type,
|
||||
const Address &conferenceAddress,
|
||||
const Address &participantAddress
|
||||
) : ConferenceEvent(p, type, conferenceAddress) {
|
||||
L_D();
|
||||
d->participantAddress = participantAddress;
|
||||
}
|
||||
|
||||
ConferenceParticipantEvent &ConferenceParticipantEvent::operator= (const ConferenceParticipantEvent &src) {
|
||||
L_D();
|
||||
if (this != &src) {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,14 @@ public:
|
|||
|
||||
const Address &getParticipantAddress () const;
|
||||
|
||||
protected:
|
||||
ConferenceParticipantEvent (
|
||||
ConferenceParticipantEventPrivate &p,
|
||||
Type type,
|
||||
const Address &conferenceAddress,
|
||||
const Address &participantAddress
|
||||
);
|
||||
|
||||
private:
|
||||
L_DECLARE_PRIVATE(ConferenceParticipantEvent);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue