summaryrefslogtreecommitdiffstats
path: root/templates/feature/agl-demo/included.dep
blob: cbf86e8dfa5fa756e28e47ef96dadf50f19c0e45 (plain)
1
agl-appfw-smack agl-hmi-framework agl-profile-graphical-qt5 agl-pipewire agl-speech-framework
r: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#!/bin/bash

send() {
	afb-client-demo -H -d unix:@afm_platform_rundir@/apis/ws/afm-main "$1" "$2" |
	awk '$1=="ON-REPLY-FAIL"{$1="ERROR:";$2="";print;exit 1;}NR>1'
}

case "$1" in

  list|runnables)
    send runnables true
    ;;

  add|install)
    f=$(realpath $2)
    r=true
    if [[ "$(basename $0)" = "afm-install" ]]; then r=false; fi
    send install '{"wgt":"'"$f"'","force":true,"reload":'"$r"'}'
    ;;

  remove|uninstall)
    i=$2
    send uninstall "\"$i\""
    ;;

  info|detail)
    i=$2
    send detail "\"$i\""
    ;;

  ps|runners)
    send runners true
    ;;

  run|start)
    i=$2
    send start "\"$i\""
    ;;

  run-remote|start-remote)
    i=$2
    send start '{"id":"'"$i"'","mode":"remote"}'
    ;;

  once)
    i=$2
    send once "\"$i\""
    ;;

  terminate|kill)
    i=$2
    send terminate "$i"
    ;;

  stop|pause)
    i=$2
    send pause "$i"
    ;;

  resume|continue)
    i=$2
    send resume "$i"
    ;;

  state|status)
    i=$2
    send state "$i"
    ;;

  -h|--help|help)
    cat << EOC
usage: $(basename $0) command [arg]

The commands are:

  list
  runnables      list the runnable widgets installed

  add wgt
  install wgt    install the wgt file

  remove id
  uninstall id   remove the installed widget of id

  info id
  detail id      print detail about the installed widget of id

  ps
  runners        list the running instance

  run id
  start id       start an instance of the widget of id

  once id        run once an instance of the widget of id

  kill rid
  terminate rid  terminate the running instance rid

  stop rid
  pause rid      pause the running instance rid

  resume rid
  continue rid   continue the previously paused rid

  status rid
  state rid      get status of the running instance rid

EOC
    ;;

  *)
    echo "unknown command $1" >&2
    exit 1
    ;;
esac