From 1822de2ede71f32d9ca173a78d3a2856abc7023e Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 8 Jan 2014 12:03:51 +0100 Subject: [PATCH 03/12] log stores: add constructor helpers --- telepathy-logger/log-store-empathy-internal.h | 2 ++ telepathy-logger/log-store-empathy.c | 7 +++++++ telepathy-logger/log-store-pidgin-internal.h | 2 ++ telepathy-logger/log-store-pidgin.c | 7 +++++++ telepathy-logger/log-store-xml-internal.h | 4 ++++ telepathy-logger/log-store-xml.c | 7 +++++++ 6 files changed, 29 insertions(+) diff --git a/telepathy-logger/log-store-empathy-internal.h b/telepathy-logger/log-store-empathy-internal.h index e4645bd..c27788f 100644 --- a/telepathy-logger/log-store-empathy-internal.h +++ b/telepathy-logger/log-store-empathy-internal.h @@ -35,6 +35,8 @@ struct _TplLogStoreEmpathy { GType _tpl_log_store_empathy_get_type (void); +TplLogStore * _tpl_log_store_empathy_new (void); + /* TYPE MACROS */ #define TPL_TYPE_LOG_STORE_EMPATHY \ (_tpl_log_store_empathy_get_type ()) diff --git a/telepathy-logger/log-store-empathy.c b/telepathy-logger/log-store-empathy.c index 651c721..d83df57 100644 --- a/telepathy-logger/log-store-empathy.c +++ b/telepathy-logger/log-store-empathy.c @@ -65,3 +65,10 @@ log_store_iface_init (gpointer g_iface, * ones. */ iface->add_event = NULL; } + +TplLogStore * +_tpl_log_store_empathy_new (void) +{ + return g_object_new (TPL_TYPE_LOG_STORE_EMPATHY, + NULL); +} diff --git a/telepathy-logger/log-store-pidgin-internal.h b/telepathy-logger/log-store-pidgin-internal.h index abe214e..1de9872 100644 --- a/telepathy-logger/log-store-pidgin-internal.h +++ b/telepathy-logger/log-store-pidgin-internal.h @@ -58,6 +58,8 @@ typedef struct GType tpl_log_store_pidgin_get_type (void); +TplLogStore * _tpl_log_store_pidgin_new (void); + G_END_DECLS #endif /* __TPL_LOG_STORE_PIDGIN_H__ */ diff --git a/telepathy-logger/log-store-pidgin.c b/telepathy-logger/log-store-pidgin.c index d5308af..0d12eb2 100644 --- a/telepathy-logger/log-store-pidgin.c +++ b/telepathy-logger/log-store-pidgin.c @@ -1156,3 +1156,10 @@ log_store_iface_init (gpointer g_iface, iface->get_filtered_events = log_store_pidgin_get_filtered_events; iface->create_iter = log_store_pidgin_create_iter; } + +TplLogStore * +_tpl_log_store_pidgin_new (void) +{ + return g_object_new (TPL_TYPE_LOG_STORE_PIDGIN, + NULL); +} diff --git a/telepathy-logger/log-store-xml-internal.h b/telepathy-logger/log-store-xml-internal.h index 4351936..4e8748a 100644 --- a/telepathy-logger/log-store-xml-internal.h +++ b/telepathy-logger/log-store-xml-internal.h @@ -26,6 +26,8 @@ #include #include +#include "telepathy-logger/log-store-internal.h" + G_BEGIN_DECLS #define TPL_TYPE_LOG_STORE_XML \ (_tpl_log_store_xml_get_type ()) @@ -58,5 +60,7 @@ typedef struct GType _tpl_log_store_xml_get_type (void); +TplLogStore * _tpl_log_store_xml_new (void); + G_END_DECLS #endif /* __TPL_LOG_STORE_XML_H__ */ diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c index f3bb2c8..268189a 100644 --- a/telepathy-logger/log-store-xml.c +++ b/telepathy-logger/log-store-xml.c @@ -1927,3 +1927,10 @@ log_store_iface_init (gpointer g_iface, iface->clear_entity = log_store_xml_clear_entity; iface->create_iter = log_store_xml_create_iter; } + +TplLogStore * +_tpl_log_store_xml_new (void) +{ + return g_object_new (TPL_TYPE_LOG_STORE_XML, + NULL); +} -- 1.8.4.2