%
% anyremote configuration file for xine management. (Server-mode)
%
% prerequisites: amixer/pactl utility;
%

% STATUS stable
% XTEST no
% SOUND mixer
% ENV no
% FBROWSER v.3i

GuiAppName=Xine
GuiAppBinary=xine
GuiAppRun= A=`ps -ef|grep xine|grep -v xinetd|grep -v grep|grep -v edit`; if [ "x$A" = "x" ]; then echo NOK; else echo OK; fi
GuiAppIcon=xine.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=Xine is a free multimedia player. It plays back CDs, DVDs, and VCDs.

[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
        Include($(CfgDir)/Utils/aliases-server-fbrowser-v3i.cfg);\
	Macro(SETUP_DEFAULT_MIXER);\
	Macro(FBROWSER_IC_INIT);\
	Exec(if [ -f $HOME/.xine/passwd ]; then true; else echo "ALL:ALLOW" > $HOME/.xine/passwd; fi);

(Exit)=\
	Macro(FBROWSER_IC_EXIT);

(Connect)=\
	Make(mode,xine);

Cancel=\
    Make(exit);

[Mode]=xine

(EnterMode)=\
	Set(layout,default);\
	Set(icons,XINE,1,vol_down,2,mute,3,vol_up,4,rewind,5,play,6,forward,7,fullscreen,8,stop,9,pause,*,question,0,folder,#,no);\
	Set(title,);\
	Set(status,);\
	Macro(XINEMENU);

Cancel=\
	Exec(xine-remote -c halt);\
	Make(exit);

QUIT=\
	Exec(xine-remote -c halt) 

FILEMENU=\
	Set(menu,replace,GoTo,Open,Go Home);

XINEMENU=\
	Set(menu,replace,Open DVD,Select,Left,Right,Menu);

Back    =Set(text,close);
Back($$)=Set(list,close);
Open DVD=Exec(xine -n dvd://1 --fullscreen);
Select  =Exec(xine-remote -c 'event select') 
Left    =Exec(xine-remote -c 'event left') 
Right   =Exec(xine-remote -c 'event right') 
Menu    =Exec(xine-remote -c 'event menu') 

GoTo($$)=\
	Macro(FBROWSER_IC_GO_TO);

Go Home($$)=\
	Macro(FBROWSER_IC_GO_HOME);

%Push($$) use from aliases-server-fbrowser-v3i.cfg

Open($$)=\
	Set(list,close);\
	Exec(cd "$(fbrowser_dir)";xine -n "$(Param)");\
	Set(title,$(Param));\
	Macro(XINEMENU);

1=Macro(DEFAULT_VOLUME_DOWN)
2=Macro(DEFAULT_TOGGLE_MUTE)
3=Macro(DEFAULT_VOLUME_UP)

4=Exec(xine-remote -c "seek -10") 
5=Exec(xine-remote -c play) 
6=Exec(xine-remote -c "seek +10")
 
7=Exec(xine-remote -c fullscreen)
8=Exec(xine-remote -c stop) 
9=Exec(xine-remote -c pause) 

* *=Set(text,replace,Help,  1 Vol-\n 2 Mute\n 3 Vol+\n 4 Rewind\n 5 Play\n 6 FF\n 7 Toggle Fullscreen\n 8 Stop\n 9 Pause\n ** Help\n 0 File Browser\n # Close)

0=Macro(QUIT);\
	Macro(FBROWSER_IC_FILL_LIST);\
	Macro(FILEMENU);

#=Macro(QUIT)
 
[ModeEnd]
 
[End]
