mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
Do not store nor notify app for full state generated events
This commit is contained in:
parent
dfbf8e031e
commit
fe01419470
19 changed files with 147 additions and 133 deletions
|
|
@ -83,13 +83,6 @@ LINPHONE_PUBLIC const LinphoneAddress *linphone_event_log_get_conference_address
|
|||
*/
|
||||
LINPHONE_PUBLIC unsigned int linphone_event_log_get_notify_id (const LinphoneEventLog *event_log);
|
||||
|
||||
/**
|
||||
* Returns whether or not the event comes from a full state notify.
|
||||
* @param[in] event_log A #LinphoneEventLog object.
|
||||
* @return whether or not the event comes from a full state notify.
|
||||
*/
|
||||
LINPHONE_PUBLIC bool_t linphone_event_log_is_full_state (const LinphoneEventLog *event_log);
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// ConferenceCallEvent.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -193,15 +193,6 @@ unsigned int linphone_event_log_get_notify_id (const LinphoneEventLog *event_log
|
|||
)->getNotifyId();
|
||||
}
|
||||
|
||||
bool_t linphone_event_log_is_full_state (const LinphoneEventLog *event_log) {
|
||||
if (!isConferenceNotifiedType(linphone_event_log_get_type(event_log)))
|
||||
return FALSE;
|
||||
|
||||
return static_pointer_cast<const LinphonePrivate::ConferenceNotifiedEvent>(
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(event_log)
|
||||
)->isFullState();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// ConferenceCallEvent.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ void ClientGroupChatRoom::onConferenceTerminated (const Address &addr) {
|
|||
d->setState(ChatRoom::State::Terminated);
|
||||
}
|
||||
|
||||
void ClientGroupChatRoom::onParticipantAdded (shared_ptr<ConferenceParticipantEvent> event) {
|
||||
void ClientGroupChatRoom::onParticipantAdded (const shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) {
|
||||
L_D_T(RemoteConference, dConference);
|
||||
|
||||
const Address &addr = event->getParticipantAddress();
|
||||
|
|
@ -278,6 +278,10 @@ void ClientGroupChatRoom::onParticipantAdded (shared_ptr<ConferenceParticipantEv
|
|||
|
||||
participant = make_shared<Participant>(addr);
|
||||
dConference->participants.push_back(participant);
|
||||
|
||||
if (isFullState)
|
||||
return;
|
||||
|
||||
LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this);
|
||||
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
|
||||
LinphoneChatRoomCbsParticipantAddedCb cb = linphone_chat_room_cbs_get_participant_added(cbs);
|
||||
|
|
@ -287,7 +291,9 @@ void ClientGroupChatRoom::onParticipantAdded (shared_ptr<ConferenceParticipantEv
|
|||
cb(cr, L_GET_C_BACK_PTR(event));
|
||||
}
|
||||
|
||||
void ClientGroupChatRoom::onParticipantRemoved (shared_ptr<ConferenceParticipantEvent> event) {
|
||||
void ClientGroupChatRoom::onParticipantRemoved (const shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) {
|
||||
(void)isFullState; // unused
|
||||
|
||||
L_D_T(RemoteConference, dConference);
|
||||
|
||||
const Address &addr = event->getParticipantAddress();
|
||||
|
|
@ -308,7 +314,7 @@ void ClientGroupChatRoom::onParticipantRemoved (shared_ptr<ConferenceParticipant
|
|||
dConference->participants.remove(participant);
|
||||
}
|
||||
|
||||
void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr<ConferenceParticipantEvent> event) {
|
||||
void ClientGroupChatRoom::onParticipantSetAdmin (const shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) {
|
||||
const Address &addr = event->getParticipantAddress();
|
||||
shared_ptr<Participant> participant;
|
||||
if (isMe(addr))
|
||||
|
|
@ -325,6 +331,9 @@ void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr<ConferenceParticipan
|
|||
return; // No change in the local admin status, do not notify
|
||||
participant->getPrivate()->setAdmin(isAdmin);
|
||||
|
||||
if (isFullState)
|
||||
return;
|
||||
|
||||
LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this);
|
||||
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
|
||||
LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb = linphone_chat_room_cbs_get_participant_admin_status_changed(cbs);
|
||||
|
|
@ -334,11 +343,14 @@ void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr<ConferenceParticipan
|
|||
cb(cr, L_GET_C_BACK_PTR(event));
|
||||
}
|
||||
|
||||
void ClientGroupChatRoom::onSubjectChanged (shared_ptr<ConferenceSubjectEvent> event) {
|
||||
void ClientGroupChatRoom::onSubjectChanged (const shared_ptr<ConferenceSubjectEvent> &event, bool isFullState) {
|
||||
if (getSubject() == event->getSubject())
|
||||
return; // No change in the local subject, do not notify
|
||||
RemoteConference::setSubject(event->getSubject());
|
||||
|
||||
if (isFullState)
|
||||
return;
|
||||
|
||||
LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this);
|
||||
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
|
||||
LinphoneChatRoomCbsSubjectChangedCb cb = linphone_chat_room_cbs_get_subject_changed(cbs);
|
||||
|
|
@ -348,7 +360,7 @@ void ClientGroupChatRoom::onSubjectChanged (shared_ptr<ConferenceSubjectEvent> e
|
|||
cb(cr, L_GET_C_BACK_PTR(event));
|
||||
}
|
||||
|
||||
void ClientGroupChatRoom::onParticipantDeviceAdded (shared_ptr<ConferenceParticipantDeviceEvent> event) {
|
||||
void ClientGroupChatRoom::onParticipantDeviceAdded (const shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) {
|
||||
const Address &addr = event->getParticipantAddress();
|
||||
shared_ptr<Participant> participant;
|
||||
if (isMe(addr))
|
||||
|
|
@ -360,6 +372,10 @@ void ClientGroupChatRoom::onParticipantDeviceAdded (shared_ptr<ConferencePartici
|
|||
return;
|
||||
}
|
||||
participant->getPrivate()->addDevice(event->getGruuAddress());
|
||||
|
||||
if (isFullState)
|
||||
return;
|
||||
|
||||
LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this);
|
||||
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
|
||||
LinphoneChatRoomCbsParticipantDeviceAddedCb cb = linphone_chat_room_cbs_get_participant_device_added(cbs);
|
||||
|
|
@ -369,7 +385,9 @@ void ClientGroupChatRoom::onParticipantDeviceAdded (shared_ptr<ConferencePartici
|
|||
cb(cr, L_GET_C_BACK_PTR(event));
|
||||
}
|
||||
|
||||
void ClientGroupChatRoom::onParticipantDeviceRemoved (shared_ptr<ConferenceParticipantDeviceEvent> event) {
|
||||
void ClientGroupChatRoom::onParticipantDeviceRemoved (const shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) {
|
||||
(void)isFullState; // unused
|
||||
|
||||
const Address &addr = event->getParticipantAddress();
|
||||
shared_ptr<Participant> participant;
|
||||
if (isMe(addr))
|
||||
|
|
|
|||
|
|
@ -64,12 +64,12 @@ private:
|
|||
/* ConferenceListener */
|
||||
void onConferenceCreated (const Address &addr) override;
|
||||
void onConferenceTerminated (const Address &addr) override;
|
||||
void onParticipantAdded (std::shared_ptr<ConferenceParticipantEvent> event) override;
|
||||
void onParticipantRemoved (std::shared_ptr<ConferenceParticipantEvent> event) override;
|
||||
void onParticipantSetAdmin (std::shared_ptr<ConferenceParticipantEvent> event) override;
|
||||
void onSubjectChanged (std::shared_ptr<ConferenceSubjectEvent> event) override;
|
||||
void onParticipantDeviceAdded (std::shared_ptr<ConferenceParticipantDeviceEvent> event) override;
|
||||
void onParticipantDeviceRemoved (std::shared_ptr<ConferenceParticipantDeviceEvent> event) override;
|
||||
void onParticipantAdded (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) override;
|
||||
void onParticipantRemoved (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) override;
|
||||
void onParticipantSetAdmin (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) override;
|
||||
void onSubjectChanged (const std::shared_ptr<ConferenceSubjectEvent> &event, bool isFullState) override;
|
||||
void onParticipantDeviceAdded (const std::shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) override;
|
||||
void onParticipantDeviceRemoved (const std::shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) override;
|
||||
|
||||
private:
|
||||
/* CallSessionListener */
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@
|
|||
#include <ctime>
|
||||
#include <string>
|
||||
|
||||
#include "event-log/events.h"
|
||||
#include "linphone/utils/general.h"
|
||||
|
||||
#include "event-log/events.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
|
@ -36,12 +37,12 @@ class ConferenceListener {
|
|||
public:
|
||||
virtual void onConferenceCreated (const Address &addr) = 0;
|
||||
virtual void onConferenceTerminated (const Address &addr) = 0;
|
||||
virtual void onParticipantAdded (std::shared_ptr<ConferenceParticipantEvent> event) = 0;
|
||||
virtual void onParticipantRemoved (std::shared_ptr<ConferenceParticipantEvent> event) = 0;
|
||||
virtual void onParticipantSetAdmin (std::shared_ptr<ConferenceParticipantEvent> event) = 0;
|
||||
virtual void onSubjectChanged (std::shared_ptr<ConferenceSubjectEvent> event) = 0;
|
||||
virtual void onParticipantDeviceAdded (std::shared_ptr<ConferenceParticipantDeviceEvent> event) = 0;
|
||||
virtual void onParticipantDeviceRemoved (std::shared_ptr<ConferenceParticipantDeviceEvent> event) = 0;
|
||||
virtual void onParticipantAdded (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) = 0;
|
||||
virtual void onParticipantRemoved (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) = 0;
|
||||
virtual void onParticipantSetAdmin (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) = 0;
|
||||
virtual void onSubjectChanged (const std::shared_ptr<ConferenceSubjectEvent> &event, bool isFullState) = 0;
|
||||
virtual void onParticipantDeviceAdded (const std::shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) = 0;
|
||||
virtual void onParticipantDeviceRemoved (const std::shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) = 0;
|
||||
};
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -89,13 +89,15 @@ void RemoteConferenceEventHandler::notifyReceived (const string &xmlBody) {
|
|||
confInfo->getConferenceDescription().present() &&
|
||||
confInfo->getConferenceDescription().get().getSubject().present()
|
||||
)
|
||||
d->listener->onSubjectChanged(make_shared<ConferenceSubjectEvent>(
|
||||
tm,
|
||||
isFullState,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
confInfo->getConferenceDescription().get().getSubject().get()
|
||||
));
|
||||
d->listener->onSubjectChanged(
|
||||
make_shared<ConferenceSubjectEvent>(
|
||||
tm,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
confInfo->getConferenceDescription().get().getSubject().get()
|
||||
),
|
||||
isFullState
|
||||
);
|
||||
if (confInfo->getVersion().present())
|
||||
d->lastNotify = confInfo->getVersion().get();
|
||||
|
||||
|
|
@ -108,14 +110,16 @@ void RemoteConferenceEventHandler::notifyReceived (const string &xmlBody) {
|
|||
Address addr(cAddrStr);
|
||||
bctbx_free(cAddrStr);
|
||||
if (user.getState() == StateType::deleted) {
|
||||
d->listener->onParticipantRemoved(make_shared<ConferenceParticipantEvent>(
|
||||
EventLog::Type::ConferenceParticipantRemoved,
|
||||
tm,
|
||||
isFullState,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
addr
|
||||
));
|
||||
d->listener->onParticipantRemoved(
|
||||
make_shared<ConferenceParticipantEvent>(
|
||||
EventLog::Type::ConferenceParticipantRemoved,
|
||||
tm,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
addr
|
||||
),
|
||||
isFullState
|
||||
);
|
||||
} else {
|
||||
bool isAdmin = false;
|
||||
if (user.getRoles()) {
|
||||
|
|
@ -126,49 +130,60 @@ void RemoteConferenceEventHandler::notifyReceived (const string &xmlBody) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (user.getState() == StateType::full) {
|
||||
d->listener->onParticipantAdded(make_shared<ConferenceParticipantEvent>(
|
||||
EventLog::Type::ConferenceParticipantAdded,
|
||||
d->listener->onParticipantAdded(
|
||||
make_shared<ConferenceParticipantEvent>(
|
||||
EventLog::Type::ConferenceParticipantAdded,
|
||||
tm,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
addr
|
||||
),
|
||||
isFullState
|
||||
);
|
||||
}
|
||||
|
||||
d->listener->onParticipantSetAdmin(
|
||||
make_shared<ConferenceParticipantEvent>(
|
||||
isAdmin ? EventLog::Type::ConferenceParticipantSetAdmin : EventLog::Type::ConferenceParticipantUnsetAdmin,
|
||||
tm,
|
||||
isFullState,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
addr
|
||||
));
|
||||
}
|
||||
d->listener->onParticipantSetAdmin(make_shared<ConferenceParticipantEvent>(
|
||||
isAdmin ? EventLog::Type::ConferenceParticipantSetAdmin : EventLog::Type::ConferenceParticipantUnsetAdmin,
|
||||
tm,
|
||||
isFullState,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
addr
|
||||
));
|
||||
),
|
||||
isFullState
|
||||
);
|
||||
|
||||
for (const auto &endpoint : user.getEndpoint()) {
|
||||
if (!endpoint.getEntity().present())
|
||||
break;
|
||||
|
||||
Address gruu(endpoint.getEntity().get());
|
||||
if (endpoint.getState() == StateType::deleted) {
|
||||
d->listener->onParticipantDeviceRemoved(make_shared<ConferenceParticipantDeviceEvent>(
|
||||
EventLog::Type::ConferenceParticipantDeviceRemoved,
|
||||
tm,
|
||||
isFullState,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
addr,
|
||||
gruu
|
||||
));
|
||||
d->listener->onParticipantDeviceRemoved(
|
||||
make_shared<ConferenceParticipantDeviceEvent>(
|
||||
EventLog::Type::ConferenceParticipantDeviceRemoved,
|
||||
tm,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
addr,
|
||||
gruu
|
||||
),
|
||||
isFullState
|
||||
);
|
||||
} else if (endpoint.getState() == StateType::full) {
|
||||
d->listener->onParticipantDeviceAdded(make_shared<ConferenceParticipantDeviceEvent>(
|
||||
EventLog::Type::ConferenceParticipantDeviceAdded,
|
||||
tm,
|
||||
isFullState,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
addr,
|
||||
gruu
|
||||
));
|
||||
d->listener->onParticipantDeviceAdded(
|
||||
make_shared<ConferenceParticipantDeviceEvent>(
|
||||
EventLog::Type::ConferenceParticipantDeviceAdded,
|
||||
tm,
|
||||
d->confAddress,
|
||||
d->lastNotify,
|
||||
addr,
|
||||
gruu
|
||||
),
|
||||
isFullState
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,16 +89,34 @@ void RemoteConference::onConferenceTerminated (const Address &addr) {
|
|||
d->eventHandler->unsubscribe();
|
||||
}
|
||||
|
||||
void RemoteConference::onParticipantAdded (std::shared_ptr<ConferenceParticipantEvent> event) {}
|
||||
void RemoteConference::onParticipantAdded (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) {
|
||||
(void)event; // unused
|
||||
(void)isFullState; // unused
|
||||
}
|
||||
|
||||
void RemoteConference::onParticipantRemoved (std::shared_ptr<ConferenceParticipantEvent> event) {}
|
||||
void RemoteConference::onParticipantRemoved (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) {
|
||||
(void)event; // unused
|
||||
(void)isFullState; // unused
|
||||
}
|
||||
|
||||
void RemoteConference::onParticipantSetAdmin (std::shared_ptr<ConferenceParticipantEvent> event) {}
|
||||
void RemoteConference::onParticipantSetAdmin (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) {
|
||||
(void)event; // unused
|
||||
(void)isFullState; // unused
|
||||
}
|
||||
|
||||
void RemoteConference::onSubjectChanged (std::shared_ptr<ConferenceSubjectEvent> event) {}
|
||||
void RemoteConference::onSubjectChanged (const std::shared_ptr<ConferenceSubjectEvent> &event, bool isFullState) {
|
||||
(void)event; // unused
|
||||
(void)isFullState; // unused
|
||||
}
|
||||
|
||||
void RemoteConference::onParticipantDeviceAdded (std::shared_ptr<ConferenceParticipantDeviceEvent> event) {}
|
||||
void RemoteConference::onParticipantDeviceAdded (const std::shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) {
|
||||
(void)event; // unused
|
||||
(void)isFullState; // unused
|
||||
}
|
||||
|
||||
void RemoteConference::onParticipantDeviceRemoved (std::shared_ptr<ConferenceParticipantDeviceEvent> event) {}
|
||||
void RemoteConference::onParticipantDeviceRemoved (const std::shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) {
|
||||
(void)event; // unused
|
||||
(void)isFullState; // unused
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -46,12 +46,12 @@ protected:
|
|||
/* ConferenceListener */
|
||||
void onConferenceCreated (const Address &addr) override;
|
||||
void onConferenceTerminated (const Address &addr) override;
|
||||
void onParticipantAdded (std::shared_ptr<ConferenceParticipantEvent> event) override;
|
||||
void onParticipantRemoved (std::shared_ptr<ConferenceParticipantEvent> event) override;
|
||||
void onParticipantSetAdmin (std::shared_ptr<ConferenceParticipantEvent> event) override;
|
||||
void onSubjectChanged (std::shared_ptr<ConferenceSubjectEvent> event) override;
|
||||
void onParticipantDeviceAdded (std::shared_ptr<ConferenceParticipantDeviceEvent> event) override;
|
||||
void onParticipantDeviceRemoved (std::shared_ptr<ConferenceParticipantDeviceEvent> event) override;
|
||||
void onParticipantAdded (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) override;
|
||||
void onParticipantRemoved (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) override;
|
||||
void onParticipantSetAdmin (const std::shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) override;
|
||||
void onSubjectChanged (const std::shared_ptr<ConferenceSubjectEvent> &event, bool isFullState) override;
|
||||
void onParticipantDeviceAdded (const std::shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) override;
|
||||
void onParticipantDeviceRemoved (const std::shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) override;
|
||||
|
||||
private:
|
||||
L_DECLARE_PRIVATE(RemoteConference);
|
||||
|
|
|
|||
|
|
@ -355,7 +355,6 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
return make_shared<ConferenceParticipantEvent>(
|
||||
type,
|
||||
date,
|
||||
false,
|
||||
Address(peerAddress),
|
||||
notifyId,
|
||||
Address(participantAddress)
|
||||
|
|
@ -387,7 +386,6 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
return make_shared<ConferenceParticipantDeviceEvent>(
|
||||
type,
|
||||
date,
|
||||
false,
|
||||
Address(peerAddress),
|
||||
notifyId,
|
||||
Address(participantAddress),
|
||||
|
|
@ -414,7 +412,6 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
// TODO: Use cache.
|
||||
return make_shared<ConferenceSubjectEvent>(
|
||||
date,
|
||||
false,
|
||||
Address(peerAddress),
|
||||
notifyId,
|
||||
subject
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
class ConferenceNotifiedEventPrivate : public ConferenceEventPrivate {
|
||||
private:
|
||||
unsigned int notifyId = 0;
|
||||
bool isFullState = false;
|
||||
|
||||
L_DECLARE_PUBLIC(ConferenceNotifiedEvent);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,26 +30,22 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
ConferenceNotifiedEvent::ConferenceNotifiedEvent (
|
||||
Type type,
|
||||
time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId
|
||||
) : ConferenceEvent(*new ConferenceNotifiedEventPrivate, type, time, conferenceAddress) {
|
||||
L_D();
|
||||
d->notifyId = notifyId;
|
||||
d->isFullState = isFullState;
|
||||
}
|
||||
|
||||
ConferenceNotifiedEvent::ConferenceNotifiedEvent (
|
||||
ConferenceNotifiedEventPrivate &p,
|
||||
Type type,
|
||||
time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId
|
||||
) : ConferenceEvent(p, type, time, conferenceAddress) {
|
||||
L_D();
|
||||
d->notifyId = notifyId;
|
||||
d->isFullState = isFullState;
|
||||
}
|
||||
|
||||
unsigned int ConferenceNotifiedEvent::getNotifyId () const {
|
||||
|
|
@ -57,9 +53,4 @@ unsigned int ConferenceNotifiedEvent::getNotifyId () const {
|
|||
return d->notifyId;
|
||||
}
|
||||
|
||||
bool ConferenceNotifiedEvent::isFullState () const {
|
||||
L_D();
|
||||
return d->isFullState;
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -32,20 +32,17 @@ class LINPHONE_PUBLIC ConferenceNotifiedEvent : public ConferenceEvent {
|
|||
public:
|
||||
ConferenceNotifiedEvent (
|
||||
Type type, std::time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifiyId
|
||||
);
|
||||
|
||||
unsigned int getNotifyId () const;
|
||||
bool isFullState() const;
|
||||
|
||||
protected:
|
||||
ConferenceNotifiedEvent (
|
||||
ConferenceNotifiedEventPrivate &p,
|
||||
Type type,
|
||||
std::time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId
|
||||
);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ public:
|
|||
ConferenceParticipantDeviceEvent::ConferenceParticipantDeviceEvent (
|
||||
Type type,
|
||||
time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId,
|
||||
const Address &participantAddress,
|
||||
|
|
@ -45,7 +44,6 @@ ConferenceParticipantDeviceEvent::ConferenceParticipantDeviceEvent (
|
|||
*new ConferenceParticipantDeviceEventPrivate,
|
||||
type,
|
||||
time,
|
||||
isFullState,
|
||||
conferenceAddress,
|
||||
notifyId,
|
||||
participantAddress
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ public:
|
|||
ConferenceParticipantDeviceEvent (
|
||||
Type type,
|
||||
std::time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId,
|
||||
const Address &participantAddress,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
ConferenceParticipantEvent::ConferenceParticipantEvent (
|
||||
Type type,
|
||||
time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId,
|
||||
const Address &participantAddress
|
||||
|
|
@ -38,7 +37,6 @@ ConferenceParticipantEvent::ConferenceParticipantEvent (
|
|||
*new ConferenceParticipantEventPrivate,
|
||||
type,
|
||||
time,
|
||||
isFullState,
|
||||
conferenceAddress,
|
||||
notifyId
|
||||
) {
|
||||
|
|
@ -56,7 +54,6 @@ ConferenceParticipantEvent::ConferenceParticipantEvent (
|
|||
ConferenceParticipantEventPrivate &p,
|
||||
Type type,
|
||||
time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId,
|
||||
const Address &participantAddress
|
||||
|
|
@ -64,7 +61,6 @@ ConferenceParticipantEvent::ConferenceParticipantEvent (
|
|||
p,
|
||||
type,
|
||||
time,
|
||||
isFullState,
|
||||
conferenceAddress,
|
||||
notifyId
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ public:
|
|||
ConferenceParticipantEvent (
|
||||
Type type,
|
||||
std::time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId,
|
||||
const Address &participantAddress
|
||||
|
|
@ -46,7 +45,6 @@ protected:
|
|||
ConferenceParticipantEventPrivate &p,
|
||||
Type type,
|
||||
std::time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId,
|
||||
const Address &participantAddress
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ public:
|
|||
|
||||
ConferenceSubjectEvent::ConferenceSubjectEvent (
|
||||
time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId,
|
||||
const string &subject
|
||||
|
|
@ -43,7 +42,6 @@ ConferenceSubjectEvent::ConferenceSubjectEvent (
|
|||
*new ConferenceSubjectEventPrivate,
|
||||
Type::ConferenceSubjectChanged,
|
||||
time,
|
||||
isFullState,
|
||||
conferenceAddress,
|
||||
notifyId
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ class LINPHONE_PUBLIC ConferenceSubjectEvent : public ConferenceNotifiedEvent {
|
|||
public:
|
||||
ConferenceSubjectEvent (
|
||||
std::time_t time,
|
||||
bool isFullState,
|
||||
const Address &conferenceAddress,
|
||||
unsigned int notifyId,
|
||||
const std::string &subject
|
||||
|
|
|
|||
|
|
@ -447,12 +447,12 @@ public:
|
|||
private:
|
||||
void onConferenceCreated (const Address &addr) override;
|
||||
void onConferenceTerminated (const Address &addr) override;
|
||||
void onParticipantAdded (shared_ptr<ConferenceParticipantEvent> event) override;
|
||||
void onParticipantRemoved (shared_ptr<ConferenceParticipantEvent> event) override;
|
||||
void onParticipantSetAdmin (shared_ptr<ConferenceParticipantEvent> event) override;
|
||||
void onSubjectChanged (shared_ptr<ConferenceSubjectEvent> event) override;
|
||||
void onParticipantDeviceAdded (shared_ptr<ConferenceParticipantDeviceEvent> event) override;
|
||||
void onParticipantDeviceRemoved (shared_ptr<ConferenceParticipantDeviceEvent> event) override;
|
||||
void onParticipantAdded (const shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) override;
|
||||
void onParticipantRemoved (const shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) override;
|
||||
void onParticipantSetAdmin (const shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) override;
|
||||
void onSubjectChanged (const shared_ptr<ConferenceSubjectEvent> &event, bool isFullState) override;
|
||||
void onParticipantDeviceAdded (const shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) override;
|
||||
void onParticipantDeviceRemoved (const shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) override;
|
||||
|
||||
public:
|
||||
RemoteConferenceEventHandler *handler;
|
||||
|
|
@ -473,29 +473,34 @@ void ConferenceEventTester::onConferenceCreated (const Address &addr) {}
|
|||
|
||||
void ConferenceEventTester::onConferenceTerminated (const Address &addr) {}
|
||||
|
||||
void ConferenceEventTester::onParticipantAdded (shared_ptr<ConferenceParticipantEvent> event) {
|
||||
void ConferenceEventTester::onParticipantAdded (const shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) {
|
||||
(void)isFullState; // unused
|
||||
const Address addr = event->getParticipantAddress();
|
||||
participants.insert(pair<string, bool>(addr.asString(), FALSE));
|
||||
participantDevices.insert(pair<string, int>(addr.asString(), 0));
|
||||
}
|
||||
void ConferenceEventTester::onParticipantRemoved (shared_ptr<ConferenceParticipantEvent> event) {
|
||||
void ConferenceEventTester::onParticipantRemoved (const shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) {
|
||||
(void)isFullState; // unused
|
||||
const Address addr = event->getParticipantAddress();
|
||||
participants.erase(addr.asString());
|
||||
participantDevices.erase(addr.asString());
|
||||
}
|
||||
|
||||
void ConferenceEventTester::onParticipantSetAdmin (shared_ptr<ConferenceParticipantEvent> event) {
|
||||
void ConferenceEventTester::onParticipantSetAdmin (const shared_ptr<ConferenceParticipantEvent> &event, bool isFullState) {
|
||||
(void)isFullState; // unused
|
||||
const Address addr = event->getParticipantAddress();
|
||||
auto it = participants.find(addr.asString());
|
||||
if (it != participants.end())
|
||||
it->second = (event->getType() == EventLog::Type::ConferenceParticipantSetAdmin);
|
||||
}
|
||||
|
||||
void ConferenceEventTester::onSubjectChanged(shared_ptr<ConferenceSubjectEvent> event) {
|
||||
void ConferenceEventTester::onSubjectChanged(const shared_ptr<ConferenceSubjectEvent> &event, bool isFullState) {
|
||||
(void)isFullState; // unused
|
||||
confSubject = event->getSubject();
|
||||
}
|
||||
|
||||
void ConferenceEventTester::onParticipantDeviceAdded (shared_ptr<ConferenceParticipantDeviceEvent> event) {
|
||||
void ConferenceEventTester::onParticipantDeviceAdded (const shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) {
|
||||
(void)isFullState; // unused
|
||||
const Address addr = event->getParticipantAddress();
|
||||
auto it = participantDevices.find(addr.asString());
|
||||
if (it != participantDevices.end())
|
||||
|
|
@ -503,7 +508,8 @@ void ConferenceEventTester::onParticipantDeviceAdded (shared_ptr<ConferenceParti
|
|||
|
||||
}
|
||||
|
||||
void ConferenceEventTester::onParticipantDeviceRemoved (shared_ptr<ConferenceParticipantDeviceEvent> event) {
|
||||
void ConferenceEventTester::onParticipantDeviceRemoved (const shared_ptr<ConferenceParticipantDeviceEvent> &event, bool isFullState) {
|
||||
(void)isFullState; // unused
|
||||
const Address addr = event->getParticipantAddress();
|
||||
auto it = participantDevices.find(addr.asString());
|
||||
if (it != participantDevices.end() && it->second > 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue