telepathy-logger: log-store: Add a create_iter pure virtual method
Nicolas Dufresne
nicolasd at kemper.freedesktop.org
Tue Aug 28 13:01:03 PDT 2012
Module: telepathy-logger
Branch: master
Commit: 56eff0cc3512b4da98e7c27842e20263b652b721
URL: http://cgit.freedesktop.org/telepathy/telepathy-logger/commit/?id=56eff0cc3512b4da98e7c27842e20263b652b721
Author: Debarshi Ray <debarshir at freedesktop.org>
Date: Thu Jun 28 15:51:51 2012 +0200
log-store: Add a create_iter pure virtual method
Fixes: https://bugs.freedesktop.org/41772
---
telepathy-logger/log-store-internal.h | 7 +++++++
telepathy-logger/log-store.c | 17 +++++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/telepathy-logger/log-store-internal.h b/telepathy-logger/log-store-internal.h
index 1003656..aa08474 100644
--- a/telepathy-logger/log-store-internal.h
+++ b/telepathy-logger/log-store-internal.h
@@ -26,6 +26,7 @@
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-logger/event.h>
+#include <telepathy-logger/log-iter-internal.h>
#include <telepathy-logger/log-manager.h>
G_BEGIN_DECLS
@@ -80,6 +81,9 @@ typedef struct
void (*clear_account) (TplLogStore *self, TpAccount *account);
void (*clear_entity) (TplLogStore *self, TpAccount *account,
TplEntity *entity);
+ TplLogIter * (*create_iter) (TplLogStore *self, TpAccount *account,
+ TplEntity *target, gint type_mask, TplLogEventFilter filter,
+ gpointer filter_data);
} TplLogStoreInterface;
GType _tpl_log_store_get_type (void);
@@ -105,6 +109,9 @@ void _tpl_log_store_clear (TplLogStore *self);
void _tpl_log_store_clear_account (TplLogStore *self, TpAccount *account);
void _tpl_log_store_clear_entity (TplLogStore *self, TpAccount *account,
TplEntity *entity);
+TplLogIter * _tpl_log_store_create_iter (TplLogStore *self,
+ TpAccount *account, TplEntity *target, gint type_mask,
+ TplLogEventFilter filter, gpointer filter_data);
gboolean _tpl_log_store_is_writable (TplLogStore *self);
gboolean _tpl_log_store_is_readable (TplLogStore *self);
diff --git a/telepathy-logger/log-store.c b/telepathy-logger/log-store.c
index d94918e..73f0fd6 100644
--- a/telepathy-logger/log-store.c
+++ b/telepathy-logger/log-store.c
@@ -360,6 +360,23 @@ _tpl_log_store_clear_entity (TplLogStore *self,
}
+TplLogIter *
+_tpl_log_store_create_iter (TplLogStore *self,
+ TpAccount *account,
+ TplEntity *target,
+ gint type_mask,
+ TplLogEventFilter filter,
+ gpointer filter_data)
+{
+ g_return_val_if_fail (TPL_IS_LOG_STORE (self), NULL);
+ if (TPL_LOG_STORE_GET_INTERFACE (self)->create_iter == NULL)
+ return NULL;
+
+ return TPL_LOG_STORE_GET_INTERFACE (self)->create_iter (self,
+ account, target, type_mask, filter, filter_data);
+}
+
+
gboolean
_tpl_log_store_is_writable (TplLogStore *self)
{
More information about the telepathy-commits
mailing list