%
% anyRemote template configuration file for an player management (Server-mode)
% prerequisites: amixer/pactl utility
%

% STATUS testing
% XTEST no
% SOUND mixer
% ENV no
% DEF_PLAYER   
% ALL_IN_ONE 

GuiAppName=Some player
GuiAppBinary=player.exe
GuiAppRun=echo 'P=`ps -ef|grep player.exe|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=some_player.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=anyRemote template configuration file for an player management

[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
	Macro(SETUP_DEFAULT_MIXER);\
	Make(var,player_name,by_value,Some player);\
	Include($(CfgDir)/Utils/aliases-server-player.cfg);
	
(Connect)=Make(mode,some_player);

[Mode]=some_player : default_player

% (EnterMode) by Utils/aliases-server-player.cfg

APP_PRE_SETUP=\
	Exec(echo "add some specific actions, if needed");
	
APP_POST_SETUP=\
	Exec(echo "add some specific actions, if needed");

APP_MENU=\
	Set(menu,replace,Add,Some,Custom,Items,Power Off,Suspend);\
	Macro(ALLIN1MENU);

% Power Off, Suspend by Utils/aliases-server-player.cfg

Add=Exec(echo "Custom Action 1");
Some=Exec(echo "Custom Action 2");
Custom=Exec(echo "Custom Action 3");
Items=Exec(echo "Custom Action 4");

% Volume control and 0-9,*,# assignments by Utils/aliases-server-player.cfg

PLAY =Exec(echo play);
RWD  =Exec(echo rewind)
FF   =Exec(echo fastforward)
PREV =Exec(echo previous)
STOP =Exec(echo stop);
NEXT =Exec(echo next)
PAUSE=Exec(echo pause);

RUN_IF_NEED=Exec(echo 'P=`ps -ef|grep player.exe|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" == "x" ]; then echo "run player"; fi' |bash -f -s);
RUN_OR_QUIT=Exec(echo 'P=`ps -ef|grep player.exe|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" == "x" ]; then echo "run player"; else echo "quit player"; fi' |bash -f -s);
QUIT=Exec(echo quit)

[ModeEnd]

[End]
