[gjs: 1/3] Gio: Make possible to pass DBusProxyFlags to proxy wrapper



commit 0f10e94c098ab93369c9e4b96e4689f5c5256c2c
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Tue May 28 19:59:02 2019 -0500

    Gio: Make possible to pass DBusProxyFlags to proxy wrapper
    
    For some Proxy is convenient to pass DbusProxyFlags, so add a new flags
    parameter to the makeProxyWrapper generated proxy.

 installed-tests/js/testGDBus.js | 3 ++-
 modules/overrides/Gio.js        | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/installed-tests/js/testGDBus.js b/installed-tests/js/testGDBus.js
index 95c9649f..66f7b985 100644
--- a/installed-tests/js/testGDBus.js
+++ b/installed-tests/js/testGDBus.js
@@ -281,7 +281,8 @@ describe('Exported DBus object', function () {
                 proxy = obj;
                 expect(proxy).not.toBeNull();
                 loop.quit();
-            });
+            },
+            Gio.DBusProxyFlags.NONE);
         loop.run();
     });
 
diff --git a/modules/overrides/Gio.js b/modules/overrides/Gio.js
index 36a0ea00..b85091a0 100644
--- a/modules/overrides/Gio.js
+++ b/modules/overrides/Gio.js
@@ -222,11 +222,13 @@ function _addDBusConvenience() {
 function _makeProxyWrapper(interfaceXml) {
     var info = _newInterfaceInfo(interfaceXml);
     var iname = info.name;
-    return function(bus, name, object, asyncCallback, cancellable) {
+    return function(bus, name, object, asyncCallback, cancellable,
+        flags = Gio.DBusProxyFlags.NONE) {
         var obj = new Gio.DBusProxy({ g_connection: bus,
                                       g_interface_name: iname,
                                       g_interface_info: info,
                                       g_name: name,
+                                      g_flags: flags,
                                       g_object_path: object });
         if (!cancellable)
             cancellable = null;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]