forked from mirrors/linphone-iphone
feat(EventLog): provide a way to delete event in public interface
This commit is contained in:
parent
91a64a7462
commit
52d7652e28
4 changed files with 20 additions and 0 deletions
|
|
@ -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.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue