Add namespace and version to libfolks-telepathy GIR
authorTravis Reitter <travis.reitter@collabora.co.uk>
Thu, 27 Jun 2013 18:50:53 +0000 (11:50 -0700)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Mon, 1 Jul 2013 16:23:11 +0000 (09:23 -0700)
Without this in place, JavaScript (and probably other introspected) code
calling Vala client code can end up mysteriously hitting this error:

CRITICAL **: g_irepository_find_by_name: assertion 'typelib != NULL' failed

because it fails to locate the proper typelib.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703402

backends/telepathy/lib/Makefile.am
backends/telepathy/lib/tpf-namespace.vala [new file with mode: 0644]

index 65e7a87..53152f0 100644 (file)
@@ -81,6 +81,7 @@ pkgconfig_DATA = $(pkgconfig_in:.in=)
 $(srcdir)/libfolks_telepathy_la_vala.stamp: tp-lowlevel.vapi
 
 folks_telepathy_valasources = \
+       tpf-namespace.vala \
        tpf-persona.vala \
        tpf-persona-store.vala \
        tpf-logger.vala \
diff --git a/backends/telepathy/lib/tpf-namespace.vala b/backends/telepathy/lib/tpf-namespace.vala
new file mode 100644 (file)
index 0000000..8ea25d3
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2013 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, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ *       Travis Reitter <travis.reitter@collabora.co.uk>
+ */
+
+/*
+ * This file serves as the representation for the FolksTelepathy namespace
+ * itself (mostly so that we can set its namespace and version attributes for
+ * GIR)
+ */
+
+[CCode (gir_namespace = "FolksTelepathy", gir_version = "0.6")]
+namespace Tpf
+{
+}