[libdmapsharing/gobject-introspection] Build both DMAP and DAAP .gir/.typelib
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing/gobject-introspection] Build both DMAP and DAAP .gir/.typelib
- Date: Mon, 23 Jun 2014 02:10:16 +0000 (UTC)
commit 28e77f2c06061647ddcf6dfc5f556b28754eb117
Author: W. Michael Petullo <mike flyn org>
Date: Sun Jun 22 22:10:00 2014 -0400
Build both DMAP and DAAP .gir/.typelib
Signed-off-by: W. Michael Petullo <mike flyn org>
libdmapsharing/Makefile.am | 25 ++++++++++++++-----------
libdmapsharing/dmap-mdns-browser.h | 12 ++++++++++++
tests/test-dmap-client-python | 20 ++++++++++++++++++++
3 files changed, 46 insertions(+), 11 deletions(-)
---
diff --git a/libdmapsharing/Makefile.am b/libdmapsharing/Makefile.am
index b1fe686..2ab2f2a 100644
--- a/libdmapsharing/Makefile.am
+++ b/libdmapsharing/Makefile.am
@@ -138,22 +138,25 @@ CLEANFILES = $(BUILT_SOURCES)
if HAVE_INTROSPECTION
include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS = --symbol-prefix=dmap --add-include-path=$(srcdir) --warn-all
-INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
-
introspection_sources = $(libdmapsharinginclude_HEADERS) $(libdmapsharinginclude_SOURCES)
DMAP-3.0.gir: libdmapsharing-3.0.la
DMAP_3_0_gir_INCLUDES = GObject-2.0 Soup-2.4
-DMAP_3_0_gir_CFLAGS = \
- $(INCLUDES) \
- $(libdmapsharing_3_0_la_CFLAGS)
-DMAP_3_0_gir_LIBS = \
- libdmapsharing-3.0.la
+DMAP_3_0_gir_CFLAGS = $(INCLUDES) $(libdmapsharing_3_0_la_CFLAGS)
+DMAP_3_0_gir_LIBS = libdmapsharing-3.0.la
DMAP_3_0_gir_FILES = $(introspection_sources)
-
-INTROSPECTION_GIRS += DMAP-3.0.gir
+DMAP_3_0_gir_INTROSPECTION_SCANNER_ARGS = --symbol-prefix=dmap --add-include-path=$(srcdir) --warn-all
+DMAP_3_0_gir_INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+DAAP-3.0.gir: libdmapsharing-3.0.la
+DAAP_3_0_gir_INCLUDES = GObject-2.0 Soup-2.4
+DAAP_3_0_gir_CFLAGS = $(INCLUDES) $(libdmapsharing_3_0_la_CFLAGS)
+DAAP_3_0_gir_LIBS = libdmapsharing-3.0.la
+DAAP_3_0_gir_FILES = $(introspection_sources)
+DAAP_3_0_gir_INTROSPECTION_SCANNER_ARGS = --symbol-prefix=dmap --add-include-path=$(srcdir) --warn-all
+DAAP_3_0_gir_INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+INTROSPECTION_GIRS = DMAP-3.0.gir DAAP-3.0.gir
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
diff --git a/libdmapsharing/dmap-mdns-browser.h b/libdmapsharing/dmap-mdns-browser.h
index e9114dd..c0983f8 100644
--- a/libdmapsharing/dmap-mdns-browser.h
+++ b/libdmapsharing/dmap-mdns-browser.h
@@ -77,6 +77,18 @@ typedef struct _DMAPMdnsBrowserClass DMAPMdnsBrowserClass;
typedef struct _DMAPMdnsBrowserPrivate DMAPMdnsBrowserPrivate;
typedef struct _DMAPMdnsBrowserService DMAPMdnsBrowserService;
+/**
+ * DMAPMdnsBrowserServiceType:
+ * @DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID: an invalid service type
+ * @DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP: a DAAP service type
+ * @DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP: a DPAP service type
+ * @DMAP_MDNS_BROWSER_SERVICE_TYPE_DACP: a DACP service type
+ * @DMAP_MDNS_BROWSER_SERVICE_TYPE_RAOP: a RAOP service type
+ * @DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST: an invalid service type
+ *
+ * Enum values used to specify the service type to browse.
+ *
+ */
typedef enum
{
DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID = 0,
diff --git a/tests/test-dmap-client-python b/tests/test-dmap-client-python
new file mode 100755
index 0000000..0df4f7b
--- /dev/null
+++ b/tests/test-dmap-client-python
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+from gi.repository import GLib
+from gi.repository import DMAP
+from gi.repository import DAAP
+
+def connected_cb (self, result, reason, db):
+ print reason
+
+def service_added_cb (self, service):
+ print service.name
+
+ # daap_connection_new
+ # dmap_connection_connect
+
+browser = DMAP.MdnsBrowser.new(DMAP.MdnsBrowserServiceType.DAAP)
+browser.connect("service-added", service_added_cb)
+browser.start()
+
+GLib.MainLoop().run()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]