%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Key aliases for default player handling in server mode
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

[Protocol]=Server

% Funny aliases
%>=Macro(PLAY);
%>>=Macro(FF);
%<<=Macro(RWD);
%||=Macro(PAUSE)
%>|=Macro(NEXT)
%|<=Macro(PREV)
%[]=Macro(STOP)
%{}=Macro(PLAYLIST)

%
% Screen setup
%
% It needs to define $(player_name) variable before, like this:
% ...
% Make(var, player_name, by_value, Amarok);\
% Macro(SETUP_DEFAULT_PLAYER);\
% ...
% It is good ides to define $(player_name) variable in (Init)
%

[Mode]=default_player

(EnterMode)=\
	Macro(APP_PRE_SETUP);\
	Macro(SETUP_DEFAULT_POWER_MANAGEMENT);\
	Macro(RUN_IF_NEED);\
	Macro(SETUP_DEFAULT_PLAYER);\
	Macro(APP_MENU);\
	Macro(APP_POST_SETUP);

SETUP_DEFAULT_PLAYER=\
        Set(layout,default);\
	Set(status,);\
	Set(title,);\
	Set(icons,$(player_name),\
		1,vol_down,\
		2,mute,\
		3,vol_up,\
		4,rewind,\
		5,play,\
		6,forward,\
		7,prev,\
		8,stop,\
		9,next,\
		*,question,\
		0,pause,\
		#,no)

% Some players does not supports FF/RWD
SETUP_DEFAULT_PLAYER_NO_FF_FWD=\
        Set(layout,default);\
	Set(status,);\
	Set(title,);\
	Set(icons,$(player_name),\
		1,vol_down,\
		2,mute,\
		3,vol_up,\
		4,none,\
		5,play,\
		6,none,\
		7,prev,\
		8,stop,\
		9,next,\
		*,question,\
		0,pause,\
		#,no);

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

4=Macro(RWD);
5=Macro(PLAY);
6=Macro(FF);

7=Macro(PREV);
8=Macro(STOP);
9=Macro(NEXT);

% Default menu
APP_MENU=\
	Set(menu,replace,Power Off,Suspend);\
	Macro(ALLIN1MENU);

DEFAULT_HELP=Set(text,replace,Help,1 Vol-\n2 Mute\n3 Vol+\n4 Rwd\n5 Play\n6 FF\n7 Prew\n8 Stop\n9 Next\n* * Help\n* # Run/Quit $(player_name)\n0 Pause\n# Quit $(player_name))

% Some players does not supports FF/RWD
DEFAULT_HELP_NO_FF_FWD=Set(text,replace,Help,1 Vol-\n2 Mute\n3 Vol+\n5 Play\n7 Prew\n8 Stop\n9 Next\n* * Help\n* # Run/Quit $(player_name)\n0 Pause\n# Quit $(player_name))

* *=Macro(DEFAULT_HELP);
* #=Macro(RUN_OR_QUIT);
0=Macro(PAUSE);
#=Macro(QUIT);

% Android support
VOL-=Macro(DEFAULT_VOLUME_DOWN);
VOL+=Macro(DEFAULT_VOLUME_UP);

SlideLeft =Macro(NEXT);
SlideRight=Macro(PREV);
SlideDown =Macro(DEFAULT_VOLUME_DOWN);
SlideUp   =Macro(DEFAULT_VOLUME_UP);

InCall($$)=Macro(PAUSE);
EndCall($$)=Macro(PLAY);

% Default action on text screen closing
Back=\
	Set(text,close);\
	Macro(APP_MENU);

% Default action on list screen closing
Back($$)=\
	Set(list,close);\
	Macro(APP_MENU);
	
% by Utils/aliases-server.cfg
Power Off=\
	Macro(DEFAULT_PC_SWITCHOFF);

Suspend=\
	Macro(DEFAULT_PC_SUSPEND);

% Rarely used
Cancel=Macro(QUIT);Exit;

[ModeEnd]

[End]
