Mercurial > libervia-backend
diff libervia/frontends/quick_frontend/quick_app.py @ 4233:d01b8d002619
cli (call, file), frontends: implement webRTC data channel transfer:
- file send/receive commands now supports webRTC transfer. In `send` command, the
`--webrtc` flags is currenty used to activate it.
- WebRTC related code have been factorized and moved to `libervia.frontends.tools.webrtc*`
modules.
rel 442
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 06 Apr 2024 13:43:09 +0200 |
parents | 45e3bb8607d8 |
children | 0d7bb4df2343 |
line wrap: on
line diff
--- a/libervia/frontends/quick_frontend/quick_app.py Sat Apr 06 12:59:50 2024 +0200 +++ b/libervia/frontends/quick_frontend/quick_app.py Sat Apr 06 13:43:09 2024 +0200 @@ -637,7 +637,7 @@ This will launch frontend specific workflow - /!\ if you override the method and don't call the parent, be sure to add the + /!\\ if you override the method and don't call the parent, be sure to add the profile to ready_profiles ! if you don't, all signals will stay in cache @param profile(unicode): %(doc_profile)s @@ -763,7 +763,7 @@ action_handler(action_data, action_id, security_limit, profile) else: self.action_manager( - action_data, user_action=False, profile=profile + action_data, user_action=False, action_id=action_id, profile=profile ) def contact_new_handler(self, jid_s, attributes, groups, profile): @@ -1304,21 +1304,31 @@ ) self._action_handlers[action_type] = handler - def action_manager(self, action_data, callback=None, ui_show_cb=None, user_action=True, - progress_cb=None, progress_eb=None, profile=C.PROF_KEY_NONE): + def action_manager( + self, + action_data: dict, + callback: Callable|None = None, + ui_show_cb: Callable|None = None, + user_action: bool = True, + action_id: str|None = None, + progress_cb: Callable|None = None, + progress_eb: Callable|None = None, + profile: str = C.PROF_KEY_NONE + ) -> None: """Handle backend action - @param action_data(dict): action dict as sent by action_launch or returned by an + @param action_data: action dict as sent by action_launch or returned by an UI action - @param callback(None, callback): if not None, callback to use on XMLUI answer - @param ui_show_cb(None, callback): if not None, method to call to show the XMLUI - @param user_action(bool): if True, the action is a result of a user interaction + @param callback: if not None, callback to use on XMLUI answer + @param ui_show_cb: if not None, method to call to show the XMLUI + @param user_action: if True, the action is a result of a user interaction else the action come from backend direclty (i.e. action_new). This is useful to know if the frontend can display a popup immediately (if True) or if it should add it to a queue that the user can activate later. - @param progress_cb(None, callable): method to call when progression is finished. + @param action_id: ID of the action. + @param progress_cb: method to call when progression is finished. Only make sense if a progress is expected in this action - @param progress_eb(None, callable): method to call when something went wrong + @param progress_eb: method to call when something went wrong during progression. Only make sense if a progress is expected in this action """