Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
8d114ecd
Commit
8d114ecd
authored
Aug 30, 2017
by
Ronan
Browse files
feat(c-wrapper/api): events interface => OK
parent
ce4d73d8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
3 deletions
+69
-3
src/c-wrapper/api/c-event-log.cpp
src/c-wrapper/api/c-event-log.cpp
+64
-0
src/c-wrapper/api/c-event-log.h
src/c-wrapper/api/c-event-log.h
+4
-2
src/c-wrapper/c-tools.h
src/c-wrapper/c-tools.h
+1
-1
No files found.
src/c-wrapper/api/c-event-log.cpp
View file @
8d114ecd
...
...
@@ -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
;
}
}
src/c-wrapper/api/c-event-log.h
View file @
8d114ecd
...
...
@@ -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_
src/c-wrapper/c-tools.h
View file @
8d114ecd
...
...
@@ -52,7 +52,7 @@
);
#define L_DECLARE_C_STRUCT_NEW_DEFAULT(STRUCT, C_NAME) \
Linphone ## STRUCT *
C
NAME ## _new() { \
Linphone ## STRUCT *
linphone_ ## C_
NAME ## _new() { \
Linphone ## STRUCT * object = _linphone_ ## C_NAME ## _init(); \
object->cppPtr = make_shared<LINPHONE_NAMESPACE::STRUCT>(); \
return object; \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment