summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@freedesktop.org>2012-06-28 15:51:51 +0200
committerDebarshi Ray <debarshir@freedesktop.org>2012-08-28 19:30:24 +0200
commit56eff0cc3512b4da98e7c27842e20263b652b721 (patch)
treeb785c75591949865f04565b9ed02d5574d9fc63d
parent26b9c953a4260f0fccba683741a84e7bb4fcb274 (diff)
downloadtelepathy-logger-56eff0cc3512b4da98e7c27842e20263b652b721.tar.gz
log-store: Add a create_iter pure virtual method
Fixes: https://bugs.freedesktop.org/41772
-rw-r--r--telepathy-logger/log-store-internal.h7
-rw-r--r--telepathy-logger/log-store.c17
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)
{