diff --git a/include/linphone/api/c-event-log.h b/include/linphone/api/c-event-log.h index 2e09a8f2f..82fe4247c 100644 --- a/include/linphone/api/c-event-log.h +++ b/include/linphone/api/c-event-log.h @@ -37,20 +37,24 @@ // EventLog. // ----------------------------------------------------------------------------- +/** + * Constructs a #LinphoneEventLog object. + **/ LINPHONE_PUBLIC LinphoneEventLog *linphone_event_log_new (void); + LINPHONE_PUBLIC LinphoneEventLog *linphone_event_log_ref (LinphoneEventLog *event_log); LINPHONE_PUBLIC void linphone_event_log_unref (LinphoneEventLog *event_log); /** * Returns the type of a event log. - * @param[in] event_log A EventLog object + * @param[in] event_log A #LinphoneEventLog object * @return The event type */ LINPHONE_PUBLIC LinphoneEventLogType linphone_event_log_get_type (const LinphoneEventLog *event_log); /** * Returns the time of a event log. - * @param[in] event_log A EventLog object + * @param[in] event_log A #LinphoneEventLog object * @return The event time */ LINPHONE_PUBLIC time_t linphone_event_log_get_time (const LinphoneEventLog *event_log); @@ -59,6 +63,9 @@ LINPHONE_PUBLIC time_t linphone_event_log_get_time (const LinphoneEventLog *even // ConferenceEvent. // ----------------------------------------------------------------------------- +/** + * Constructs a #LinphoneConferenceEvent object. + **/ LINPHONE_PUBLIC LinphoneConferenceEvent *linphone_conference_event_new ( LinphoneEventLogType type, time_t time, @@ -67,8 +74,8 @@ LINPHONE_PUBLIC LinphoneConferenceEvent *linphone_conference_event_new ( /** * Returns the conference address of a conference event. - * @param[in] conference_event A ConferenceEvent object - * @return The conference address + * @param[in] conference_event A #LinphoneConferenceEvent object. + * @return The conference address. */ LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_event_get_conference_address ( const LinphoneConferenceEvent *conference_event @@ -78,6 +85,9 @@ LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_event_get_conference_ // ConferenceNotifiedEvent. // ----------------------------------------------------------------------------- +/** + * Constructs a #LinphoneConferenceNotifiedEvent object. + **/ LINPHONE_PUBLIC LinphoneConferenceNotifiedEvent *linphone_conference_notified_event_new ( LinphoneEventLogType type, time_t time, @@ -87,18 +97,21 @@ LINPHONE_PUBLIC LinphoneConferenceNotifiedEvent *linphone_conference_notified_ev /** * Returns the notify id of a conference notified event. - * @param[in] conference_notified_event A ConferenceNotifiedEvent object - * @return The conference notify id + * @param[in] conference_notified_event A #LinphoneConferenceNotifiedEvent object. + * @return The conference notify id. */ -LINPHONE_PUBLIC unsigned int linphone_conference_event_get_notify_id ( +LINPHONE_PUBLIC unsigned int linphone_conference_notified_event_get_notify_id ( const LinphoneConferenceNotifiedEvent *conference_notified_event ); // ----------------------------------------------------------------------------- -// CallEvent. +// ConferenceCallEvent. // ----------------------------------------------------------------------------- -LINPHONE_PUBLIC LinphoneCallEvent *linphone_call_event_new ( +/** + * Constructs a #LinphoneConferenceCallEvent object. + **/ +LINPHONE_PUBLIC LinphoneConferenceCallEvent *linphone_conference_call_event_new ( LinphoneEventLogType type, time_t time, LinphoneCall *call @@ -106,15 +119,20 @@ LINPHONE_PUBLIC LinphoneCallEvent *linphone_call_event_new ( /** * Returns the call of a conference call event. - * @param[in] conference_call_event A ConferenceCallEvent object - * @return The conference call + * @param[in] conference_conference_call_event A #LinphoneConferenceCallEvent object. + * @return The conference call. */ -LINPHONE_PUBLIC LinphoneCall *linphone_call_event_get_call (const LinphoneCallEvent *call_event); +LINPHONE_PUBLIC LinphoneCall *linphone_conference_call_event_get_call ( + const LinphoneConferenceCallEvent *conference_call_event +); // ----------------------------------------------------------------------------- // ConferenceChatMessageEvent. // ----------------------------------------------------------------------------- +/** + * Constructs a #LinphoneConferenceChatMessageEvent object. + **/ LINPHONE_PUBLIC LinphoneConferenceChatMessageEvent *linphone_conference_chat_message_event_new ( time_t time, LinphoneChatMessage *chat_message @@ -122,8 +140,8 @@ LINPHONE_PUBLIC LinphoneConferenceChatMessageEvent *linphone_conference_chat_mes /** * Returns the chat message of a conference chat message event. - * @param[in] conference_chat_message_event A ConferenceChatMessageEvent object - * @return The conference chat message + * @param[in] conference_chat_message_event A #LinphoneConferenceChatMessageEvent object. + * @return The conference chat message. */ LINPHONE_PUBLIC LinphoneChatMessage *linphone_conference_chat_message_event_get_chat_message ( const LinphoneConferenceChatMessageEvent *conference_chat_message_event @@ -133,6 +151,9 @@ LINPHONE_PUBLIC LinphoneChatMessage *linphone_conference_chat_message_event_get_ // ConferenceParticipantEvent. // ----------------------------------------------------------------------------- +/** + * Constructs a #LinphoneConferenceParticipantEvent object. + **/ LINPHONE_PUBLIC LinphoneConferenceParticipantEvent *linphone_conference_participant_event_new ( LinphoneEventLogType type, time_t time, @@ -143,10 +164,10 @@ LINPHONE_PUBLIC LinphoneConferenceParticipantEvent *linphone_conference_particip /** * Returns the participant address of a conference participant event. - * @param[in] conference_participant_event A ConferenceParticipantEvent object - * @return The conference participant address + * @param[in] conference_participant_event A ConferenceParticipantEvent object. + * @return The conference participant address. */ -LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_participant_get_participant_address ( +LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_participant_event_get_participant_address ( const LinphoneConferenceParticipantEvent *conference_participant_event ); @@ -154,6 +175,9 @@ LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_participant_get_parti // ConferenceParticipantDeviceEvent. // ----------------------------------------------------------------------------- +/** + * Constructs a #LinphoneConferenceParticipantDeviceEvent object. + **/ LINPHONE_PUBLIC LinphoneConferenceParticipantDeviceEvent *linphone_conference_participant_device_event_new ( LinphoneEventLogType type, time_t time, @@ -165,10 +189,10 @@ LINPHONE_PUBLIC LinphoneConferenceParticipantDeviceEvent *linphone_conference_pa /** * Returns the gruu address of a conference participant device event. - * @param[in] conference_participant_device_event A ConferenceParticipantDeviceEvent object - * @return The conference gruu address + * @param[in] conference_participant_device_event A #LinphoneConferenceParticipantDeviceEvent object. + * @return The conference gruu address. */ -LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_participant_device_get_gruu_address ( +LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_participant_device_event_get_gruu_address ( const LinphoneConferenceParticipantDeviceEvent *conference_participant_device_event ); @@ -176,6 +200,9 @@ LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_participant_device_ge // ConferenceSubjectEvent. // ----------------------------------------------------------------------------- +/** + * Constructs a #LinphoneConferenceSubjectEvent object. + **/ LINPHONE_PUBLIC LinphoneConferenceSubjectEvent *linphone_conference_subject_event_new ( LinphoneEventLogType type, time_t time, @@ -186,10 +213,10 @@ LINPHONE_PUBLIC LinphoneConferenceSubjectEvent *linphone_conference_subject_even /** * Returns the subject of a conference subject event. - * @param[in] conference_subject_event A ConferenceSubjectEvent object - * @return The conference subject + * @param[in] conference_subject_event A #LinphoneConferenceSubjectEvent object. + * @return The conference subject. */ -LINPHONE_PUBLIC const char *linphone_conference_subject_get_subject ( +LINPHONE_PUBLIC const char *linphone_conference_subject_event_get_subject ( const LinphoneConferenceSubjectEvent *conference_subject_event ); diff --git a/include/linphone/api/c-types.h b/include/linphone/api/c-types.h index 4538b5976..07ac41960 100644 --- a/include/linphone/api/c-types.h +++ b/include/linphone/api/c-types.h @@ -131,7 +131,7 @@ typedef struct _LinphoneChatRoomCbs LinphoneChatRoomCbs; * Call start/end events. * @ingroup events */ -typedef struct _LinphoneCallEvent LinphoneCallEvent; +typedef struct _LinphoneConferenceCallEvent LinphoneConferenceCallEvent; /** * Chat message event. diff --git a/include/linphone/enums/event-log-enums.h b/include/linphone/enums/event-log-enums.h index e5c0c92f8..b6465b7fb 100644 --- a/include/linphone/enums/event-log-enums.h +++ b/include/linphone/enums/event-log-enums.h @@ -24,10 +24,10 @@ #define L_ENUM_VALUES_EVENT_LOG_TYPE(F) \ F(None) \ - F(CallStart) \ - F(CallEnd) \ F(ConferenceCreated) \ F(ConferenceDestroyed) \ + F(ConferenceCallStart) \ + F(ConferenceCallEnd) \ F(ConferenceChatMessage) \ F(ConferenceParticipantAdded) \ F(ConferenceParticipantRemoved) \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a861872d0..8ca281a42 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -93,7 +93,7 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES dial-plan/dial-plan-p.h dial-plan/dial-plan.h enums.h - event-log/call/call-event.h + event-log/conference/conference-call-event.h event-log/conference/conference-event-p.h event-log/conference/conference-event.h event-log/conference/conference-notified-event-p.h @@ -181,7 +181,7 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES db/session/db-session-provider.cpp db/session/db-session.cpp dial-plan/dial-plan.cpp - event-log/call/call-event.cpp + event-log/conference/conference-call-event.cpp event-log/conference/conference-chat-message-event.cpp event-log/conference/conference-event.cpp event-log/conference/conference-notified-event.cpp diff --git a/src/c-wrapper/api/c-event-log.cpp b/src/c-wrapper/api/c-event-log.cpp index b4af02343..94f926e07 100644 --- a/src/c-wrapper/api/c-event-log.cpp +++ b/src/c-wrapper/api/c-event-log.cpp @@ -27,7 +27,7 @@ // ============================================================================= -L_DECLARE_C_OBJECT_IMPL(CallEvent); +L_DECLARE_C_OBJECT_IMPL(ConferenceCallEvent); L_DECLARE_C_OBJECT_IMPL(ConferenceChatMessageEvent); L_DECLARE_C_OBJECT_IMPL(ConferenceEvent); L_DECLARE_C_OBJECT_IMPL(ConferenceParticipantDeviceEvent); @@ -62,22 +62,22 @@ LinphoneEventLogType linphone_event_log_get_type (const LinphoneEventLog *event_ // Call event. // ----------------------------------------------------------------------------- -LinphoneCallEvent *linphone_call_event_new (LinphoneEventLogType type, time_t time, LinphoneCall *call) { - LinphoneCallEvent *call_event = _linphone_CallEvent_init(); +LinphoneConferenceCallEvent *linphone_conference_call_event_new (LinphoneEventLogType type, time_t time, LinphoneCall *call) { + LinphoneConferenceCallEvent *conference_call_event = _linphone_ConferenceCallEvent_init(); L_SET_CPP_PTR_FROM_C_OBJECT( - call_event, - make_shared( + conference_call_event, + make_shared( static_cast(type), time, L_GET_CPP_PTR_FROM_C_OBJECT(call) ) ); - return call_event; + return conference_call_event; } -LinphoneCall *linphone_call_event_get_call (const LinphoneCallEvent *call_event) { +LinphoneCall *linphone_conference_call_event_get_call (const LinphoneConferenceCallEvent *conference_call_event) { return L_GET_C_BACK_PTR( - L_GET_CPP_PTR_FROM_C_OBJECT(call_event)->getCall() + L_GET_CPP_PTR_FROM_C_OBJECT(conference_call_event)->getCall() ); } diff --git a/src/c-wrapper/c-wrapper.h b/src/c-wrapper/c-wrapper.h index 7f7ebcb8e..1cb7063a6 100644 --- a/src/c-wrapper/c-wrapper.h +++ b/src/c-wrapper/c-wrapper.h @@ -34,9 +34,9 @@ #define L_REGISTER_TYPES(F) \ F(Address, Address) \ F(Call, Call) \ - F(CallEvent, CallEvent) \ F(ChatMessage, ChatMessage) \ F(ChatRoom, ChatRoom) \ + F(ConferenceCallEvent, ConferenceCallEvent) \ F(ConferenceChatMessageEvent, ConferenceChatMessageEvent) \ F(ConferenceEvent, ConferenceEvent) \ F(ConferenceNotifiedEvent, ConferenceNotifiedEvent) \ diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp index d580b9993..732971b5a 100644 --- a/src/db/main-db.cpp +++ b/src/db/main-db.cpp @@ -219,8 +219,8 @@ MainDb::MainDb () : AbstractDb(*new MainDbPrivate) {} case EventLog::Type::ConferenceDestroyed: return selectConferenceEvent(eventId, type, date, peerAddress); - case EventLog::Type::CallStart: - case EventLog::Type::CallEnd: + case EventLog::Type::ConferenceCallStart: + case EventLog::Type::ConferenceCallEnd: return selectConferenceCallEvent(eventId, type, date, peerAddress); case EventLog::Type::ConferenceChatMessage: @@ -734,20 +734,20 @@ MainDb::MainDb () : AbstractDb(*new MainDbPrivate) {} case EventLog::Type::None: return false; - case EventLog::Type::ConferenceChatMessage: - d->insertConferenceChatMessageEvent(eventLog); - break; - - case EventLog::Type::CallStart: - case EventLog::Type::CallEnd: - d->insertConferenceCallEvent(eventLog); - break; - case EventLog::Type::ConferenceCreated: case EventLog::Type::ConferenceDestroyed: d->insertConferenceEvent(eventLog); break; + case EventLog::Type::ConferenceCallStart: + case EventLog::Type::ConferenceCallEnd: + d->insertConferenceCallEvent(eventLog); + break; + + case EventLog::Type::ConferenceChatMessage: + d->insertConferenceChatMessageEvent(eventLog); + break; + case EventLog::Type::ConferenceParticipantAdded: case EventLog::Type::ConferenceParticipantRemoved: case EventLog::Type::ConferenceParticipantSetAdmin: diff --git a/src/event-log/call/call-event.cpp b/src/event-log/conference/conference-call-event.cpp similarity index 73% rename from src/event-log/call/call-event.cpp rename to src/event-log/conference/conference-call-event.cpp index a63dcc3ad..4aea7b025 100644 --- a/src/event-log/call/call-event.cpp +++ b/src/event-log/conference/conference-call-event.cpp @@ -1,5 +1,5 @@ /* - * call-event.cpp + * conference-call-event.cpp * Copyright (C) 2010-2017 Belledonne Communications SARL * * This program is free software; you can redistribute it and/or @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "call-event.h" +#include "conference-call-event.h" #include "event-log/event-log-p.h" // ============================================================================= @@ -26,22 +26,22 @@ using namespace std; LINPHONE_BEGIN_NAMESPACE -class CallEventPrivate : public EventLogPrivate { +class ConferenceCallEventPrivate : public EventLogPrivate { public: shared_ptr call; }; // ----------------------------------------------------------------------------- -CallEvent::CallEvent (Type type, time_t time, const shared_ptr &call) : - EventLog(*new CallEventPrivate, type, time) { +ConferenceCallEvent::ConferenceCallEvent (Type type, time_t time, const shared_ptr &call) : + EventLog(*new ConferenceCallEventPrivate, type, time) { L_D(); L_ASSERT(call); - L_ASSERT(type == Type::CallStart || type == Type::CallEnd); + L_ASSERT(type == Type::ConferenceCallStart || type == Type::ConferenceCallEnd); d->call = call; } -shared_ptr CallEvent::getCall () const { +shared_ptr ConferenceCallEvent::getCall () const { L_D(); return d->call; } diff --git a/src/event-log/call/call-event.h b/src/event-log/conference/conference-call-event.h similarity index 72% rename from src/event-log/call/call-event.h rename to src/event-log/conference/conference-call-event.h index 426f49a4e..f2e58b893 100644 --- a/src/event-log/call/call-event.h +++ b/src/event-log/conference/conference-call-event.h @@ -1,5 +1,5 @@ /* - * call-event.h + * conference-call-event.h * Copyright (C) 2010-2017 Belledonne Communications SARL * * This program is free software; you can redistribute it and/or @@ -17,8 +17,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _CALL_EVENT_H_ -#define _CALL_EVENT_H_ +#ifndef _CONFERENCE_CALL_EVENT_H_ +#define _CONFERENCE_CALL_EVENT_H_ #include @@ -29,19 +29,19 @@ LINPHONE_BEGIN_NAMESPACE class Call; -class CallEventPrivate; +class ConferenceCallEventPrivate; -class LINPHONE_PUBLIC CallEvent : public EventLog { +class LINPHONE_PUBLIC ConferenceCallEvent : public EventLog { public: - CallEvent (Type type, std::time_t time, const std::shared_ptr &call); + ConferenceCallEvent (Type type, std::time_t time, const std::shared_ptr &call); std::shared_ptr getCall () const; private: - L_DECLARE_PRIVATE(CallEvent); - L_DISABLE_COPY(CallEvent); + L_DECLARE_PRIVATE(ConferenceCallEvent); + L_DISABLE_COPY(ConferenceCallEvent); }; LINPHONE_END_NAMESPACE -#endif // ifndef _CALL_EVENT_H_ +#endif // ifndef _CONFERENCE_CALL_EVENT_H_ diff --git a/src/event-log/events.h b/src/event-log/events.h index bc6b8bab9..2722deb8a 100644 --- a/src/event-log/events.h +++ b/src/event-log/events.h @@ -20,7 +20,7 @@ #ifndef _EVENTS_H_ #define _EVENTS_H_ -#include "call/call-event.h" +#include "conference/conference-call-event.h" #include "conference/conference-chat-message-event.h" #include "conference/conference-participant-device-event.h" #include "conference/conference-subject-event.h"