diff options
author | 2018-07-21 16:17:44 +0200 | |
---|---|---|
committer | 2019-04-24 14:18:11 +0200 | |
commit | e8b23b37394800332baf1ffc9b9777c67dc664cd (patch) | |
tree | c044db0ab9d1164c9f6c1ca4b2e3e28beeca3ca4 /bin/4a-api | |
parent | 28e86894895d16d1a707fd218990a0a58403bee8 (diff) |
change media paths
Change-Id: I0d4783d37da25a315073eb847c7f525ed1b51d5c
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'bin/4a-api')
-rwxr-xr-x | bin/4a-api | 53 |
1 files changed, 51 insertions, 2 deletions
@@ -1,8 +1,57 @@ #!/bin/bash -WS4A=unix:/run/user/0/apis/ws/ahl-4a +# load shell lib +. $(dirname $BASH_SOURCE)/lib4a-tools.sh -afb-client-demo -H -d $WS4A get_roles "" +cmd=$1 +shift + +function usage() { + log "Usage: $0 <cmd> [opts]" + log "Commands:" + log " help: show this help" + log " api <verb> [args]: send direct request to API verb with args" + log " roles: get AHL roles" + log " hals [-a|--all] [-v|--verbose]: get HALs status" + log " mediaplayer ... : interact with mediaplayer service" + log " radio ... : interact with radio service" + exit 1 +} + +case $cmd in + roles) + 4a-client ahl-4a get_roles "" + ;; + api) + 4a-client "$@" + ;; + hals) + verbose=false + all=false + while [[ -n "$1" ]]; do + case $1 in + -a|--all) all=true;; + -v|--verbose) verbose=true;; + -av) all=true; verbose=true;; + esac + shift + done + 4a-client 4a-hal-manager loaded "{'verbose':$verbose,'all':$all}" + ;; + mediaplayer) + echo "TODO" + ;; + radio) + echo "TODO" + ;; + help|-h|--help) + usage + ;; + *) + error "Invalid command" + usage + ;; +esac # commandes HAL manager: # 4a-hal-manager loaded |