summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-04-19 18:17:53 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-04-23 14:27:00 +0100
commit5e7655f12de5b11e35e19acabf540f4557b50db7 (patch)
treef7cdd17d0eb560cf4088d841877c96e013dc6ea8
parentbd97bf6a798232bc4fccccfd1aebd0477d6e2daf (diff)
Rename debug.h to debug-internal.h and underscore-prefix its functions
-rw-r--r--src/telepathy-logger.c4
-rw-r--r--telepathy-logger/Makefile.am2
-rw-r--r--telepathy-logger/channel-factory.c2
-rw-r--r--telepathy-logger/channel-text.c2
-rw-r--r--telepathy-logger/channel.c2
-rw-r--r--telepathy-logger/conf.c2
-rw-r--r--telepathy-logger/contact.c2
-rw-r--r--telepathy-logger/dbus-service.c2
-rw-r--r--telepathy-logger/debug-internal.h (renamed from telepathy-logger/debug.h)14
-rw-r--r--telepathy-logger/debug.c14
-rw-r--r--telepathy-logger/log-entry-text.c2
-rw-r--r--telepathy-logger/log-entry.c2
-rw-r--r--telepathy-logger/log-manager.c2
-rw-r--r--telepathy-logger/log-store-factory.c2
-rw-r--r--telepathy-logger/log-store-sqlite.c2
-rw-r--r--telepathy-logger/log-store-xml.c2
-rw-r--r--telepathy-logger/log-store.c2
-rw-r--r--telepathy-logger/observer.c2
-rw-r--r--tests/test-tpl-log-store-sqlite.c4
19 files changed, 33 insertions, 33 deletions
diff --git a/src/telepathy-logger.c b/src/telepathy-logger.c
index aa8322391..000c72081 100644
--- a/src/telepathy-logger.c
+++ b/src/telepathy-logger.c
@@ -31,7 +31,7 @@
#include <telepathy-logger/dbus-service.h>
#define DEBUG_FLAG TPL_DEBUG_MAIN
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
static GMainLoop *loop = NULL;
@@ -157,7 +157,7 @@ main (int argc,
tp_debug_divert_messages (g_getenv ("TPL_LOGFILE"));
#ifdef ENABLE_DEBUG
- tpl_debug_set_flags_from_env ();
+ _tpl_debug_set_flags_from_env ();
stamp_logs = (g_getenv ("TPL_TIMING") != NULL);
debug_sender = tp_debug_sender_dup ();
diff --git a/telepathy-logger/Makefile.am b/telepathy-logger/Makefile.am
index 160dfb0dc..665862bc6 100644
--- a/telepathy-logger/Makefile.am
+++ b/telepathy-logger/Makefile.am
@@ -27,7 +27,6 @@ LIBTPL_HEADERS = \
contact.h \
datetime.h \
dbus-service.h \
- debug.h \
log-entry.h \
log-entry-text.h \
log-manager.h \
@@ -49,6 +48,7 @@ libtelepathy_logger_la_SOURCES = \
contact.c \
datetime.c \
dbus-service.c \
+ debug-internal.h \
debug.c \
log-entry.c \
log-entry-text.c \
diff --git a/telepathy-logger/channel-factory.c b/telepathy-logger/channel-factory.c
index ce52b899c..c05bc4cfd 100644
--- a/telepathy-logger/channel-factory.c
+++ b/telepathy-logger/channel-factory.c
@@ -28,7 +28,7 @@
#include <telepathy-logger/util.h>
#define DEBUG_FLAG TPL_DEBUG_CHANNEL
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
static GHashTable *channel_table = NULL;
diff --git a/telepathy-logger/channel-text.c b/telepathy-logger/channel-text.c
index e87f4fd15..f274523ee 100644
--- a/telepathy-logger/channel-text.c
+++ b/telepathy-logger/channel-text.c
@@ -39,7 +39,7 @@
#define DEBUG_FLAG TPL_DEBUG_CHANNEL
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
#define TP_CONTACT_MYSELF 0
#define TP_CONTACT_REMOTE 1
diff --git a/telepathy-logger/channel.c b/telepathy-logger/channel.c
index 3579a3677..a6a790de9 100644
--- a/telepathy-logger/channel.c
+++ b/telepathy-logger/channel.c
@@ -33,7 +33,7 @@
#include <telepathy-logger/util.h>
#define DEBUG_FLAG TPL_DEBUG_CHANNEL
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
#define TPCHAN_PROP_PREFIX "org.freedesktop.Telepathy.Channel."
#define TPCHAN_PROP_PREFIX_LEN strlen(TPCHAN_PROP_PREFIX)
diff --git a/telepathy-logger/conf.c b/telepathy-logger/conf.c
index 083355462..5600119ec 100644
--- a/telepathy-logger/conf.c
+++ b/telepathy-logger/conf.c
@@ -27,7 +27,7 @@
#include <telepathy-logger/util.h>
#define DEBUG_FLAG TPL_DEBUG_CONF
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
#define GET_PRIV(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPL_TYPE_CONF, TplConfPriv))
diff --git a/telepathy-logger/contact.c b/telepathy-logger/contact.c
index 06b3be1a0..efd861dac 100644
--- a/telepathy-logger/contact.c
+++ b/telepathy-logger/contact.c
@@ -25,7 +25,7 @@
#include <telepathy-logger/util.h>
#define DEBUG_FLAG TPL_DEBUG_CONTACT
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
G_DEFINE_TYPE (TplContact, tpl_contact, G_TYPE_OBJECT)
diff --git a/telepathy-logger/dbus-service.c b/telepathy-logger/dbus-service.c
index 8e46f7656..f4e642280 100644
--- a/telepathy-logger/dbus-service.c
+++ b/telepathy-logger/dbus-service.c
@@ -39,7 +39,7 @@
#include <extensions/extensions.h>
#define DEBUG_FLAG TPL_DEBUG_DBUS_SERVICE
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
#define FAVOURITE_CONTACTS_FILENAME "favourite-contacts.txt"
diff --git a/telepathy-logger/debug.h b/telepathy-logger/debug-internal.h
index 4f8c64176..a92e42cd9 100644
--- a/telepathy-logger/debug.h
+++ b/telepathy-logger/debug-internal.h
@@ -47,11 +47,11 @@ typedef enum
TPL_DEBUG_OBSERVER = 1 << 9
} TplDebugFlags;
-void tpl_debug_set_flags_from_env (void);
-void tpl_debug_set_flags (TplDebugFlags flags);
-gboolean tpl_debug_flag_is_set (TplDebugFlags flag);
-void tpl_debug_free (void);
-void tpl_debug (TplDebugFlags flag, const gchar *format, ...)
+void _tpl_debug_set_flags_from_env (void);
+void _tpl_debug_set_flags (TplDebugFlags flags);
+gboolean _tpl_debug_flag_is_set (TplDebugFlags flag);
+void _tpl_debug_free (void);
+void _tpl_debug (TplDebugFlags flag, const gchar *format, ...)
G_GNUC_PRINTF (2, 3);
void tpl_critical (TplDebugFlags flag, const gchar *format, ...)
G_GNUC_PRINTF (2, 3);
@@ -77,7 +77,7 @@ G_STMT_START { \
#ifdef DEBUG_FLAG
#define DEBUG(format, ...) \
- tpl_debug (DEBUG_FLAG, "%s: " format, G_STRFUNC, ##__VA_ARGS__)
+ _tpl_debug (DEBUG_FLAG, "%s: " format, G_STRFUNC, ##__VA_ARGS__)
#define DEBUGGING gabble_debug_flag_is_set (DEBUG_FLAG)
@@ -107,7 +107,7 @@ G_STMT_START { \
#endif /* DEBUG_FLAG */
-#define tpl_debug_free() G_STMT_START { } G_STMT_END
+#define _tpl_debug_free() G_STMT_START { } G_STMT_END
#endif /* ENABLE_DEBUG */
diff --git a/telepathy-logger/debug.c b/telepathy-logger/debug.c
index ab695ea14..8e7c2f5cb 100644
--- a/telepathy-logger/debug.c
+++ b/telepathy-logger/debug.c
@@ -20,7 +20,7 @@
*/
#include "config.h"
-#include "debug.h"
+#include "telepathy-logger/debug-internal.h"
#include <telepathy-glib/debug.h>
@@ -43,7 +43,7 @@ static GDebugKey keys[] = {
};
void
-tpl_debug_set_flags_from_env (void)
+_tpl_debug_set_flags_from_env (void)
{
guint nkeys;
const gchar *flags_string;
@@ -53,21 +53,21 @@ tpl_debug_set_flags_from_env (void)
flags_string = g_getenv ("TPL_DEBUG");
if (flags_string != NULL)
- tpl_debug_set_flags (g_parse_debug_string (flags_string, keys, nkeys));
+ _tpl_debug_set_flags (g_parse_debug_string (flags_string, keys, nkeys));
tp_debug_set_flags (g_getenv ("TP_DEBUG"));
}
void
-tpl_debug_set_flags (TplDebugFlags new_flags)
+_tpl_debug_set_flags (TplDebugFlags new_flags)
{
flags |= new_flags;
}
gboolean
-tpl_debug_flag_is_set (TplDebugFlags flag)
+_tpl_debug_flag_is_set (TplDebugFlags flag)
{
return flag & flags;
}
@@ -76,7 +76,7 @@ GHashTable *flag_to_domains = NULL;
void
-tpl_debug_free (void)
+_tpl_debug_free (void)
{
if (flag_to_domains == NULL)
return;
@@ -86,7 +86,7 @@ tpl_debug_free (void)
}
-void tpl_debug (TplDebugFlags flag,
+void _tpl_debug (TplDebugFlags flag,
const gchar *format,
...)
{
diff --git a/telepathy-logger/log-entry-text.c b/telepathy-logger/log-entry-text.c
index 3e1310781..49ea783d1 100644
--- a/telepathy-logger/log-entry-text.c
+++ b/telepathy-logger/log-entry-text.c
@@ -29,7 +29,7 @@
#include <telepathy-logger/log-entry.h>
#define DEBUG_FLAG TPL_DEBUG_LOG_STORE
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
G_DEFINE_TYPE (TplLogEntryText, tpl_log_entry_text, TPL_TYPE_LOG_ENTRY)
diff --git a/telepathy-logger/log-entry.c b/telepathy-logger/log-entry.c
index 116010712..3da8d5cd0 100644
--- a/telepathy-logger/log-entry.c
+++ b/telepathy-logger/log-entry.c
@@ -28,7 +28,7 @@
#include <telepathy-logger/util.h>
#define DEBUG_FLAG TPL_DEBUG_LOG_ENTRY
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
/**
* SECTION:log-entry
diff --git a/telepathy-logger/log-manager.c b/telepathy-logger/log-manager.c
index 2efb9cc94..0141f834c 100644
--- a/telepathy-logger/log-manager.c
+++ b/telepathy-logger/log-manager.c
@@ -43,7 +43,7 @@
#include <telepathy-logger/util.h>
#define DEBUG_FLAG TPL_DEBUG_LOG_MANAGER
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
typedef struct
{
diff --git a/telepathy-logger/log-store-factory.c b/telepathy-logger/log-store-factory.c
index 894c33b9c..7f952ead3 100644
--- a/telepathy-logger/log-store-factory.c
+++ b/telepathy-logger/log-store-factory.c
@@ -25,7 +25,7 @@
#include <telepathy-logger/util.h>
#define DEBUG_FLAG TPL_DEBUG_LOG_STORE
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
static GHashTable *logstores_table = NULL;
diff --git a/telepathy-logger/log-store-sqlite.c b/telepathy-logger/log-store-sqlite.c
index 3c5f9fcf5..9d7804db3 100644
--- a/telepathy-logger/log-store-sqlite.c
+++ b/telepathy-logger/log-store-sqlite.c
@@ -33,7 +33,7 @@
#include "util.h"
#define DEBUG_FLAG TPL_DEBUG_LOG_STORE
-#include "debug.h"
+#include "debug-internal.h"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
TPL_TYPE_LOG_STORE_SQLITE, TplLogStoreSqlitePrivate))
diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c
index 604d23dd8..59c119c71 100644
--- a/telepathy-logger/log-store-xml.c
+++ b/telepathy-logger/log-store-xml.c
@@ -48,7 +48,7 @@
#include <telepathy-logger/util.h>
#define DEBUG_FLAG TPL_DEBUG_LOG_STORE
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
#define LOG_DIR_CREATE_MODE (S_IRUSR | S_IWUSR | S_IXUSR)
#define LOG_FILE_CREATE_MODE (S_IRUSR | S_IWUSR)
diff --git a/telepathy-logger/log-store.c b/telepathy-logger/log-store.c
index a1cb4b9a3..d9cbe39f1 100644
--- a/telepathy-logger/log-store.c
+++ b/telepathy-logger/log-store.c
@@ -26,7 +26,7 @@
#include <telepathy-logger/log-store.h>
#define DEBUG_FLAG TPL_DEBUG_LOG_STORE
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
/**
* SECTION:log-store
diff --git a/telepathy-logger/observer.c b/telepathy-logger/observer.c
index e469de0d8..abdac2a64 100644
--- a/telepathy-logger/observer.c
+++ b/telepathy-logger/observer.c
@@ -39,7 +39,7 @@
#include <telepathy-logger/util.h>
#define DEBUG_FLAG TPL_DEBUG_OBSERVER
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
/**
* SECTION:observer
diff --git a/tests/test-tpl-log-store-sqlite.c b/tests/test-tpl-log-store-sqlite.c
index 43ac28279..23791ed76 100644
--- a/tests/test-tpl-log-store-sqlite.c
+++ b/tests/test-tpl-log-store-sqlite.c
@@ -1,5 +1,5 @@
#include <telepathy-logger/log-store-sqlite.h>
-#include <telepathy-logger/debug.h>
+#include <telepathy-logger/debug-internal.h>
int
main (int argc, char **argv)
@@ -11,7 +11,7 @@ main (int argc, char **argv)
g_type_init ();
- tpl_debug_set_flags_from_env ();
+ _tpl_debug_set_flags_from_env ();
bus = tp_dbus_daemon_dup (&error);
g_assert_no_error (error);