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
52d7652e
Commit
52d7652e
authored
Nov 29, 2017
by
Ronan
Browse files
feat(EventLog): provide a way to delete event in public interface
parent
91a64a74
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
+20
-0
include/linphone/api/c-event-log.h
include/linphone/api/c-event-log.h
+6
-0
src/c-wrapper/api/c-event-log.cpp
src/c-wrapper/api/c-event-log.cpp
+4
-0
src/event-log/event-log.cpp
src/event-log/event-log.cpp
+7
-0
src/event-log/event-log.h
src/event-log/event-log.h
+3
-0
No files found.
include/linphone/api/c-event-log.h
View file @
52d7652e
...
...
@@ -61,6 +61,12 @@ LINPHONE_PUBLIC LinphoneEventLogType linphone_event_log_get_type (const Linphone
*/
LINPHONE_PUBLIC
time_t
linphone_event_log_get_creation_time
(
const
LinphoneEventLog
*
event_log
);
/**
* Delete event log from database.
* @param[in] event_log A #LinphoneEventLog object
*/
LINPHONE_PUBLIC
void
linphone_event_log_delete_from_database
(
LinphoneEventLog
*
event_log
);
// -----------------------------------------------------------------------------
// ConferenceEvent.
// -----------------------------------------------------------------------------
...
...
src/c-wrapper/api/c-event-log.cpp
View file @
52d7652e
...
...
@@ -190,6 +190,10 @@ time_t linphone_event_log_get_creation_time (const LinphoneEventLog *event_log)
return
L_GET_CPP_PTR_FROM_C_OBJECT
(
event_log
)
->
getCreationTime
();
}
void
linphone_event_log_delete_from_database
(
LinphoneEventLog
*
event_log
)
{
LinphonePrivate
::
EventLog
::
deleteFromDatabase
(
L_GET_CPP_PTR_FROM_C_OBJECT
(
event_log
));
}
// -----------------------------------------------------------------------------
// ConferenceEvent.
// -----------------------------------------------------------------------------
...
...
src/event-log/event-log.cpp
View file @
52d7652e
...
...
@@ -17,10 +17,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "db/main-db.h"
#include "event-log-p.h"
// =============================================================================
using
namespace
std
;
LINPHONE_BEGIN_NAMESPACE
EventLog
::
EventLog
()
:
BaseObject
(
*
new
EventLogPrivate
)
{}
...
...
@@ -41,4 +44,8 @@ time_t EventLog::getCreationTime () const {
return
d
->
creationTime
;
}
void
EventLog
::
deleteFromDatabase
(
const
shared_ptr
<
EventLog
>
&
eventLog
)
{
MainDb
::
deleteEvent
(
eventLog
);
}
LINPHONE_END_NAMESPACE
src/event-log/event-log.h
View file @
52d7652e
...
...
@@ -21,6 +21,7 @@
#define _EVENT_LOG_H_
#include <ctime>
#include <memory>
#include "linphone/enums/event-log-enums.h"
#include "linphone/utils/enum-generator.h"
...
...
@@ -45,6 +46,8 @@ public:
Type
getType
()
const
;
time_t
getCreationTime
()
const
;
static
void
deleteFromDatabase
(
const
std
::
shared_ptr
<
EventLog
>
&
eventLog
);
protected:
EventLog
(
EventLogPrivate
&
p
,
Type
type
,
time_t
creationTime
);
...
...
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