summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-04 15:10:10 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-04 16:11:30 +0200
commitc046eb6f328f5c1033ba7ff58dd8f37b9ffc0024 (patch)
tree49c4b42266c9e792f0c70a69df80ad8bea5bb783
parenta96051663fe79f9dfa8b9d9b67fc41392578dc9d (diff)
log-store: prefix internal API with underscore
-rw-r--r--telepathy-logger/log-manager.c30
-rw-r--r--telepathy-logger/log-store-internal.h28
-rw-r--r--telepathy-logger/log-store.c46
3 files changed, 52 insertions, 52 deletions
diff --git a/telepathy-logger/log-manager.c b/telepathy-logger/log-manager.c
index 2835ab78a..9e9e90b8a 100644
--- a/telepathy-logger/log-manager.c
+++ b/telepathy-logger/log-manager.c
@@ -241,12 +241,12 @@ _tpl_log_manager_add_message (TplLogManager *manager,
TplLogStore *store = l->data;
gboolean result;
- result = tpl_log_store_add_message (store, message, &loc_error);
+ result = _tpl_log_store_add_message (store, message, &loc_error);
if (!result)
{
CRITICAL ("logstore name=%s: %s. "
"Event may not be logged properly.",
- tpl_log_store_get_name (store), loc_error->message);
+ _tpl_log_store_get_name (store), loc_error->message);
g_clear_error (&loc_error);
}
/* TRUE if at least one LogStore succeeds */
@@ -294,9 +294,9 @@ _tpl_log_manager_register_log_store (TplLogManager *self,
for (l = priv->stores; l != NULL; l = g_list_next (l))
{
TplLogStore *store = l->data;
- const gchar *name = tpl_log_store_get_name (logstore);
+ const gchar *name = _tpl_log_store_get_name (logstore);
- if (!tp_strdiff (name, tpl_log_store_get_name (store)))
+ if (!tp_strdiff (name, _tpl_log_store_get_name (store)))
{
found = TRUE;
break;
@@ -304,20 +304,20 @@ _tpl_log_manager_register_log_store (TplLogManager *self,
}
if (found)
{
- DEBUG ("name=%s: already registered", tpl_log_store_get_name (logstore));
+ DEBUG ("name=%s: already registered", _tpl_log_store_get_name (logstore));
return FALSE;
}
- if (tpl_log_store_is_readable (logstore))
+ if (_tpl_log_store_is_readable (logstore))
priv->readable_stores = g_list_prepend (priv->readable_stores, logstore);
- if (tpl_log_store_is_writable (logstore))
+ if (_tpl_log_store_is_writable (logstore))
priv->writable_stores = g_list_prepend (priv->writable_stores, logstore);
/* reference just once, writable/readable lists are kept in sync with the
* general list and never written separatedly */
priv->stores = g_list_prepend (priv->stores, g_object_ref (logstore));
- DEBUG ("LogStore name=%s registered", tpl_log_store_get_name (logstore));
+ DEBUG ("LogStore name=%s registered", _tpl_log_store_get_name (logstore));
return TRUE;
}
@@ -354,7 +354,7 @@ tpl_log_manager_exists (TplLogManager *manager,
for (l = priv->stores; l != NULL; l = g_list_next (l))
{
- if (tpl_log_store_exists (TPL_LOG_STORE (l->data),
+ if (_tpl_log_store_exists (TPL_LOG_STORE (l->data),
account, chat_id, chatroom))
return TRUE;
}
@@ -403,7 +403,7 @@ _tpl_log_manager_get_dates (TplLogManager *manager,
/* Insert dates of each store in the out list. Keep the out list sorted
* and avoid to insert dups. */
- new = tpl_log_store_get_dates (store, account, chat_id, chatroom);
+ new = _tpl_log_store_get_dates (store, account, chat_id, chatroom);
while (new)
{
if (g_list_find_custom (out, new->data,
@@ -441,7 +441,7 @@ _tpl_log_manager_get_messages_for_date (TplLogManager *manager,
{
TplLogStore *store = TPL_LOG_STORE (l->data);
- out = g_list_concat (out, tpl_log_store_get_messages_for_date (store,
+ out = g_list_concat (out, _tpl_log_store_get_messages_for_date (store,
account, chat_id, chatroom, date));
}
@@ -495,7 +495,7 @@ _tpl_log_manager_get_filtered_messages (TplLogManager *manager,
TplLogStore *store = TPL_LOG_STORE (l->data);
GList *new;
- new = tpl_log_store_get_filtered_messages (store, account, chat_id,
+ new = _tpl_log_store_get_filtered_messages (store, account, chat_id,
chatroom, num_messages, filter, user_data);
while (new != NULL)
{
@@ -608,7 +608,7 @@ _tpl_log_manager_get_chats (TplLogManager *manager,
GList *in;
/* merge the lists avoiding duplicates */
- for (in = tpl_log_store_get_chats (store, account);
+ for (in = _tpl_log_store_get_chats (store, account);
in != NULL;
in = g_list_next (in))
{
@@ -652,7 +652,7 @@ _tpl_log_manager_search_in_identifier_chats_new (TplLogManager *manager,
TplLogStore *store = TPL_LOG_STORE (l->data);
out = g_list_concat (out,
- tpl_log_store_search_in_identifier_chats_new
+ _tpl_log_store_search_in_identifier_chats_new
(store, account, identifier, text));
}
@@ -676,7 +676,7 @@ _tpl_log_manager_search (TplLogManager *manager,
{
TplLogStore *store = TPL_LOG_STORE (l->data);
- out = g_list_concat (out, tpl_log_store_search_new (store, text));
+ out = g_list_concat (out, _tpl_log_store_search_new (store, text));
}
return out;
diff --git a/telepathy-logger/log-store-internal.h b/telepathy-logger/log-store-internal.h
index 8266b74b9..e34eed60d 100644
--- a/telepathy-logger/log-store-internal.h
+++ b/telepathy-logger/log-store-internal.h
@@ -32,7 +32,7 @@
G_BEGIN_DECLS
-#define TPL_TYPE_LOG_STORE (tpl_log_store_get_type ())
+#define TPL_TYPE_LOG_STORE (_tpl_log_store_get_type ())
#define TPL_LOG_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
TPL_TYPE_LOG_STORE, TplLogStore))
#define TPL_IS_LOG_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
@@ -82,29 +82,29 @@ typedef struct
TplLogMessageFilter filter, gpointer user_data);
} TplLogStoreInterface;
-GType tpl_log_store_get_type (void);
+GType _tpl_log_store_get_type (void);
-const gchar *tpl_log_store_get_name (TplLogStore *self);
-gboolean tpl_log_store_exists (TplLogStore *self, TpAccount *account,
+const gchar * _tpl_log_store_get_name (TplLogStore *self);
+gboolean _tpl_log_store_exists (TplLogStore *self, TpAccount *account,
const gchar *chat_id, gboolean chatroom);
-gboolean tpl_log_store_add_message (TplLogStore *self, TplLogEntry *message,
+gboolean _tpl_log_store_add_message (TplLogStore *self, TplLogEntry *message,
GError **error);
-GList *tpl_log_store_get_dates (TplLogStore *self, TpAccount *account,
+GList * _tpl_log_store_get_dates (TplLogStore *self, TpAccount *account,
const gchar *chat_id, gboolean chatroom);
-GList *tpl_log_store_get_messages_for_date (TplLogStore *self,
+GList * _tpl_log_store_get_messages_for_date (TplLogStore *self,
TpAccount *account, const gchar *chat_id, gboolean chatroom,
const GDate *date);
-GList *tpl_log_store_get_recent_messages (TplLogStore *self,
+GList * _tpl_log_store_get_recent_messages (TplLogStore *self,
TpAccount *account, const gchar *chat_id, gboolean chatroom);
-GList *tpl_log_store_get_chats (TplLogStore *self, TpAccount *account);
-GList *tpl_log_store_search_in_identifier_chats_new (TplLogStore *self,
+GList * _tpl_log_store_get_chats (TplLogStore *self, TpAccount *account);
+GList * _tpl_log_store_search_in_identifier_chats_new (TplLogStore *self,
TpAccount *account, const gchar *identifier, const gchar *text);
-GList *tpl_log_store_search_new (TplLogStore *self, const gchar *text);
-GList *tpl_log_store_get_filtered_messages (TplLogStore *self,
+GList * _tpl_log_store_search_new (TplLogStore *self, const gchar *text);
+GList * _tpl_log_store_get_filtered_messages (TplLogStore *self,
TpAccount *account, const gchar *chat_id, gboolean chatroom,
guint num_messages, TplLogMessageFilter filter, gpointer user_data);
-gboolean tpl_log_store_is_writable (TplLogStore *self);
-gboolean tpl_log_store_is_readable (TplLogStore *self);
+gboolean _tpl_log_store_is_writable (TplLogStore *self);
+gboolean _tpl_log_store_is_readable (TplLogStore *self);
G_END_DECLS
diff --git a/telepathy-logger/log-store.c b/telepathy-logger/log-store.c
index 98989612c..b01a4fa80 100644
--- a/telepathy-logger/log-store.c
+++ b/telepathy-logger/log-store.c
@@ -39,10 +39,10 @@
* implement in order to be used into a #TplLogManager.
*/
-static void tpl_log_store_init (gpointer g_iface);
+static void _tpl_log_store_init (gpointer g_iface);
GType
-tpl_log_store_get_type (void)
+_tpl_log_store_get_type (void)
{
static GType type = 0;
if (type == 0)
@@ -51,7 +51,7 @@ tpl_log_store_get_type (void)
sizeof (TplLogStoreInterface),
NULL, /* base_init */
NULL, /* base_finalize */
- (GClassInitFunc) tpl_log_store_init, /* class_init */
+ (GClassInitFunc) _tpl_log_store_init, /* class_init */
NULL, /* class_finalize */
NULL, /* class_data */
0,
@@ -65,7 +65,7 @@ tpl_log_store_get_type (void)
}
static void
-tpl_log_store_init (gpointer g_iface)
+_tpl_log_store_init (gpointer g_iface)
{
g_object_interface_install_property (g_iface,
g_param_spec_string ("name",
@@ -109,7 +109,7 @@ tpl_log_store_init (gpointer g_iface)
}
const gchar *
-tpl_log_store_get_name (TplLogStore *self)
+_tpl_log_store_get_name (TplLogStore *self)
{
g_return_val_if_fail (TPL_IS_LOG_STORE (self), NULL);
if (!TPL_LOG_STORE_GET_INTERFACE (self)->get_name)
@@ -120,7 +120,7 @@ tpl_log_store_get_name (TplLogStore *self)
gboolean
-tpl_log_store_exists (TplLogStore *self,
+_tpl_log_store_exists (TplLogStore *self,
TpAccount *account,
const gchar *chat_id,
gboolean chatroom)
@@ -135,7 +135,7 @@ tpl_log_store_exists (TplLogStore *self,
/**
- * tpl_log_store_add_message:
+ * _tpl_log_store_add_message:
* @self: a TplLogStore
* @message: an instance of a subclass of TplLogEntry (ie TplLogEntryText)
* @error: memory location used if an error occurs
@@ -145,7 +145,7 @@ tpl_log_store_exists (TplLogStore *self,
* Returns: %TRUE if succeeds, %FALSE with @error set otherwise
*/
gboolean
-tpl_log_store_add_message (TplLogStore *self,
+_tpl_log_store_add_message (TplLogStore *self,
TplLogEntry *message,
GError **error)
{
@@ -166,7 +166,7 @@ tpl_log_store_add_message (TplLogStore *self,
/**
- * tpl_log_store_get_dates:
+ * _tpl_log_store_get_dates:
* @self: a TplLogStore
* @account: a TpAccount
* @chat_id: a non-NULL chat identifier
@@ -182,7 +182,7 @@ tpl_log_store_add_message (TplLogStore *self,
* g_list_free (lst);
*/
GList *
-tpl_log_store_get_dates (TplLogStore *self,
+_tpl_log_store_get_dates (TplLogStore *self,
TpAccount *account,
const gchar *chat_id,
gboolean chatroom)
@@ -197,7 +197,7 @@ tpl_log_store_get_dates (TplLogStore *self,
/**
- * tpl_log_store_get_messages_for_date:
+ * _tpl_log_store_get_messages_for_date:
* @self: a TplLogStore
* @account: a TpAccount
* @chat_id: a non-NULL chat identifier
@@ -211,7 +211,7 @@ tpl_log_store_get_dates (TplLogStore *self,
* g_list_free (lst);
*/
GList *
-tpl_log_store_get_messages_for_date (TplLogStore *self,
+_tpl_log_store_get_messages_for_date (TplLogStore *self,
TpAccount *account,
const gchar *chat_id,
gboolean chatroom,
@@ -227,7 +227,7 @@ tpl_log_store_get_messages_for_date (TplLogStore *self,
GList *
-tpl_log_store_get_recent_messages (TplLogStore *self,
+_tpl_log_store_get_recent_messages (TplLogStore *self,
TpAccount *account,
const gchar *chat_id,
gboolean chatroom)
@@ -242,7 +242,7 @@ tpl_log_store_get_recent_messages (TplLogStore *self,
/**
- * tpl_log_store_get_chats:
+ * _tpl_log_store_get_chats:
* @self: a TplLogStore
* @account: a TpAccount
*
@@ -254,7 +254,7 @@ tpl_log_store_get_recent_messages (TplLogStore *self,
* g_list_free (lst);
*/
GList *
-tpl_log_store_get_chats (TplLogStore *self,
+_tpl_log_store_get_chats (TplLogStore *self,
TpAccount *account)
{
g_return_val_if_fail (TPL_IS_LOG_STORE (self), NULL);
@@ -266,7 +266,7 @@ tpl_log_store_get_chats (TplLogStore *self,
/**
- * tpl_log_store_search_in_identifier_chats_new:
+ * _tpl_log_store_search_in_identifier_chats_new:
* @self: a TplLogStore
* @account: a TpAccount
* @chat_id: a chat_id
@@ -279,7 +279,7 @@ tpl_log_store_get_chats (TplLogStore *self,
* g_list_free (lst);
*/
GList *
-tpl_log_store_search_in_identifier_chats_new (TplLogStore *self,
+_tpl_log_store_search_in_identifier_chats_new (TplLogStore *self,
TpAccount *account,
const gchar *chat_id,
const gchar *text)
@@ -295,7 +295,7 @@ tpl_log_store_search_in_identifier_chats_new (TplLogStore *self,
/**
- * tpl_log_store_search_new:
+ * _tpl_log_store_search_new:
* @self: a TplLogStore
* @text: a text to be searched among @chat_id messages
*
@@ -307,7 +307,7 @@ tpl_log_store_search_in_identifier_chats_new (TplLogStore *self,
* g_list_free (lst);
*/
GList *
-tpl_log_store_search_new (TplLogStore *self,
+_tpl_log_store_search_new (TplLogStore *self,
const gchar *text)
{
g_return_val_if_fail (TPL_IS_LOG_STORE (self), NULL);
@@ -319,7 +319,7 @@ tpl_log_store_search_new (TplLogStore *self,
/**
- * tpl_log_store_search_in_identifier_chats_new:
+ * _tpl_log_store_search_in_identifier_chats_new:
* @self: a TplLogStore
* @account: a TpAccount
* @chat_id: a chat_id
@@ -338,7 +338,7 @@ tpl_log_store_search_new (TplLogStore *self,
* g_list_free (lst);
*/
GList *
-tpl_log_store_get_filtered_messages (TplLogStore *self,
+_tpl_log_store_get_filtered_messages (TplLogStore *self,
TpAccount *account,
const gchar *chat_id,
gboolean chatroom,
@@ -356,7 +356,7 @@ tpl_log_store_get_filtered_messages (TplLogStore *self,
gboolean
-tpl_log_store_is_writable (TplLogStore *self)
+_tpl_log_store_is_writable (TplLogStore *self)
{
gboolean writable;
@@ -371,7 +371,7 @@ tpl_log_store_is_writable (TplLogStore *self)
gboolean
-tpl_log_store_is_readable (TplLogStore *self)
+_tpl_log_store_is_readable (TplLogStore *self)
{
gboolean readable;