%
% anyremote configuration file for Moovida (former Elisa) media center (http://elisa.fluendo.com/). (AT-mode)
%

% STATUS stable
% XTEST yes
% SOUND app
% ENV no

GuiAppName=Moovida/Elisa
GuiAppBinary=echo 'B=`which moovida 2> /dev/null`;if [ "x$B" == "x" ]; then echo elisa; else echo moovida; fi'|bash -f -s
GuiAppRun=echo 'A=`ps -ef|grep -e "moovida\|elisa"|grep -v grep`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi' | bash -f -s
GuiAppIcon=elisa.png
GuiAppType=Application
GuiAppProtocols=AT
GuiAppDesc=The Moovida (former Elisa) Media Center has many advanced features that will make your media center experience unique. It features an intuitive interface with a professional look and feel which can be easily used with a standard TV remote control.


[Protocol]=AT

(Init)=Make(var,TwoWayComm,by_value,false);\
	Macro(CHECK_RFCOMM_DEVICE);\
	Make(var,exec_name,echo 'B=`which moovida 2> /dev/null`;if [ "x$B" == "x" ]; then echo elisa; else echo moovida; fi'|bash -f -s)
(Connect)=Make(mode,elisa);

[Mode]=elisa

(EnterMode)=Macro(ELISA_RUN)
(ExitMode)=Make(none)

ELISA_RUN=Exec(echo 'P=`ps -ef|grep $(exec_name)|grep -v grep|grep -v edit|grep -v anyremote`; if [ "x$P" == "x" ]; then xterm -e $(exec_name)& fi' |bash -f -s);
ELISA_RUN_STOP=Exec(echo 'P=`ps -ef|grep $(exec_name)|grep -v grep|grep -v edit|grep -v anyremote`; if [ "x$P" == "x" ]; then xterm -e $(exec_name)& else killall $(exec_name); fi' |bash -f -s);

1=Emulate(key,f);
2=Emulate(key,Up);
3=Make(none)

4=Emulate(key,Left);
5=Emulate(key,Return);
6=Emulate(key,Right);

7=Emulate(key,x);
8=Emulate(key,Down);
9=Emulate(key,c);

* *=Exec(echo 'F="$HOME/.anyRemote/anyrem.hlp";echo "Move cursor by 2,4,6,8">$F;echo "Volume up/down by 2,8">>$F;echo "1 - toggle fullscreen">>$F;echo "5 - action (play/pause etc.)">>$F;echo "7 - Previous">>$F;echo "9 - Next">>$F;echo "0 - Show/hide menu">>$F;echo "* # - Run/Quit">>$F;echo "* * - Help">>$F);\
	Macro(SHOW_HELP);
* #=Macro(ELISA_RUN_STOP)
0=Emulate(key,BackSpace);
#=Emulate(key,q);

[ModeEnd]

%%%%%%%%%%%%%%
%
% Key aliases
%
%%%%%%%%%%%%%%

% Motorola - Red and Green buttons
S=Macro(Answer);
E=Macro(Cancel);

% SE's - SwitchOff and C buttons
c=Macro(Answer);
L=Macro(Cancel);
p=Macro(Cancel);

% Sagem - Red and Green buttons
83=Macro(Answer);
69=Macro(Cancel);

% Sockets & Sagem
42=Macro(*)
35=Macro(#)
48=Macro(0)
49=Macro(1)
50=Macro(2)
51=Macro(3)
52=Macro(4)
53=Macro(5)
54=Macro(6)
55=Macro(7)
56=Macro(8)
57=Macro(9)

[End]
