comparison libervia/backend/bridge/dbus_bridge.py @ 4193:730f542e4ad0

core: add new `init_script_path` option: `init_script_path` option can be used in `[DEFAULTS]` to run a script at the end of backend initialisation. A new `init_pre_script` method is used to wait for backend to reach this stage (designed to be used mostly by CLI frontend), then the usual `ready_get` method is finished once the script is finished.
author Goffi <goffi@goffi.org>
date Wed, 13 Dec 2023 22:00:22 +0100
parents a8a0fa678ce2
children 0d7bb4df2343
comparison
equal deleted inserted replaced
4192:1d24ff583794 4193:730f542e4ad0
112 Method('history_get', arguments='ssiba{ss}s', returns='a(sdssa{ss}a{ss}ss)'), 112 Method('history_get', arguments='ssiba{ss}s', returns='a(sdssa{ss}a{ss}ss)'),
113 Method('image_check', arguments='s', returns='s'), 113 Method('image_check', arguments='s', returns='s'),
114 Method('image_convert', arguments='ssss', returns='s'), 114 Method('image_convert', arguments='ssss', returns='s'),
115 Method('image_generate_preview', arguments='ss', returns='s'), 115 Method('image_generate_preview', arguments='ss', returns='s'),
116 Method('image_resize', arguments='sii', returns='s'), 116 Method('image_resize', arguments='sii', returns='s'),
117 Method('init_pre_script', arguments='', returns=''),
117 Method('is_connected', arguments='s', returns='b'), 118 Method('is_connected', arguments='s', returns='b'),
118 Method('main_resource_get', arguments='ss', returns='s'), 119 Method('main_resource_get', arguments='ss', returns='s'),
119 Method('menu_help_get', arguments='ss', returns='s'), 120 Method('menu_help_get', arguments='ss', returns='s'),
120 Method('menu_launch', arguments='sasa{ss}is', returns='a{ss}'), 121 Method('menu_launch', arguments='sasa{ss}is', returns='a{ss}'),
121 Method('menus_get', arguments='si', returns='a(ssasasa{ss})'), 122 Method('menus_get', arguments='si', returns='a(ssasasa{ss})'),
279 return self._callback("image_generate_preview", image_path, profile_key) 280 return self._callback("image_generate_preview", image_path, profile_key)
280 281
281 def dbus_image_resize(self, image_path, width, height): 282 def dbus_image_resize(self, image_path, width, height):
282 return self._callback("image_resize", image_path, width, height) 283 return self._callback("image_resize", image_path, width, height)
283 284
285 def dbus_init_pre_script(self, ):
286 return self._callback("init_pre_script", )
287
284 def dbus_is_connected(self, profile_key="@DEFAULT@"): 288 def dbus_is_connected(self, profile_key="@DEFAULT@"):
285 return self._callback("is_connected", profile_key) 289 return self._callback("is_connected", profile_key)
286 290
287 def dbus_main_resource_get(self, contact_jid, profile_key="@DEFAULT@"): 291 def dbus_main_resource_get(self, contact_jid, profile_key="@DEFAULT@"):
288 return self._callback("main_resource_get", contact_jid, profile_key) 292 return self._callback("main_resource_get", contact_jid, profile_key)