%
% anyremote configuration file for Noatun management. (Server-mode Bemused emulation)
% Prerequisites: Bemused client installed on cell phone
%

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

GuiAppName=Noatun
GuiAppBinary=noatun
GuiAppRun=echo 'A=`dcop 2> /dev/null|grep noatun`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi' | bash -f -s
GuiAppIcon=noatun.png
GuiAppType=Application
GuiAppProtocols=Bemused
GuiAppDesc=The super-modular media player for KDE.
GuiAppVersion=echo 'V=`noatun -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`; if [ "x$V" == "x3" ]; then echo OK; else echo NOK; fi'|bash -f -s

[Protocol]=Bemused

(Init)=Include($(CfgDir)/Utils/aliases-bemused.cfg);\
	Exec(echo 'V=`amarok -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`; if [ "x$V" == "x4" ]; then $(CfgDir)/Utils/message.sh "ERROR: this configuration file is for KDE3"; fi'|bash -f -s);

(Connect)=Exec(noatun)

EXIT=Exec(dcop noatun MainApplication-Interface quit)  
FADE=Exec(dcop noatun Noatun setVolume 0) 
FFWD=Exec(echo 'P=`dcop noatun Noatun position`;N=`expr $P + 5000`;dcop noatun Noatun skipTo $N' | bash -f -s) 
INF2=Send(string,INF2ACK);Send(bytes,128,0,0,0,128,0,0,0,1,0,0);ExecAndSend(string,dcop noatun Noatun title);Send(bytes,0,0)
INFO=Send(string,INFOACK);Send(bytes,128,0,0,0,128,0,0,0,1,0,0);ExecAndSend(string,dcop noatun Noatun title)
NEXT=Exec(dcop noatun Noatun forward) 
PAUS=Exec(dcop noatun Noatun playpause) 
PLAY=Exec(dcop noatun Noatun play) 
PREV=Exec(dcop noatun Noatun back) 
RWND=Exec(echo 'P=`dcop noatun Noatun position`;N=`expr $P - 5000`;dcop noatun Noatun skipTo $N' | bash -f -s) 
STOP=Exec(dcop noatun Noatun stop) 
VOLM($$)=Exec(dcop noatun Noatun setVolume $(Param))

%GVOL=Send(string,GVOLNAK)
GVOL=Send(string,GVOLACK);Make(var,nt_volume,echo 'V=`dcop noatun Noatun volume`;echo "$V*255/100"|bc'|bash -f -s);Send(bytes,$(nt_volume))

%REPT
%SHFL

% The following is a trick. Replays are not real, just to satisfy client.
CHCK=Send(string,Y);
DINF=Send(string,DINFACK);Send(bytes,0,0,0,244,0,0,32,0,0,0,0,2);
DLST=Send(bytes,255,0)
DOWN=Send(bytes,0,100);Send(string,NoName)
FINF=Send(string,FINFACK);Send(bytes,0,0,0,100);
GVOL=Send(string,GVOLNAK)
LIST=Send(bytes,255,0)
PLEN=Send(bytes,0,100)
PLST=Send(string,PLSTACK);Send(bytes,0,1,35,10);Send(string,NoName);Send(bytes,10,0)
%SEEK=
%SLCT=
VERS=Send(string,VERSACK);Send(bytes,1,73);
[End]
