diff sat/bridge/dbus_bridge.py @ 3066:2cc2f65379f7

core: added imageCheck and imageResize methods: imageCheck will give a report on image, notably it will tell if it's too big and needs to be resized before a transfer. imageResize will create a new image with the requested size and return a path to it.
author Goffi <goffi@goffi.org>
date Tue, 29 Oct 2019 20:38:39 +0100
parents ab2696e34d29
children 7574f795bd1e
line wrap: on
line diff
--- a/sat/bridge/dbus_bridge.py	Tue Oct 29 20:24:29 2019 +0100
+++ b/sat/bridge/dbus_bridge.py	Tue Oct 29 20:38:39 2019 +0100
@@ -385,6 +385,18 @@
         return self._callback("historyGet", str(from_jid), str(to_jid), limit, between, filters, str(profile), callback=callback, errback=errback)
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
+                         in_signature='s', out_signature='s',
+                         async_callbacks=None)
+    def imageCheck(self, arg_0):
+        return self._callback("imageCheck", str(arg_0))
+
+    @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
+                         in_signature='sii', out_signature='s',
+                         async_callbacks=('callback', 'errback'))
+    def imageResize(self, image_path, width, height, callback=None, errback=None):
+        return self._callback("imageResize", str(image_path), width, height, callback=callback, errback=errback)
+
+    @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='s', out_signature='b',
                          async_callbacks=None)
     def isConnected(self, profile_key="@DEFAULT@"):