summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2019-02-05 22:06:36 +0100
committerJens Georg <mail@jensge.org>2019-02-05 22:06:36 +0100
commit8265948a20cb3eda0825301eee947e20fdfe88f9 (patch)
tree9e1e991eb7c5cb14fbc230155d231f333e774577 /examples
parentcea7467300f069608cdf863525606ec7208597ea (diff)
downloadgupnp-8265948a20cb3eda0825301eee947e20fdfe88f9.tar.gz
example: Use UPnP 1.1 and IPv6 in browse.js
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/browse.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/browse.js b/examples/browse.js
index d790ff5..1b3820a 100755
--- a/examples/browse.js
+++ b/examples/browse.js
@@ -27,11 +27,14 @@
// DAMAGE.
imports.gi.versions.GUPnP = "1.2"
+imports.gi.versions.GSSDP = "1.2"
const Mainloop = imports.mainloop;
const GUPnP = imports.gi.GUPnP;
+const GSSDP = imports.gi.GSSDP;
const GObject = imports.gi.GObject;
const GLib = imports.gi.GLib;
+const Gio = imports.gi.Gio;
const Soup = imports.gi.Soup;
const MEDIA_SERVER = "urn:schemas-upnp-org:device:MediaServer:1";
@@ -77,10 +80,11 @@ function _on_context_available (manager, context) {
dms_cp.set_active (true);
manager.manage_control_point (dms_cp);
+ context.unref();
}
-var cm = GUPnP.ContextManager.create (0);
+var cm = GUPnP.ContextManager.create_full (GSSDP.UDAVersion.VERSION_1_1, Gio.SocketFamily.INVALID, 0);
cm.connect('context-available', _on_context_available)
Mainloop.run ('hello');