summaryrefslogtreecommitdiff
path: root/vala
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2012-10-06 15:32:20 +0200
committerJens Georg <mail@jensge.org>2012-10-06 15:33:51 +0200
commiteda464be9136e74aac4766a3cf09f9eeadb50d08 (patch)
treef9ddfcb005acae8f07c521f53de653b28af4fca6 /vala
parenta5c429cb8000e4542617c55c1ca957f9b2bfd521 (diff)
downloadgupnp-eda464be9136e74aac4766a3cf09f9eeadb50d08.tar.gz
Add vapi generation from GIR
Diffstat (limited to 'vala')
-rw-r--r--vala/GUPnP-1.0.metadata28
-rw-r--r--vala/Makefile.am21
-rw-r--r--vala/gupnp-1.0-custom.vala31
-rw-r--r--vala/gupnp-1.0.deps3
4 files changed, 83 insertions, 0 deletions
diff --git a/vala/GUPnP-1.0.metadata b/vala/GUPnP-1.0.metadata
new file mode 100644
index 0000000..f6d6061
--- /dev/null
+++ b/vala/GUPnP-1.0.metadata
@@ -0,0 +1,28 @@
+GUPnP cheader_filename="libgupnp/gupnp.h"
+DeviceInfo
+ .get_device nullable=true
+ .get_service nullable=true
+ .element skip
+ .document skip
+Service
+ .notify skip=false
+ .signals_autoconnect skip
+ .notify_failed#signal virtual
+ServiceAction
+ .get skip=false
+ .get_value skip=false
+ .set skip=false
+ServiceInfo
+ .document skip
+ .element skip
+ .get_introspection nullable=true
+ServiceIntrospection
+ .get_action nullable=true unowned=true
+ .get_state_variable nullable=true unowned=true
+ .scpd skip
+ServiceProxy
+ .begin_action skip=false
+ .end_action_hash skip
+ .end_action_list skip
+ .send_action_hash skip
+ .send_action_list skip
diff --git a/vala/Makefile.am b/vala/Makefile.am
new file mode 100644
index 0000000..e8822d3
--- /dev/null
+++ b/vala/Makefile.am
@@ -0,0 +1,21 @@
+if HAVE_INTROSPECTION
+if HAVE_VAPIGEN
+gupnp-1.0.vapi: gupnp-1.0.stamp
+ @true
+
+gupnp-1.0.stamp: $(top_builddir)/libgupnp/GUPnP-1.0.gir \
+ $(srcdir)/GUPnP-1.0.metadata \
+ $(srcdir)/gupnp-1.0-custom.vala
+ $(AM_V_GEN)$(VAPIGEN) --metadatadir=$(srcdir) \
+ --pkg=libsoup-2.4 \
+ --library=gupnp-1.0 --pkg=gio-2.0 --pkg=libxml-2.0 \
+ $(top_builddir)/libgupnp/GUPnP-1.0.gir \
+ $(srcdir)/gupnp-1.0-custom.vala && \
+ echo timestmap > $(@F)
+
+vapidir = $(datadir)/vala/vapi
+vapi_DATA = gupnp-1.0.vapi $(srcdir)/gupnp-1.0.deps
+CLEANFILES = gupnp-1.0.vapi gupnp-1.0.stamp
+EXTRA_DIST = gupnp-1.0.deps GUPnP-1.0.metadata gupnp-1.0-custom.vala
+endif
+endif
diff --git a/vala/gupnp-1.0-custom.vala b/vala/gupnp-1.0-custom.vala
new file mode 100644
index 0000000..386fa80
--- /dev/null
+++ b/vala/gupnp-1.0-custom.vala
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2012 Jens Georg <mail@jensge.org>
+ *
+ * Author: Jens Georg <mail@jensge.org>
+ *
+ * This file is part of GUPnP.
+ *
+ * GUPnP 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 of the License, or
+ * (at your option) any later version.
+ *
+ * GUPnP 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 program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+public class GUPnP.ServiceProxy : GUPnP.ServiceInfo {
+ public bool send_action (string action, ...) throws GLib.Error;
+ public bool end_action (GUPnP.ServiceProxyAction action, ...) throws GLib.Error;
+ public bool end_action_hash (GUPnP.ServiceProxyAction action, [CCode (pos=-0.9)] GLib.HashTable<string, weak GLib.Value*> hash) throws GLib.Error;
+ public bool end_action_list (GUPnP.ServiceProxyAction action, [CCode (pos=-0.9)] GLib.List<string> out_names, [CCode (pos=-0.8)] GLib.List<GLib.Type?> out_types, [CCode (pos=-0.7)] out GLib.List<weak GLib.Value*> out_values) throws GLib.Error;
+
+ public bool send_action_hash (string action, [CCode (pos=-0.9)] GLib.HashTable<string, GLib.Value?> in_hash, [CCode (pos=-0.8)] GLib.HashTable<string, weak GLib.Value*> out_hash) throws GLib.Error;
+ public bool send_action_list (string action, [CCode (pos=-0.9)] GLib.List<string> in_names, [CCode (pos=-0.8)] GLib.List<weak GLib.Value?> in_values, [CCode (pos=-0.7)] GLib.List<string> out_names, [CCode (pos=-0.6)] GLib.List<GLib.Type?> out_types, [CCode (pos=-0.5)] out GLib.List<weak GLib.Value*> out_values) throws GLib.Error;
+}
diff --git a/vala/gupnp-1.0.deps b/vala/gupnp-1.0.deps
new file mode 100644
index 0000000..52e8225
--- /dev/null
+++ b/vala/gupnp-1.0.deps
@@ -0,0 +1,3 @@
+gssdp-1.0
+libsoup-2.4
+libxml-2.0