summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2015-06-16 16:03:00 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2015-07-04 23:38:24 +0100
commit27bee92d1fb13ebee1ba2c7c73307b5a3f0600a7 (patch)
tree52acd1585688777c4f823d27e8ed5443c37e54b2
parent62d44fe6a659eeb124e168349aa6c5a60b37da07 (diff)
downloadtracker-27bee92d1fb13ebee1ba2c7c73307b5a3f0600a7.tar.gz
vala: Ensure all .vapi files contain GIR namespace CCode attributes
Ensure all .vapi files exported by Tracker contain gir_namespace and gir_version CCode attributes, otherwise Vala code compiled against them will hit this warning: tracker-sparql-1.0.vapi:4.2-4.17: warning: Namespace Sparql does not have a GIR namespace and version annotation namespace Sparql { https://bugzilla.gnome.org/show_bug.cgi?id=751051
-rw-r--r--src/libtracker-bus/.gitignore1
-rw-r--r--src/libtracker-bus/Makefile.am1
-rw-r--r--src/libtracker-bus/tracker-namespace.vala29
-rw-r--r--src/libtracker-common/libtracker-common.vapi2
-rw-r--r--src/libtracker-data/.gitignore1
-rw-r--r--src/libtracker-data/Makefile.am1
-rw-r--r--src/libtracker-data/tracker-vala-namespace.vala29
-rw-r--r--src/libtracker-direct/.gitignore1
-rw-r--r--src/libtracker-direct/Makefile.am1
-rw-r--r--src/libtracker-direct/tracker-namespace.vala29
-rw-r--r--src/libtracker-sparql/.gitignore1
-rw-r--r--src/libtracker-sparql/Makefile.am1
-rw-r--r--src/libtracker-sparql/tracker-namespace.vala29
13 files changed, 126 insertions, 0 deletions
diff --git a/src/libtracker-bus/.gitignore b/src/libtracker-bus/.gitignore
index f5dec9931..c34fe4c56 100644
--- a/src/libtracker-bus/.gitignore
+++ b/src/libtracker-bus/.gitignore
@@ -1,3 +1,4 @@
+tracker-namespace.c
tracker-bus.[ch]
tracker-bus*.vapi
tracker-array-cursor.c
diff --git a/src/libtracker-bus/Makefile.am b/src/libtracker-bus/Makefile.am
index 1b59a7775..c9f24bcc2 100644
--- a/src/libtracker-bus/Makefile.am
+++ b/src/libtracker-bus/Makefile.am
@@ -17,6 +17,7 @@ AM_CPPFLAGS = \
$(LIBTRACKER_BUS_CFLAGS)
libtracker_bus_la_SOURCES = \
+ tracker-namespace.vala \
tracker-bus.vala \
tracker-array-cursor.vala \
tracker-bus-fd-cursor.vala
diff --git a/src/libtracker-bus/tracker-namespace.vala b/src/libtracker-bus/tracker-namespace.vala
new file mode 100644
index 000000000..8943cb518
--- /dev/null
+++ b/src/libtracker-bus/tracker-namespace.vala
@@ -0,0 +1,29 @@
+/*
+ * Copyright © 2015 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * This file serves as the representation for the Tracker namespace, mostly
+ * so that we can set its namespace and version attributes for GIR.
+ */
+
+[CCode (cprefix = "TrackerBus", gir_namespace = "TrackerBus",
+ gir_version = "1.0", lower_case_cprefix = "tracker_bus_")]
+namespace Tracker
+{
+}
diff --git a/src/libtracker-common/libtracker-common.vapi b/src/libtracker-common/libtracker-common.vapi
index 50506e6e4..d3db3b9d1 100644
--- a/src/libtracker-common/libtracker-common.vapi
+++ b/src/libtracker-common/libtracker-common.vapi
@@ -17,6 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
+[CCode (cprefix = "Tracker", gir_namespace = "Tracker",
+ gir_version = "1.0", lower_case_cprefix = "tracker_")]
namespace Tracker {
[CCode (cheader_filename = "libtracker-common/tracker-date-time.h")]
public double string_to_date (string date_string, out int offset) throws DateError;
diff --git a/src/libtracker-data/.gitignore b/src/libtracker-data/.gitignore
index 5845fe0a1..2fc8613a9 100644
--- a/src/libtracker-data/.gitignore
+++ b/src/libtracker-data/.gitignore
@@ -1,3 +1,4 @@
+tracker-vala-namespace.c
tracker-sparql-expression.c
tracker-sparql-pattern.c
tracker-sparql-query.[ch]
diff --git a/src/libtracker-data/Makefile.am b/src/libtracker-data/Makefile.am
index 53f80d6c9..7835d1fb4 100644
--- a/src/libtracker-data/Makefile.am
+++ b/src/libtracker-data/Makefile.am
@@ -20,6 +20,7 @@ libtracker_datadir = $(libdir)/tracker-$(TRACKER_API_VERSION)
libtracker_data_LTLIBRARIES = libtracker-data.la
libtracker_data_la_SOURCES = \
+ tracker-vala-namespace.vala \
tracker-sparql-expression.vala \
tracker-sparql-pattern.vala \
tracker-sparql-query.vala \
diff --git a/src/libtracker-data/tracker-vala-namespace.vala b/src/libtracker-data/tracker-vala-namespace.vala
new file mode 100644
index 000000000..67c99e47f
--- /dev/null
+++ b/src/libtracker-data/tracker-vala-namespace.vala
@@ -0,0 +1,29 @@
+/*
+ * Copyright © 2015 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * This file serves as the representation for the Tracker namespace, mostly
+ * so that we can set its namespace and version attributes for GIR.
+ */
+
+[CCode (cprefix = "Tracker", gir_namespace = "Tracker",
+ gir_version = "1.0", lower_case_cprefix = "tracker_")]
+namespace Tracker
+{
+}
diff --git a/src/libtracker-direct/.gitignore b/src/libtracker-direct/.gitignore
index dd131733d..b55dd251a 100644
--- a/src/libtracker-direct/.gitignore
+++ b/src/libtracker-direct/.gitignore
@@ -1,2 +1,3 @@
+tracker-namespace.c
tracker-direct.[ch]
tracker-direct*.vapi
diff --git a/src/libtracker-direct/Makefile.am b/src/libtracker-direct/Makefile.am
index b5e441b82..d6aaeb1cf 100644
--- a/src/libtracker-direct/Makefile.am
+++ b/src/libtracker-direct/Makefile.am
@@ -18,6 +18,7 @@ AM_CPPFLAGS = \
$(LIBTRACKER_DIRECT_CFLAGS)
libtracker_direct_la_SOURCES = \
+ tracker-namespace.vala \
tracker-direct.vala
libtracker_direct_la_LIBADD = \
diff --git a/src/libtracker-direct/tracker-namespace.vala b/src/libtracker-direct/tracker-namespace.vala
new file mode 100644
index 000000000..dd309fabc
--- /dev/null
+++ b/src/libtracker-direct/tracker-namespace.vala
@@ -0,0 +1,29 @@
+/*
+ * Copyright © 2015 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * This file serves as the representation for the Tracker namespace, mostly
+ * so that we can set its namespace and version attributes for GIR.
+ */
+
+[CCode (cprefix = "TrackerDirect", gir_namespace = "TrackerDirect",
+ gir_version = "1.0", lower_case_cprefix = "tracker_direct_")]
+namespace Tracker
+{
+}
diff --git a/src/libtracker-sparql/.gitignore b/src/libtracker-sparql/.gitignore
index 04a1732c3..e16d34f8d 100644
--- a/src/libtracker-sparql/.gitignore
+++ b/src/libtracker-sparql/.gitignore
@@ -1,3 +1,4 @@
+tracker-namespace.c
tracker-builder.c
tracker-connection.c
tracker-cursor.c
diff --git a/src/libtracker-sparql/Makefile.am b/src/libtracker-sparql/Makefile.am
index 44b56e92a..48ed4ad23 100644
--- a/src/libtracker-sparql/Makefile.am
+++ b/src/libtracker-sparql/Makefile.am
@@ -18,6 +18,7 @@ AM_CPPFLAGS = \
libtracker_sparqlincludedir = $(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-sparql
libtracker_sparql_la_SOURCES = \
+ tracker-namespace.vala \
tracker-builder.vala \
tracker-connection.vala \
tracker-cursor.vala \
diff --git a/src/libtracker-sparql/tracker-namespace.vala b/src/libtracker-sparql/tracker-namespace.vala
new file mode 100644
index 000000000..67c99e47f
--- /dev/null
+++ b/src/libtracker-sparql/tracker-namespace.vala
@@ -0,0 +1,29 @@
+/*
+ * Copyright © 2015 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * This file serves as the representation for the Tracker namespace, mostly
+ * so that we can set its namespace and version attributes for GIR.
+ */
+
+[CCode (cprefix = "Tracker", gir_namespace = "Tracker",
+ gir_version = "1.0", lower_case_cprefix = "tracker_")]
+namespace Tracker
+{
+}