From a97c04842065478137bb60cbdc95fc57578571b4 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Thu, 16 Nov 2017 17:06:12 +0100 Subject: [PATCH] feat(EventLog): refactoring, use IdentityAddress and rename time arg --- include/linphone/api/c-event-log.h | 12 ++-- src/c-wrapper/api/c-event-log.cpp | 70 +++++++++++++------ src/c-wrapper/internal/c-tools.h | 2 +- src/chat/chat-room/client-group-chat-room.cpp | 4 +- .../conference/conference-call-event.cpp | 6 +- .../conference/conference-call-event.h | 2 +- .../conference-chat-message-event.cpp | 6 +- .../conference-chat-message-event.h | 2 +- src/event-log/conference/conference-event-p.h | 4 +- src/event-log/conference/conference-event.cpp | 15 ++-- src/event-log/conference/conference-event.h | 8 +-- .../conference/conference-notified-event.cpp | 12 ++-- .../conference/conference-notified-event.h | 8 +-- .../conference-participant-device-event.cpp | 20 +++--- .../conference-participant-device-event.h | 10 +-- .../conference-participant-event-p.h | 2 +- .../conference-participant-event.cpp | 18 ++--- .../conference/conference-participant-event.h | 14 ++-- .../conference/conference-subject-event.cpp | 8 ++- .../conference/conference-subject-event.h | 4 +- src/event-log/event-log-p.h | 2 +- src/event-log/event-log.cpp | 9 ++- src/event-log/event-log.h | 4 +- 23 files changed, 140 insertions(+), 102 deletions(-) diff --git a/include/linphone/api/c-event-log.h b/include/linphone/api/c-event-log.h index c3f9e67c6..6edb53ffc 100644 --- a/include/linphone/api/c-event-log.h +++ b/include/linphone/api/c-event-log.h @@ -55,11 +55,11 @@ LINPHONE_PUBLIC void linphone_event_log_unref (LinphoneEventLog *event_log); LINPHONE_PUBLIC LinphoneEventLogType linphone_event_log_get_type (const LinphoneEventLog *event_log); /** - * Returns the time of a event log. + * Returns the creation time of a event log. * @param[in] event_log A #LinphoneEventLog object - * @return The event time + * @return The event creation time */ -LINPHONE_PUBLIC time_t linphone_event_log_get_time (const LinphoneEventLog *event_log); +LINPHONE_PUBLIC time_t linphone_event_log_get_creation_time (const LinphoneEventLog *event_log); // ----------------------------------------------------------------------------- // ConferenceEvent. @@ -121,11 +121,11 @@ LINPHONE_PUBLIC const LinphoneAddress *linphone_event_log_get_participant_addres // ----------------------------------------------------------------------------- /** - * Returns the gruu address of a conference participant device event. + * Returns the device address of a conference participant device event. * @param[in] event_log A #LinphoneEventLog object. - * @return The conference gruu address. + * @return The conference device address. */ -LINPHONE_PUBLIC const LinphoneAddress *linphone_event_log_get_gruu_address (const LinphoneEventLog *event_log); +LINPHONE_PUBLIC const LinphoneAddress *linphone_event_log_get_device_address (const LinphoneEventLog *event_log); // ----------------------------------------------------------------------------- // ConferenceSubjectEvent. diff --git a/src/c-wrapper/api/c-event-log.cpp b/src/c-wrapper/api/c-event-log.cpp index 132982327..2b93bc2d0 100644 --- a/src/c-wrapper/api/c-event-log.cpp +++ b/src/c-wrapper/api/c-event-log.cpp @@ -26,10 +26,31 @@ // ============================================================================= -L_DECLARE_C_OBJECT_IMPL(EventLog); - using namespace std; +static void _linphone_event_log_constructor (LinphoneEventLog *event_log); +static void _linphone_event_log_destructor (LinphoneEventLog *event_log); + +L_DECLARE_C_OBJECT_IMPL_WITH_XTORS( + EventLog, + _linphone_event_log_constructor, + _linphone_event_log_destructor, + mutable LinphoneAddress *conferenceAddressCache; + mutable LinphoneAddress *participantAddressCache; + mutable LinphoneAddress *deviceAddressCache; +); + +void _linphone_event_log_constructor (LinphoneEventLog *) {} + +void _linphone_event_log_destructor (LinphoneEventLog *event_log) { + if (event_log->conferenceAddressCache) + linphone_address_unref(event_log->conferenceAddressCache); + if (event_log->participantAddressCache) + linphone_address_unref(event_log->participantAddressCache); + if (event_log->deviceAddressCache) + linphone_address_unref(event_log->deviceAddressCache); +} + // ----------------------------------------------------------------------------- // Helpers. // ----------------------------------------------------------------------------- @@ -161,8 +182,8 @@ LinphoneEventLogType linphone_event_log_get_type (const LinphoneEventLog *event_ ); } -time_t linphone_event_log_get_time (const LinphoneEventLog *event_log) { - return L_GET_CPP_PTR_FROM_C_OBJECT(event_log)->getTime(); +time_t linphone_event_log_get_creation_time (const LinphoneEventLog *event_log) { + return L_GET_CPP_PTR_FROM_C_OBJECT(event_log)->getCreationTime(); } // ----------------------------------------------------------------------------- @@ -173,11 +194,14 @@ const LinphoneAddress *linphone_event_log_get_conference_address (const Linphone if (!isConferenceType(linphone_event_log_get_type(event_log))) return nullptr; - return L_GET_C_BACK_PTR( - &static_pointer_cast( - L_GET_CPP_PTR_FROM_C_OBJECT(event_log) - )->getConferenceAddress() - ); + if (!event_log->conferenceAddressCache) + event_log->conferenceAddressCache = linphone_address_new( + static_pointer_cast( + L_GET_CPP_PTR_FROM_C_OBJECT(event_log) + )->getConferenceAddress().asString().c_str() + ); + + return event_log->conferenceAddressCache; } // ----------------------------------------------------------------------------- @@ -231,26 +255,32 @@ const LinphoneAddress *linphone_event_log_get_participant_address (const Linphon if (!isConferenceParticipantType(linphone_event_log_get_type(event_log))) return nullptr; - return L_GET_C_BACK_PTR( - &static_pointer_cast( - L_GET_CPP_PTR_FROM_C_OBJECT(event_log) - )->getParticipantAddress() - ); + if (!event_log->participantAddressCache) + event_log->participantAddressCache = linphone_address_new( + static_pointer_cast( + L_GET_CPP_PTR_FROM_C_OBJECT(event_log) + )->getParticipantAddress().asString().c_str() + ); + + return event_log->participantAddressCache; } // ----------------------------------------------------------------------------- // ConferenceParticipantDeviceEvent. // ----------------------------------------------------------------------------- -const LinphoneAddress *linphone_event_log_get_gruu_address (const LinphoneEventLog *event_log) { +const LinphoneAddress *linphone_event_log_get_device_address (const LinphoneEventLog *event_log) { if (!isConferenceParticipantDeviceType(linphone_event_log_get_type(event_log))) return nullptr; - return L_GET_C_BACK_PTR( - &static_pointer_cast( - L_GET_CPP_PTR_FROM_C_OBJECT(event_log) - )->getGruuAddress() - ); + if (!event_log->deviceAddressCache) + event_log->deviceAddressCache = linphone_address_new( + static_pointer_cast( + L_GET_CPP_PTR_FROM_C_OBJECT(event_log) + )->getDeviceAddress().asString().c_str() + ); + + return event_log->deviceAddressCache; } // ----------------------------------------------------------------------------- diff --git a/src/c-wrapper/internal/c-tools.h b/src/c-wrapper/internal/c-tools.h index 75ec2445e..4635cc280 100644 --- a/src/c-wrapper/internal/c-tools.h +++ b/src/c-wrapper/internal/c-tools.h @@ -613,7 +613,7 @@ LINPHONE_END_NAMESPACE CONSTRUCTOR(object); \ return object; \ } \ - static void _linphone_ ## C_TYPE ## _uninit(Linphone ## C_TYPE * object) { \ + static void _linphone_ ## C_TYPE ## _uninit(Linphone ## C_TYPE *object) { \ DESTRUCTOR(object); \ LinphonePrivate::Wrapper::uninitBaseCppObject(object); \ } \ diff --git a/src/chat/chat-room/client-group-chat-room.cpp b/src/chat/chat-room/client-group-chat-room.cpp index 50fd91d5a..24fe71db5 100644 --- a/src/chat/chat-room/client-group-chat-room.cpp +++ b/src/chat/chat-room/client-group-chat-room.cpp @@ -385,7 +385,7 @@ void ClientGroupChatRoom::onParticipantDeviceAdded (const shared_ptrgetPrivate()->addDevice(event->getGruuAddress()); + participant->getPrivate()->addDevice(event->getDeviceAddress()); if (isFullState) return; @@ -412,7 +412,7 @@ void ClientGroupChatRoom::onParticipantDeviceRemoved (const shared_ptrgetPrivate()->removeDevice(event->getGruuAddress()); + participant->getPrivate()->removeDevice(event->getDeviceAddress()); LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this); LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); LinphoneChatRoomCbsParticipantDeviceRemovedCb cb = linphone_chat_room_cbs_get_participant_device_removed(cbs); diff --git a/src/event-log/conference/conference-call-event.cpp b/src/event-log/conference/conference-call-event.cpp index 4aea7b025..6263c5f29 100644 --- a/src/event-log/conference/conference-call-event.cpp +++ b/src/event-log/conference/conference-call-event.cpp @@ -26,6 +26,8 @@ using namespace std; LINPHONE_BEGIN_NAMESPACE +// ----------------------------------------------------------------------------- + class ConferenceCallEventPrivate : public EventLogPrivate { public: shared_ptr call; @@ -33,8 +35,8 @@ public: // ----------------------------------------------------------------------------- -ConferenceCallEvent::ConferenceCallEvent (Type type, time_t time, const shared_ptr &call) : - EventLog(*new ConferenceCallEventPrivate, type, time) { +ConferenceCallEvent::ConferenceCallEvent (Type type, time_t creationTime, const shared_ptr &call) : + EventLog(*new ConferenceCallEventPrivate, type, creationTime) { L_D(); L_ASSERT(call); L_ASSERT(type == Type::ConferenceCallStart || type == Type::ConferenceCallEnd); diff --git a/src/event-log/conference/conference-call-event.h b/src/event-log/conference/conference-call-event.h index 53a4667ff..6125e7456 100644 --- a/src/event-log/conference/conference-call-event.h +++ b/src/event-log/conference/conference-call-event.h @@ -33,7 +33,7 @@ class ConferenceCallEventPrivate; class LINPHONE_PUBLIC ConferenceCallEvent : public EventLog { public: - ConferenceCallEvent (Type type, time_t time, const std::shared_ptr &call); + ConferenceCallEvent (Type type, time_t creationTime, const std::shared_ptr &call); std::shared_ptr getCall () const; diff --git a/src/event-log/conference/conference-chat-message-event.cpp b/src/event-log/conference/conference-chat-message-event.cpp index cfc7981ef..a33819fc2 100644 --- a/src/event-log/conference/conference-chat-message-event.cpp +++ b/src/event-log/conference/conference-chat-message-event.cpp @@ -27,6 +27,8 @@ using namespace std; LINPHONE_BEGIN_NAMESPACE +// ----------------------------------------------------------------------------- + class ConferenceChatMessageEventPrivate : public ConferenceEventPrivate { public: shared_ptr chatMessage; @@ -35,12 +37,12 @@ public: // ----------------------------------------------------------------------------- ConferenceChatMessageEvent::ConferenceChatMessageEvent ( - time_t time, + time_t creationTime, const shared_ptr &chatMessage ) : ConferenceEvent( *new ConferenceChatMessageEventPrivate, EventLog::Type::ConferenceChatMessage, - time, + creationTime, chatMessage->getRemoteAddress() ) { L_D(); diff --git a/src/event-log/conference/conference-chat-message-event.h b/src/event-log/conference/conference-chat-message-event.h index 64a210e90..40b5a8990 100644 --- a/src/event-log/conference/conference-chat-message-event.h +++ b/src/event-log/conference/conference-chat-message-event.h @@ -33,7 +33,7 @@ class ConferenceChatMessageEventPrivate; class LINPHONE_PUBLIC ConferenceChatMessageEvent : public ConferenceEvent { public: - ConferenceChatMessageEvent (time_t time, const std::shared_ptr &chatMessage); + ConferenceChatMessageEvent (time_t creationTime, const std::shared_ptr &chatMessage); std::shared_ptr getChatMessage () const; diff --git a/src/event-log/conference/conference-event-p.h b/src/event-log/conference/conference-event-p.h index 85e7ae92e..ac633fb7c 100644 --- a/src/event-log/conference/conference-event-p.h +++ b/src/event-log/conference/conference-event-p.h @@ -20,7 +20,7 @@ #ifndef _CONFERENCE_EVENT_P_H_ #define _CONFERENCE_EVENT_P_H_ -#include "address/address.h" +#include "address/identity-address.h" #include "conference-event.h" #include "event-log/event-log-p.h" @@ -30,7 +30,7 @@ LINPHONE_BEGIN_NAMESPACE class ConferenceEventPrivate : public EventLogPrivate { private: - Address conferenceAddress; + IdentityAddress conferenceAddress; L_DECLARE_PUBLIC(ConferenceEvent); }; diff --git a/src/event-log/conference/conference-event.cpp b/src/event-log/conference/conference-event.cpp index daeac96a7..38d39206b 100644 --- a/src/event-log/conference/conference-event.cpp +++ b/src/event-log/conference/conference-event.cpp @@ -17,7 +17,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "address/address.h" #include "conference-event-p.h" // ============================================================================= @@ -26,8 +25,10 @@ using namespace std; LINPHONE_BEGIN_NAMESPACE -ConferenceEvent::ConferenceEvent (Type type, time_t time, const Address &conferenceAddress) : - EventLog(*new ConferenceEventPrivate, type, time) { +// ----------------------------------------------------------------------------- + +ConferenceEvent::ConferenceEvent (Type type, time_t creationTime, const IdentityAddress &conferenceAddress) : + EventLog(*new ConferenceEventPrivate, type, creationTime) { L_D(); L_ASSERT(type == Type::ConferenceCreated || type == Type::ConferenceDestroyed); d->conferenceAddress = conferenceAddress; @@ -36,14 +37,14 @@ ConferenceEvent::ConferenceEvent (Type type, time_t time, const Address &confere ConferenceEvent::ConferenceEvent ( ConferenceEventPrivate &p, Type type, - time_t time, - const Address &conferenceAddress -) : EventLog(p, type, time) { + time_t creationTime, + const IdentityAddress &conferenceAddress +) : EventLog(p, type, creationTime) { L_D(); d->conferenceAddress = conferenceAddress; } -const Address &ConferenceEvent::getConferenceAddress () const { +const IdentityAddress &ConferenceEvent::getConferenceAddress () const { L_D(); return d->conferenceAddress; } diff --git a/src/event-log/conference/conference-event.h b/src/event-log/conference/conference-event.h index 93a64a160..25cdf9a10 100644 --- a/src/event-log/conference/conference-event.h +++ b/src/event-log/conference/conference-event.h @@ -26,17 +26,17 @@ LINPHONE_BEGIN_NAMESPACE -class Address; class ConferenceEventPrivate; +class IdentityAddress; class LINPHONE_PUBLIC ConferenceEvent : public EventLog { public: - ConferenceEvent (Type type, time_t time, const Address &conferenceAddress); + ConferenceEvent (Type type, time_t creationTime, const IdentityAddress &conferenceAddress); - const Address &getConferenceAddress () const; + const IdentityAddress &getConferenceAddress () const; protected: - ConferenceEvent (ConferenceEventPrivate &p, Type type, time_t time, const Address &conferenceAddress); + ConferenceEvent (ConferenceEventPrivate &p, Type type, time_t creationTime, const IdentityAddress &conferenceAddress); private: L_DECLARE_PRIVATE(ConferenceEvent); diff --git a/src/event-log/conference/conference-notified-event.cpp b/src/event-log/conference/conference-notified-event.cpp index 5a0e4f857..4f36e6d7d 100644 --- a/src/event-log/conference/conference-notified-event.cpp +++ b/src/event-log/conference/conference-notified-event.cpp @@ -29,10 +29,10 @@ LINPHONE_BEGIN_NAMESPACE ConferenceNotifiedEvent::ConferenceNotifiedEvent ( Type type, - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId -) : ConferenceEvent(*new ConferenceNotifiedEventPrivate, type, time, conferenceAddress) { +) : ConferenceEvent(*new ConferenceNotifiedEventPrivate, type, creationTime, conferenceAddress) { L_D(); d->notifyId = notifyId; } @@ -40,10 +40,10 @@ ConferenceNotifiedEvent::ConferenceNotifiedEvent ( ConferenceNotifiedEvent::ConferenceNotifiedEvent ( ConferenceNotifiedEventPrivate &p, Type type, - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId -) : ConferenceEvent(p, type, time, conferenceAddress) { +) : ConferenceEvent(p, type, creationTime, conferenceAddress) { L_D(); d->notifyId = notifyId; } diff --git a/src/event-log/conference/conference-notified-event.h b/src/event-log/conference/conference-notified-event.h index 0c16de48f..f93dd0402 100644 --- a/src/event-log/conference/conference-notified-event.h +++ b/src/event-log/conference/conference-notified-event.h @@ -31,8 +31,8 @@ class ConferenceNotifiedEventPrivate; class LINPHONE_PUBLIC ConferenceNotifiedEvent : public ConferenceEvent { public: ConferenceNotifiedEvent ( - Type type, time_t time, - const Address &conferenceAddress, + Type type, time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifiyId ); @@ -42,8 +42,8 @@ protected: ConferenceNotifiedEvent ( ConferenceNotifiedEventPrivate &p, Type type, - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId ); diff --git a/src/event-log/conference/conference-participant-device-event.cpp b/src/event-log/conference/conference-participant-device-event.cpp index fbfbcceda..9f44bd540 100644 --- a/src/event-log/conference/conference-participant-device-event.cpp +++ b/src/event-log/conference/conference-participant-device-event.cpp @@ -26,24 +26,26 @@ using namespace std; LINPHONE_BEGIN_NAMESPACE +// ----------------------------------------------------------------------------- + class ConferenceParticipantDeviceEventPrivate : public ConferenceParticipantEventPrivate { public: - Address gruuAddress; + IdentityAddress deviceAddress; }; // ----------------------------------------------------------------------------- ConferenceParticipantDeviceEvent::ConferenceParticipantDeviceEvent ( Type type, - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId, - const Address &participantAddress, - const Address &gruuAddress + const IdentityAddress &participantAddress, + const IdentityAddress &deviceAddress ) : ConferenceParticipantEvent( *new ConferenceParticipantDeviceEventPrivate, type, - time, + creationTime, conferenceAddress, notifyId, participantAddress @@ -53,12 +55,12 @@ ConferenceParticipantDeviceEvent::ConferenceParticipantDeviceEvent ( type == Type::ConferenceParticipantDeviceAdded || type == Type::ConferenceParticipantDeviceRemoved ); - d->gruuAddress = gruuAddress; + d->deviceAddress = deviceAddress; } -const Address &ConferenceParticipantDeviceEvent::getGruuAddress () const { +const IdentityAddress &ConferenceParticipantDeviceEvent::getDeviceAddress () const { L_D(); - return d->gruuAddress; + return d->deviceAddress; } LINPHONE_END_NAMESPACE diff --git a/src/event-log/conference/conference-participant-device-event.h b/src/event-log/conference/conference-participant-device-event.h index a4e1aca79..62f9a3ed9 100644 --- a/src/event-log/conference/conference-participant-device-event.h +++ b/src/event-log/conference/conference-participant-device-event.h @@ -32,14 +32,14 @@ class LINPHONE_PUBLIC ConferenceParticipantDeviceEvent : public ConferencePartic public: ConferenceParticipantDeviceEvent ( Type type, - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId, - const Address &participantAddress, - const Address &gruuAddress + const IdentityAddress &participantAddress, + const IdentityAddress &deviceAddress ); - const Address &getGruuAddress () const; + const IdentityAddress &getDeviceAddress () const; private: L_DECLARE_PRIVATE(ConferenceParticipantDeviceEvent); diff --git a/src/event-log/conference/conference-participant-event-p.h b/src/event-log/conference/conference-participant-event-p.h index 77210c562..984763418 100644 --- a/src/event-log/conference/conference-participant-event-p.h +++ b/src/event-log/conference/conference-participant-event-p.h @@ -29,7 +29,7 @@ LINPHONE_BEGIN_NAMESPACE class ConferenceParticipantEventPrivate : public ConferenceNotifiedEventPrivate { private: - Address participantAddress; + IdentityAddress participantAddress; L_DECLARE_PUBLIC(ConferenceParticipantEvent); }; diff --git a/src/event-log/conference/conference-participant-event.cpp b/src/event-log/conference/conference-participant-event.cpp index 29cc92949..0c9c3c4aa 100644 --- a/src/event-log/conference/conference-participant-event.cpp +++ b/src/event-log/conference/conference-participant-event.cpp @@ -29,14 +29,14 @@ LINPHONE_BEGIN_NAMESPACE ConferenceParticipantEvent::ConferenceParticipantEvent ( Type type, - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId, - const Address &participantAddress + const IdentityAddress &participantAddress ) : ConferenceNotifiedEvent( *new ConferenceParticipantEventPrivate, type, - time, + creationTime, conferenceAddress, notifyId ) { @@ -53,14 +53,14 @@ ConferenceParticipantEvent::ConferenceParticipantEvent ( ConferenceParticipantEvent::ConferenceParticipantEvent ( ConferenceParticipantEventPrivate &p, Type type, - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId, - const Address &participantAddress + const IdentityAddress &participantAddress ) : ConferenceNotifiedEvent( p, type, - time, + creationTime, conferenceAddress, notifyId ) { @@ -68,7 +68,7 @@ ConferenceParticipantEvent::ConferenceParticipantEvent ( d->participantAddress = participantAddress; } -const Address &ConferenceParticipantEvent::getParticipantAddress () const { +const IdentityAddress &ConferenceParticipantEvent::getParticipantAddress () const { L_D(); return d->participantAddress; } diff --git a/src/event-log/conference/conference-participant-event.h b/src/event-log/conference/conference-participant-event.h index d699adc9b..76731dcbc 100644 --- a/src/event-log/conference/conference-participant-event.h +++ b/src/event-log/conference/conference-participant-event.h @@ -32,22 +32,22 @@ class LINPHONE_PUBLIC ConferenceParticipantEvent : public ConferenceNotifiedEven public: ConferenceParticipantEvent ( Type type, - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId, - const Address &participantAddress + const IdentityAddress &participantAddress ); - const Address &getParticipantAddress () const; + const IdentityAddress &getParticipantAddress () const; protected: ConferenceParticipantEvent ( ConferenceParticipantEventPrivate &p, Type type, - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId, - const Address &participantAddress + const IdentityAddress &participantAddress ); private: diff --git a/src/event-log/conference/conference-subject-event.cpp b/src/event-log/conference/conference-subject-event.cpp index e07061dc2..7d084e82d 100644 --- a/src/event-log/conference/conference-subject-event.cpp +++ b/src/event-log/conference/conference-subject-event.cpp @@ -26,6 +26,8 @@ using namespace std; LINPHONE_BEGIN_NAMESPACE +// ----------------------------------------------------------------------------- + class ConferenceSubjectEventPrivate : public ConferenceNotifiedEventPrivate { public: string subject; @@ -34,14 +36,14 @@ public: // ----------------------------------------------------------------------------- ConferenceSubjectEvent::ConferenceSubjectEvent ( - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId, const string &subject ) : ConferenceNotifiedEvent( *new ConferenceSubjectEventPrivate, Type::ConferenceSubjectChanged, - time, + creationTime, conferenceAddress, notifyId ) { diff --git a/src/event-log/conference/conference-subject-event.h b/src/event-log/conference/conference-subject-event.h index 02e1bcf67..7eba0cab2 100644 --- a/src/event-log/conference/conference-subject-event.h +++ b/src/event-log/conference/conference-subject-event.h @@ -33,8 +33,8 @@ class ConferenceSubjectEventPrivate; class LINPHONE_PUBLIC ConferenceSubjectEvent : public ConferenceNotifiedEvent { public: ConferenceSubjectEvent ( - time_t time, - const Address &conferenceAddress, + time_t creationTime, + const IdentityAddress &conferenceAddress, unsigned int notifyId, const std::string &subject ); diff --git a/src/event-log/event-log-p.h b/src/event-log/event-log-p.h index a5a566594..c33870d13 100644 --- a/src/event-log/event-log-p.h +++ b/src/event-log/event-log-p.h @@ -35,7 +35,7 @@ public: private: EventLog::Type type = EventLog::Type::None; - time_t time = -1; + time_t creationTime = -1; L_DECLARE_PUBLIC(EventLog); }; diff --git a/src/event-log/event-log.cpp b/src/event-log/event-log.cpp index e6a821f1c..86e92a668 100644 --- a/src/event-log/event-log.cpp +++ b/src/event-log/event-log.cpp @@ -17,7 +17,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "core/core-p.h" #include "event-log-p.h" // ============================================================================= @@ -26,10 +25,10 @@ LINPHONE_BEGIN_NAMESPACE EventLog::EventLog () : BaseObject(*new EventLogPrivate) {} -EventLog::EventLog (EventLogPrivate &p, Type type, time_t time) : BaseObject(p) { +EventLog::EventLog (EventLogPrivate &p, Type type, time_t creationTime) : BaseObject(p) { L_D(); d->type = type; - d->time = time; + d->creationTime = creationTime; } EventLog::Type EventLog::getType () const { @@ -37,9 +36,9 @@ EventLog::Type EventLog::getType () const { return d->type; } -time_t EventLog::getTime () const { +time_t EventLog::getCreationTime () const { L_D(); - return d->time; + return d->creationTime; } LINPHONE_END_NAMESPACE diff --git a/src/event-log/event-log.h b/src/event-log/event-log.h index 265a63ce7..b12a4cfc4 100644 --- a/src/event-log/event-log.h +++ b/src/event-log/event-log.h @@ -43,10 +43,10 @@ public: EventLog (); Type getType () const; - time_t getTime () const; + time_t getCreationTime () const; protected: - EventLog (EventLogPrivate &p, Type type, time_t time); + EventLog (EventLogPrivate &p, Type type, time_t creationTime); private: L_DECLARE_PRIVATE(EventLog);