summaryrefslogtreecommitdiff
path: root/telepathy-logger/util.c
diff options
context:
space:
mode:
authorCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2010-01-22 12:42:39 +0000
committerCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2010-01-22 12:42:39 +0000
commit8a4d6267a18f2639953a21bf3c405ef8430e5a00 (patch)
treea7f261f712086f8b6010ec32fca122d8903de7a6 /telepathy-logger/util.c
parent81699fa85b073e21b89c9a85187ce2dd3c0b7756 (diff)
downloadtelepathy-logger-8a4d6267a18f2639953a21bf3c405ef8430e5a00.tar.gz
Started the TplLogEntry refactoring
Diffstat (limited to 'telepathy-logger/util.c')
-rw-r--r--telepathy-logger/util.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/telepathy-logger/util.c b/telepathy-logger/util.c
new file mode 100644
index 0000000..41aaf44
--- /dev/null
+++ b/telepathy-logger/util.c
@@ -0,0 +1,48 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2009 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Authors: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
+ */
+
+#include "util.h"
+
+#include <telepathy-glib/util.h>
+
+void
+tpl_object_unref_if_not_null (gpointer data)
+{
+ if (data && G_IS_OBJECT (data))
+ {
+ g_object_unref (data);
+ }
+}
+
+void
+tpl_object_ref_if_not_null (gpointer data)
+{
+ if (data && G_IS_OBJECT (data))
+ {
+ g_object_ref (data);
+ }
+}
+
+gboolean
+tpl_strequal (const gchar *left, const gchar *right)
+{
+ return ! tp_strdiff(left, right);
+}