%
% anyremote configuration file for Totem management (AT-mode)
% prerequisites: amixer/pactl utility
%

% STATUS stable
% TODO load with playlist ready
% XTEST no
% SOUND mixer
% ENV no

GuiAppName=Totem
GuiAppBinary=totem
GuiAppRun= A=`ps -ef|grep totem|grep -v totem-plugin-viewer|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$A" = "x" ]; then echo NOK; else echo OK; fi
GuiAppIcon=totem.png
GuiAppType=Application
GuiAppProtocols=AT
GuiAppDesc=Totem is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer.

[Protocol]=AT

(Init)=\
	Include($(CfgDir)/Utils/aliases-at.cfg);\
	Macro(SETUP_DEFAULT_MIXER);\
	Make(var,TwoWayComm,by_value,false);\
	Macro(CHECK_RFCOMM_DEVICE);
	        
(Connect)=\
	Exec(P=`ps -ef|grep totem|grep -v grep|grep -v anyremote|grep -v nedit`; if [ "x$P" = "x" ]; then totem& fi)

(Disconnect)=\
	Exec(totem --pause);\
	Exec($(CfgDir)/Utils/message.sh Disconnected)

%InCall($$)=\
%	Exec(totem --play-pause);\
%	Make(remote,off);

%EndCall($$)=\
%	Make(remote,on);\
%	Exec(totem --play-pause)

Answer=\
	Make(disconnect);

Cancel=\
	Exec(totem --quit);\
	Make(exit);

%1=Exec(totem --volume-down);
%3=Exec(totem --volume-up);
1=Macro(DEFAULT_VOLUME_DOWN)
2=Macro(DEFAULT_TOGGLE_MUTE)
3=Macro(DEFAULT_VOLUME_UP)

4=Exec(totem --seek-bwd);
5=Exec(totem --play-pause;totem --fullscreen);
6=Exec(totem --seek-fwd);

7=Exec(totem --previous);
8=Exec(totem --pause);
9=Exec(totem --next);

* *=Exec(F="$(TmpDir)/anyrem.hlp";echo "1 - Vol-    2 - Mute       3 - Vol+" > $F;echo "4 - Rew     5 - Play/Stop  6 - FF" >> $F;echo "7 - Prev    8 - Pause      9 - Next" >> $F;echo "* * - Help  0 - Pause      # - Quit" >> $F;echo "* # - Run/Quit Totem" >> $F);\
	Macro(SHOW_HELP);
* #=Exec(P=`ps -ef|grep totem|grep -v totem-plugin-viewer|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" = "x" ]; then totem& else totem --quit; fi)
0=Exec(totem --pause);
#=Exec(totem --quit);

[End]
