Commit 8d114ecd authored by Ronan's avatar Ronan
Browse files

feat(c-wrapper/api): events interface => OK

parent ce4d73d8
......@@ -26,6 +26,10 @@
using namespace std;
extern "C" {
// -----------------------------------------------------------------------------
// Event log.
// -----------------------------------------------------------------------------
L_DECLARE_C_STRUCT_IMPL(EventLog, event_log);
L_DECLARE_C_STRUCT_NEW_DEFAULT(EventLog, event_log);
......@@ -34,6 +38,10 @@ LinphoneEventLogType linphone_event_log_get_type (const LinphoneEventLog *eventL
return static_cast<LinphoneEventLogType>(eventLog->cppPtr->getType());
}
// -----------------------------------------------------------------------------
// Message event.
// -----------------------------------------------------------------------------
L_DECLARE_C_STRUCT_IMPL(MessageEvent, message_event);
LinphoneMessageEvent *linphone_message_event_new (LinphoneMessage *message) {
......@@ -47,3 +55,59 @@ LinphoneMessage *linphone_message_event_get_message (const LinphoneMessageEvent
// TODO.
return nullptr;
}
// -----------------------------------------------------------------------------
// Call event.
// -----------------------------------------------------------------------------
// L_DECLARE_C_STRUCT_IMPL(CallEvent, call_event);
LinphoneCallEvent *linphone_call_event_new (LinphoneEventLogType type, LinphoneCall *call) {
// TODO.
return nullptr;
}
LinphoneCall *linphone_call_event_get_call (const LinphoneCallEvent *call_event) {
// TODO.
return nullptr;
}
// -----------------------------------------------------------------------------
// Conference event.
// -----------------------------------------------------------------------------
// L_DECLARE_C_STRUCT_IMPL(ConferenceEvent, conference_event);
LinphoneConferenceEvent *linphone_conference_event_new (
LinphoneEventLogType type,
const LinphoneAddress *address
) {
// TODO.
return nullptr;
}
const LinphoneAddress *linphone_conference_event_get_address (const LinphoneConferenceEvent *conference_event) {
// TODO.
return nullptr;
}
// -----------------------------------------------------------------------------
// Conference participant event.
// -----------------------------------------------------------------------------
// L_DECLARE_C_STRUCT_IMPL(ConferenceParticipantEvent, conference_participant_event);
LinphoneConferenceParticipantEvent *linphone_conference_participant_event_new (
LinphoneEventLogType type,
const LinphoneAddress *conference_address,
const LinphoneAddress *participant_address
) {
// TODO.
return nullptr;
}
const LinphoneAddress *linphone_conference_participant_event_get_participant_address (const LinphoneConferenceParticipantEvent *conference_participant_event) {
// TODO.
return nullptr;
}
}
......@@ -23,6 +23,7 @@
// =============================================================================
extern "C" {
LINPHONE_PUBLIC LinphoneEventLog *linphone_event_log_new ();
LINPHONE_PUBLIC LinphoneEventLogType linphone_event_log_get_type (const LinphoneEventLog *event_log);
......@@ -34,7 +35,7 @@ LINPHONE_PUBLIC LinphoneConferenceEvent *linphone_conference_event_new (
const LinphoneAddress *address
);
LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_event_get_address ();
LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_event_get_address (const LinphoneConferenceEvent *conference_event);
LINPHONE_PUBLIC LinphoneConferenceParticipantEvent *linphone_conference_participant_event_new (
LinphoneEventLogType type,
......@@ -42,9 +43,10 @@ LINPHONE_PUBLIC LinphoneConferenceParticipantEvent *linphone_conference_particip
const LinphoneAddress *participantAddress
);
LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_participant_event_get_participant_address ();
LINPHONE_PUBLIC const LinphoneAddress *linphone_conference_participant_event_get_participant_address (const LinphoneConferenceParticipantEvent *conference_participant_event);
LINPHONE_PUBLIC LinphoneMessageEvent *linphone_message_event_new (LinphoneMessage *message);
LINPHONE_PUBLIC LinphoneMessage *linphone_message_event_get_message (const LinphoneMessageEvent *message_event);
}
#endif // ifndef _C_EVENT_LOG_H_
......@@ -52,7 +52,7 @@
);
#define L_DECLARE_C_STRUCT_NEW_DEFAULT(STRUCT, C_NAME) \
Linphone ## STRUCT * CNAME ## _new() { \
Linphone ## STRUCT * linphone_ ## C_NAME ## _new() { \
Linphone ## STRUCT * object = _linphone_ ## C_NAME ## _init(); \
object->cppPtr = make_shared<LINPHONE_NAMESPACE::STRUCT>(); \
return object; \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment