comparison 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
comparison
equal deleted inserted replaced
3065:f8e3789912d0 3066:2cc2f65379f7
381 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 381 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
382 in_signature='ssiba{ss}s', out_signature='a(sdssa{ss}a{ss}sa{ss})', 382 in_signature='ssiba{ss}s', out_signature='a(sdssa{ss}a{ss}sa{ss})',
383 async_callbacks=('callback', 'errback')) 383 async_callbacks=('callback', 'errback'))
384 def historyGet(self, from_jid, to_jid, limit, between=True, filters='', profile="@NONE@", callback=None, errback=None): 384 def historyGet(self, from_jid, to_jid, limit, between=True, filters='', profile="@NONE@", callback=None, errback=None):
385 return self._callback("historyGet", str(from_jid), str(to_jid), limit, between, filters, str(profile), callback=callback, errback=errback) 385 return self._callback("historyGet", str(from_jid), str(to_jid), limit, between, filters, str(profile), callback=callback, errback=errback)
386
387 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
388 in_signature='s', out_signature='s',
389 async_callbacks=None)
390 def imageCheck(self, arg_0):
391 return self._callback("imageCheck", str(arg_0))
392
393 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
394 in_signature='sii', out_signature='s',
395 async_callbacks=('callback', 'errback'))
396 def imageResize(self, image_path, width, height, callback=None, errback=None):
397 return self._callback("imageResize", str(image_path), width, height, callback=callback, errback=errback)
386 398
387 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 399 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
388 in_signature='s', out_signature='b', 400 in_signature='s', out_signature='b',
389 async_callbacks=None) 401 async_callbacks=None)
390 def isConnected(self, profile_key="@DEFAULT@"): 402 def isConnected(self, profile_key="@DEFAULT@"):