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.
This commit is contained in:
Goffi 2019-10-29 20:38:39 +01:00
commit 93a4e488ea

View file

@ -384,6 +384,18 @@ class DbusObject(dbus.service.Object):
def historyGet(self, from_jid, to_jid, limit, between=True, filters='', profile="@NONE@", callback=None, errback=None):
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)