Mercurial > libervia-backend
view doc/libervia-cli/shell.rst @ 4231:e11b13418ba6
plugin XEP-0353, XEP-0234, jingle: WebRTC data channel signaling implementation:
Implement XEP-0343: Signaling WebRTC Data Channels in Jingle. The current version of the
XEP (0.3.1) has no implementation and contains some flaws. After discussing this on xsf@,
Daniel (from Conversations) mentioned that they had a sprint with Larma (from Dino) to
work on another version and provided me with this link:
https://gist.github.com/iNPUTmice/6c56f3e948cca517c5fb129016d99e74 . I have used it for my
implementation.
This implementation reuses work done on Jingle A/V call (notably XEP-0176 and XEP-0167
plugins), with adaptations. When used, XEP-0234 will not handle the file itself as it
normally does. This is because WebRTC has several implementations (browser for web
interface, GStreamer for others), and file/data must be handled directly by the frontend.
This is particularly important for web frontends, as the file is not sent from the backend
but from the end-user's browser device.
Among the changes, there are:
- XEP-0343 implementation.
- `file_send` bridge method now use serialised dict as output.
- New `BaseTransportHandler.is_usable` method which get content data and returns a boolean
(default to `True`) to tell if this transport can actually be used in this context (when
we are initiator). Used in webRTC case to see if call data are available.
- Support of `application` media type, and everything necessary to handle data channels.
- Better confirmation message, with file name, size and description when available.
- When file is accepted in preflight, it is specified in following `action_new` signal for
actual file transfer. This way, frontend can avoid the display or 2 confirmation
messages.
- XEP-0166: when not specified, default `content` name is now its index number instead of
a UUID. This follows the behaviour of browsers.
- XEP-0353: better handling of events such as call taken by another device.
- various other updates.
rel 441
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 06 Apr 2024 12:57:23 +0200 |
parents | 267e4987b58b |
children |
line wrap: on
line source
============================= shell: use Libervia with REPL ============================= ``shell`` launch a read–eval–print loop (REPL) with some helpers to launch li commands. This is useful if you are willing to a session when you'll use several commands in a row (for e.g. to inspect something on a PubSub service). start the shell =============== To start the shell, you just have to enter ``li shell``. You can eventually specify a profile to use an other one than the default one by entering ``li shell -p <some_profile>``. .. _libervia-cli_shell_use: use the shell ============= Once in the shell, you can launch a command by entering it as usual (without having to specify ``li``). For instance to get last 2 blog posts from your personal blog, you just have to enter:: > blog get -m 2 There are 2 kinds of commands in the shell: - **shell commands** which are command to manipulate the shell itself - **li commands** which are the classic commands that you use with li The most important thing to remember is that you can use ``?`` (or ``help`` which is equivalent) to get the list of commands (shell + li), and ``?<command>`` (or ``help <command>``) to get information on a shell command. For li commands, you can use the usual ``--help`` argument. You may move in the commands hierarchy using ``cmd`` which can be seen as something roughly equivalent to ``cd`` for the filesystem. for instance if you know you'll work with XMPP blogs, you can enter:: > cmd blog Then you'll be in the blog hierarchy, you can check that by entering ``?``. From there you can use blog commands directly, like in this example to retrieve last 2 blog posts:: blog> get -m 2 You can even go further, e.g. if you know that you'll do several ``get`` command (in this can you'll only have to specify the arguments of ``get``):: blob> cmd get blog/get> -m 2 You can use ``/`` with ``cmd``, including as first character to indicate that you want to start from root:: blog/get> cmd /pubsub pubsub> cmd node/info Similarly, you can use ``..`` to move to parent command:: pubsub/node/info> cmd .. One of the interesting feature of shell is that you can fix an argument, i.e. indicate the value to use in the next commands. For instance if you're willing to work on a specific node, you can set its value with ``use``:: blog> use node some_interesting_node Then you won't have to specify it anymore for each command. The name of the argument to fix must be the long form. To check which arguments are fixed, just enter ``use`` without argument. If an argument is fixed but not used in a command, it will be ignored. To clear a fixed argument, you have the ``use_clear`` command. To clear the ``node`` argument set above, just enter:: blog> use_clear node Without argument, all fixed arguments will be cleared. Shell commands ============== Below is a description of shell commands. cmd --- Move in the command hierarchy, this avoid to type again a command if you know you'll use it several times. See libervia-cli_shell_use_ for explanation and examples do -- Launch a li command. By default the command is launched if you enter directly its name and arguments, but if a command or argument conflict with a shell command, the shell command will be launched instead. The ``do`` command avoid such a situation by always launching a li command:: > do blog get -m 2 exit ---- Quit the shell (alias of ``quit``). help (alias ``?``) ------------------ Give information on available commands or on a specific command, see libervia-cli_shell_use_ for more explanations. examples ^^^^^^^^ Get general help:: > ? Get help on ``do`` command:: > ?do quit ---- Quit the shell shell (alias ``!``) ------------------- Launch an external command. example ^^^^^^^ Print a calendar with ``cal``:: > !cal use --- Fix the value of an argument, which will then be set for all following commands, see libervia-cli_shell_use_ for more explanations. Without argument, show all fixed arguments examples ^^^^^^^^ Fix the PubSub node (the long name of the argument is used, so it will go to ``--node``):: pubsub> use node some_intersting_node Show all fixed arguments:: > use use_clear --------- Unfix the value of an argument (i.e. use the normal default value). Without argument, it unfixes all arguments. examples ^^^^^^^^ Clear the node:: pubsub> use_clear node Clear all arguments:: > use_clear verbose ------- Without argument, show if verbose mode is activated. With an argument evaluating to a boolean, activate or deactivate this mode. In verbose mode, the fixed arguments and the command launched are printed before launching a li command. examples ^^^^^^^^ Show if verbose mode is activated:: > verbose Activate verbose mode:: > verbose on version ------- Print current version of li/Libervia. whoami ------ Show the name of the connected profile (the one set with ``--profile`` when launching the shell). This profile will be used as default profile.