Codebase list anyremote / 32b385e
Imported Debian patch 5.2+dfsg-1 Philipp Huebner 9 years ago
21 changed file(s) with 373 addition(s) and 201 deletion(s). Raw diff Collapse all Expand all
0 * Wed Aug 25 2010 Mikhail Fedotov <anyremote at mail.ru> - 5.2
1 - Enhanced support for Get(password) command. Properly handle ampersand in file
2 names.
3
04 * Thu Jul 8 2010 Mikhail Fedotov <anyremote at mail.ru> - 5.1.3
15 - Some configuration files and documentation were corrected.
26 Added configuration file for QMMP.
2323
2424 install-data-local:
2525 test -z $(DESTDIR)$(pkgdatadir) || mkdir -p -- . $(DESTDIR)$(pkgdatadir)
26 test -z $(DESTDIR)$(datadir)/doc/anyremote || mkdir -p -- . $(DESTDIR)$(datadir)/doc/anyremote
26 test -z $(DESTDIR)$(docdir) || mkdir -p -- . $(DESTDIR)$(docdir)
2727 cp -r cfg-data $(DESTDIR)$(pkgdatadir)
2828 rm -rf $(DESTDIR)$(pkgdatadir)/cfg-data/obsoleted
29 cp -r doc-html ChangeLog README COPYING AUTHORS $(DESTDIR)$(datadir)/doc/anyremote/
30 find $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(datadir)/doc/anyremote -type f -exec chmod 644 {} \;
29 cp -r doc-html ChangeLog README COPYING AUTHORS $(DESTDIR)$(docdir)/
30 find $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(docdir) -type f -exec chmod 644 {} \;
3131 chmod a+x $(DESTDIR)$(pkgdatadir)/cfg-data/Utils/all-in-1.py $(DESTDIR)$(pkgdatadir)/cfg-data/Utils/message.sh
3232 chmod a+x $(DESTDIR)$(pkgdatadir)/cfg-data/Utils/xmms_is_playing $(DESTDIR)$(pkgdatadir)/cfg-data/Utils/getPlayList.sh
33 find $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(datadir)/doc/anyremote -type d -exec chmod 755 {} \;
33 find $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(docdir) -type d -exec chmod 755 {} \;
3434 test -z $(DESTDIR)$(datadir)/man/man1 || mkdir -p -- . $(DESTDIR)$(datadir)/man/man1
3535 cp -r anyremote.1.gz $(DESTDIR)$(datadir)/man/man1
3636 chmod 644 $(DESTDIR)$(datadir)/man/man1/anyremote.1.gz
3737
3838 uninstall-local:
3939 rm -rf $(DESTDIR)$(pkgdatadir)
40 rm -rf $(DESTDIR)$(datadir)/doc/anyremote
40 rm -rf $(DESTDIR)$(docdir)
4141 rm -f $(DESTDIR)$(datadir)/man/man1/anyremote.1.gz
696696
697697 install-data-local:
698698 test -z $(DESTDIR)$(pkgdatadir) || mkdir -p -- . $(DESTDIR)$(pkgdatadir)
699 test -z $(DESTDIR)$(datadir)/doc/anyremote || mkdir -p -- . $(DESTDIR)$(datadir)/doc/anyremote
699 test -z $(DESTDIR)$(docdir) || mkdir -p -- . $(DESTDIR)$(docdir)
700700 cp -r cfg-data $(DESTDIR)$(pkgdatadir)
701701 rm -rf $(DESTDIR)$(pkgdatadir)/cfg-data/obsoleted
702 cp -r doc-html ChangeLog README COPYING AUTHORS $(DESTDIR)$(datadir)/doc/anyremote/
703 find $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(datadir)/doc/anyremote -type f -exec chmod 644 {} \;
702 cp -r doc-html ChangeLog README COPYING AUTHORS $(DESTDIR)$(docdir)/
703 find $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(docdir) -type f -exec chmod 644 {} \;
704704 chmod a+x $(DESTDIR)$(pkgdatadir)/cfg-data/Utils/all-in-1.py $(DESTDIR)$(pkgdatadir)/cfg-data/Utils/message.sh
705705 chmod a+x $(DESTDIR)$(pkgdatadir)/cfg-data/Utils/xmms_is_playing $(DESTDIR)$(pkgdatadir)/cfg-data/Utils/getPlayList.sh
706 find $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(datadir)/doc/anyremote -type d -exec chmod 755 {} \;
706 find $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(docdir) -type d -exec chmod 755 {} \;
707707 test -z $(DESTDIR)$(datadir)/man/man1 || mkdir -p -- . $(DESTDIR)$(datadir)/man/man1
708708 cp -r anyremote.1.gz $(DESTDIR)$(datadir)/man/man1
709709 chmod 644 $(DESTDIR)$(datadir)/man/man1/anyremote.1.gz
710710
711711 uninstall-local:
712712 rm -rf $(DESTDIR)$(pkgdatadir)
713 rm -rf $(DESTDIR)$(datadir)/doc/anyremote
713 rm -rf $(DESTDIR)$(docdir)
714714 rm -f $(DESTDIR)$(datadir)/man/man1/anyremote.1.gz
715715
716716 # Tell versions [3.59,3.63) of GNU make to not export all variables.
00 %
11 % anyremote configuration file for amarok management. (Server-mode)
2 % v.4
3 % * Improved tracklist
4 % * Track number, Track Info
5 % * Fixed problem with spaces in path to a cover
6 % * Fixed problem with commas in name of a track
72 %
83 % Made by Carlos Sanchez (chukysoria@gmail.com)
94 % --- modified to run with amarok/kde4 (johann bauer, johann.bauer1@gmail.com )
105 % --- --- modified (Dmirty Ashkadov, dmitry.ashkadov@gmail.com)
116
12 % STATUS non-stable
7 % STATUS stable
138 % XTEST no
149 % SOUND app
1510 % ENV no
1712 GuiAppName=Amarok v4
1813 GuiAppBinary=amarok
1914 GuiAppVersion=echo 'V=`amarok -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`; if [ "x$V" == "x4" ]; then echo OK; else echo NOK; fi'|bash -f -s
20 GuiAppRun=echo 'A=`pgrep amarok`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
15 GuiAppRun=echo 'qdbus org.kde.amarok > /dev/null; if [ $? == "1" ]; then echo NOK; else echo OK; fi '| bash -f -s
2116 GuiAppIcon=amarok.png
2217 GuiAppType=Application
2318 GuiAppDesc=Amarok is the music player for Linux and Unix with an intuitive interface. Amarok makes playing the music you love easier than ever before - and looks good doing it. This configuration supports cover art. This configuration file is for Amarok/KDE4.
2722 (Init)=Include($(CfgDir)/Utils/aliases-server.cfg);\
2823 Make(var,from_utf,by_value,);\
2924 Make(var, to_utf,by_value,);\
25 Make(var, tmp_dir,by_value,/tmp);\
3026 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);\
3127 Exec(echo 'P=`which convert 2> /dev/null|grep convert|grep -v no|wc -l|tr -d " "`;if [ "x$P" == "x1" ]; then true; else $(CfgDir)/Utils/message.sh "ERROR: ImageMagic is not installed"; fi'|bash -f -s);\
3228 Macro(INIT_VARIABLES);
3329
3430 INIT_VARIABLES=Make(var,arDir,echo $HOME/.anyRemote/);\
35 Make(var,cvDir,by_value,$(arDir)amarok_covers/);\
31 Make(var,cvDir,by_value,$(tmp_dir)/amarok_covers/);Exec(if [[ ! -d $(cvDir) ]]; then mkdir $(cvDir); fi);\
3632 Make(var,am_track_index,by_value,0);\
3733 Make(var,am_track_index_saved,by_value,-2);\
3834 Make(var,am_num_of_tracks,by_value,-2);\
3935 Make(var,am_saved_mode,by_value,amarok-v4);\
4036 Make(var,am_track_pos,by_value,0);\
37 Make(var,am_track_pos_old,by_value,0);\
4138 Make(var,am_track_length,by_value,1);\
42 Make(var,am_volume,by_value,0);
39 Make(var,am_volume,by_value,0);\
40 Make(var,am_cover,by_value,);\
41 Make(var,am_cover_old,by_value,);
4342
4443 MODE_SAVE=Make(var,am_saved_mode,by_value,$(Mode));
4544 MODE_LOAD=Make(mode,$(am_saved_mode));
6564 AMAROK_V2_START_TIMER=Timer(AMAROK_V2_SETINFO,5,0);
6665 AMAROK_V2_STOP_TIMER =Timer(AMAROK_V2_SETINFO,cancel);
6766
68 AMAROK_V2_UPDATE_STATUS=ExecAndSet(status, echo 'min=`expr $(am_track_length) / 60`; sec=`expr $(am_track_length) % 60`; pos_min=`expr $(am_track_pos) / 60`; pos_sec=`expr $(am_track_pos) % 60`; echo "$pos_min:$pos_sec / $min:$sec";'|bash -s -f);
67 AMAROK_V2_UPDATE_STATUS=ExecAndSet(status, echo 'min=`expr $(am_track_length) / 60`; sec=`expr $(am_track_length) % 60`; pos_min=`expr $(am_track_pos) / 60`; pos_sec=`expr $(am_track_pos) % 60`; echo "$pos_min:`if [[ $pos_sec -lt 10 ]]; then echo 0; fi`$pos_sec / $min:`if [[ $sec -lt 10 ]]; then echo 0; fi`$sec";'|bash -s -f);
6968 AMAROK_V2_UPDATE_PROGRESSBAR=ExecAndSet(volume, if [ $(am_track_length) == 0 ]; then echo 0; else expr $(am_track_pos) \* 100 \/ $(am_track_length); fi);
70 AMAROK_V2_UPDATE_PLAY_ICON=Make(var,am_play_icon,if [ $(am_track_pos) == 0 ]; then echo 'play'; else echo 'pause'; fi);Set(icons,SAME,2,$(am_play_icon));
69 % AMAROK_V2_UPDATE_PLAY_ICON=Make(var,am_play_icon,if [ $(am_track_pos) == 0 ]; then echo 'play'; else echo 'pause'; fi);Set(icons,SAME,2,$(am_play_icon));
70 AMAROK_V2_UPDATE_PLAY_ICON=Make(var,am_play_icon,if [ $(am_track_pos) == $(am_track_pos_old) ]; then echo 'play'; else echo 'pause'; fi);Make(var,am_track_pos_old,by_value,$(am_track_pos));Set(icons,SAME,2,$(am_play_icon));
7171 AMAROK_V2_UPDATE_TITLE=ExecAndSet(title, echo 'T=`qdbus org.kde.amarok /TrackList GetMetadata $(am_track_index)|grep title:|cut -f 2 -d ":"`; A=`qdbus org.kde.amarok /TrackList GetMetadata $(am_track_index)|grep artist:|cut -f 2 -d ":"`;echo "`expr $(am_track_index) + 1`. $T" by"$A" '|bash -f -s);
72 AMAROK_V2_UPDATE_COVER=ExecAndSet(cover, echo 'I=`qdbus org.kde.amarok /TrackList GetMetadata $(am_track_index)|grep arturl:|cut -f 2 -d " "|sed "s/%20/ /g"|cut -f 2 -d ":"` ;F=`basename "$I"`; if [ "x$F" == "x" ]; then echo ""; else convert "$I" -resize $(cover_size)x$(cover_size) -append "$(cvDir)$F"; echo "$(cvDir)$F"; fi'|bash -f -s);
73
72 AMAROK_V2_UPDATE_COVER=Make(var,am_cover, qdbus org.kde.amarok /TrackList GetMetadata $(am_track_index)|grep arturl:|cut -f 2 -d " "|sed "s/%20/ /g"|cut -f 2 -d ":");\
73 Macro(AMAROK_V2_UPDATE_COVER_SUB, if [[ '$(am_cover)' == '$(am_cover_old)' ]]; then echo 1; else echo 0; fi);
74 AMAROK_V2_UPDATE_COVER_SUB=ExecAndSet(cover, echo 'F=`basename "$(am_cover)"`; if [ "x$F" == "x" ]; then echo ""; else convert "$(am_cover)" -resize $(cover_size)x$(cover_size) -append "$(cvDir)$F"; echo "$(cvDir)$F"; fi'|bash -f -s);\
75 Make(var,am_cover_old,by_value,$(am_cover));
76
7477
7578 AMAROK_V2_GET_TRACK_INDEX=Make(var,am_track_index, qdbus org.kde.amarok /TrackList GetCurrentTrack | tr -d " ");
7679 AMAROK_V2_GET_POSITION=Make(var,am_track_pos, expr `qdbus org.kde.amarok /Player PositionGet` / 1000);
120123
121124 Track Info=Macro(MODE_SAVE);Macro(AMAROK_V2_GET_TRACK_INDEX);Make(mode,TrackInfo);
122125
123 CoverSize($$)=Make(var,cover_size,by_value,$(Index));Macro(AMAROK_V2_UPDATE_COVER);
126 CoverSize($$)=Make(var,cover_size,by_value,$(Index));Macro(AMAROK_V2_UPDATE_COVER_SUB);
124127
125128 Run Player=Macro(AMAROK_V2_RUN_IF);
126129 Quit Player=Exec(qdbus org.kde.amarok /MainApplication quit);\
127130 Macro(AMAROK_V2_STOP_TIMER);\
128 Set(title,);Set(status,);
131 Set(title,);Set(status,);Set(cover,);Set(volume,0);
129132
130133 Show Player=Exec(qdbus org.kde.amarok /amarok/MainWindow show);
131134 Hide Player=Exec(qdbus org.kde.amarok /amarok/MainWindow hide);
133136 Help=Macro(MODE_SAVE);Make(mode,Help);
134137
135138
136 1=Exec(qdbus org.kde.amarok /Player Prev);Set(icons,SAME,2,pause);Macro(AMAROK_V2_SETINFO);
139 1=Exec(qdbus org.kde.amarok /Player Prev);Macro(AMAROK_V2_SETINFO);
137140 * 1=Exec(qdbus org.kde.amarok /Player Backward 300000);Macro(AMAROK_V2_SETINFO);
138 2=Exec(qdbus org.kde.amarok /Player PlayPause);Set(icons,SAME,2,pause);Macro(AMAROK_V2_SETINFO);
139 3=Exec(qdbus org.kde.amarok /Player Next);Set(icons,SAME,2,pause);Macro(AMAROK_V2_SETINFO);
141 2=Exec(qdbus org.kde.amarok /Player PlayPause);Macro(AMAROK_V2_SETINFO);
142 3=Exec(qdbus org.kde.amarok /Player Next);Macro(AMAROK_V2_SETINFO);
140143 * 3=Exec(qdbus org.kde.amarok /Player Forward 300000);Macro(AMAROK_V2_SETINFO);
141144 4=Exec(qdbus org.kde.amarok /Player Backward 10000);Macro(AMAROK_V2_SETINFO);
142145 * 4=Exec(qdbus org.kde.amarok /Player Backward 60000);Macro(AMAROK_V2_SETINFO);
143 5=Exec(qdbus org.kde.amarok /Player Stop);Set(icons,SAME,2,play);Macro(AMAROK_V2_SETINFO);
146 5=Exec(qdbus org.kde.amarok /Player Stop);Macro(AMAROK_V2_SETINFO);
144147 6=Exec(qdbus org.kde.amarok /Player Forward 10000);Macro(AMAROK_V2_SETINFO);
145148 * 6=Exec(qdbus org.kde.amarok /Player Forward 60000);Macro(AMAROK_V2_SETINFO);
146149 7=Macro(ToggleMute);
150 * 7=Exec(qdbus org.kde.kmix /kmix/KMixWindow/actions/mute trigger);
147151 8=Macro(Vol-);
152 * 8=Exec(qdbus org.kde.kmix /kmix/KMixWindow/actions/decrease_volume trigger);
148153 9=Macro(Vol+);
154 * 9=Exec(qdbus org.kde.kmix /kmix/KMixWindow/actions/increase_volume trigger);
149155 0=Macro(ToggleFullscreen);
150156 #=Macro(Playlist);
151157 * *=Macro(Help);
152
153
154158
155159 [ModeEnd]
156160
166170 Macro(SET_LIST_ITEM, expr $(am_track_index) \< 0);
167171
168172 SET_LIST_ITEM=ExecAndSet(list,select, expr $(am_track_index) + 1);
169 SET_LIST_IF_EMPTY=Set(menu,add,Add);Set(list,replace,Playlist, -- empty --);
170 SET_LIST_IF_NOT_EMPTY=Set(menu,add,Play,Info,Add,Remove);ExecAndSet(list,replace,Playlist,$(CfgDir)/Utils/getPlayList.sh);
173 SET_LIST_IF_EMPTY=Set(menu,replace,Add,Refresh);Set(list,replace,Playlist, -- empty --);
174 SET_LIST_IF_NOT_EMPTY=Set(menu,replace,Play,Add,Remove,Info,Refresh,Clear);ExecAndSet(list,replace,Playlist,$(CfgDir)/Utils/getPlayList.sh);
171175
172176 (ExitMode)=Set(list,close);
173177
177181 Info($$)=Make(var,am_track_index,expr $(Index) - 1);Macro(MODE_SAVE);Make(mode,TrackInfo);
178182 Remove($$)=Exec(qdbus org.kde.amarok /TrackList DelTrack `expr $(Index) - 1`);Make(mode,amarok_playlist_v2);
179183 Add($$)=Macro(MODE_SAVE);Make(mode,FileBrowser);
184 Clear($$)=Macro(AMAROK_V2_GET_NUM_OF_TRACKS);\
185 Exec(for (( i=0; i<$(am_num_of_tracks); ++i)) do qdbus org.kde.amarok /TrackList DelTrack 0; done);\
186 Set(menu,replace,Add,Refresh);Macro(SET_LIST_IF_EMPTY);
187 Refresh($$)=Make(mode,amarok_playlist_v2);
188
180189
181190 [ModeEnd]
182191
0 %
1 % anyremote configuration file for Nokia-E75 management. (Server-mode)
2 %
3
4 GuiAppName=Nokia E75
5 GuiAppType=Example
6 GuiAppProtocols=Server
7 GuiAppDesc=Example of keypad handling for Nokia-E75
8
9 [Protocol]=Server
10
11 (Connect)=Set(skin,default,keypad_only);\
12 Set(status,);\
13 Set(title,Nokia-E75);
14
15 K8=Emulate(key,BackSpace)
16
17 0=Emulate(key,0)
18 1=Emulate(key,1)
19 2=Emulate(key,2)
20 3=Emulate(key,3)
21 4=Emulate(key,4)
22 5=Emulate(key,5)
23 6=Emulate(key,6)
24 7=Emulate(key,7)
25 8=Emulate(key,8)
26 9=Emulate(key,9)
27 #=Emulate(keydown,Shift_L,key,numbersign,keyup,Shift_L)
28 *=Emulate(keydown,Shift_L,key,asterisk,keyup,Shift_L)
29
30 10=Emulate(key,Return)
31
32 32=Emulate(key,space)
33 33=Emulate(keydown,Shift_L,key,exclam,keyup,Shift_L)
34 36=Emulate(keydown,Shift_L,key,dollar,keyup,Shift_L)
35 38=Emulate(keydown,Shift_L,key,ampersand,keyup,Shift_L)
36
37 40=Emulate(key,braceleft)
38 41=Emulate(key,braceright)
39
40 43=Emulate(keydown,Shift_L,key,plus,keyup,Shift_L)
41 44=Emulate(key,comma)
42 45=Emulate(key,minus)
43 46=Emulate(key,period)
44
45 58=Emulate(keydown,Shift_L,key,colon,keyup,Shift_L)
46 59=Emulate(key,semicolon)
47
48 63=Emulate(keydown,Shift_L,key,question,keyup,Shift_L)
49 64=Emulate(keydown,Shift_L,key,at,keyup,Shift_L)
50 65=Emulate(keydown,Shift_L,key,A,keyup,Shift_L)
51 66=Emulate(keydown,Shift_L,key,B,keyup,Shift_L)
52 67=Emulate(keydown,Shift_L,key,C,keyup,Shift_L)
53 68=Emulate(keydown,Shift_L,key,D,keyup,Shift_L)
54 69=Emulate(keydown,Shift_L,key,E,keyup,Shift_L)
55 70=Emulate(keydown,Shift_L,key,F,keyup,Shift_L)
56 71=Emulate(keydown,Shift_L,key,G,keyup,Shift_L)
57 72=Emulate(keydown,Shift_L,key,H,keyup,Shift_L)
58 73=Emulate(keydown,Shift_L,key,I,keyup,Shift_L)
59 74=Emulate(keydown,Shift_L,key,J,keyup,Shift_L)
60 75=Emulate(keydown,Shift_L,key,K,keyup,Shift_L)
61 76=Emulate(keydown,Shift_L,key,L,keyup,Shift_L)
62 77=Emulate(keydown,Shift_L,key,M,keyup,Shift_L)
63 78=Emulate(keydown,Shift_L,key,N,keyup,Shift_L)
64 79=Emulate(keydown,Shift_L,key,O,keyup,Shift_L)
65 80=Emulate(keydown,Shift_L,key,P,keyup,Shift_L)
66 81=Emulate(keydown,Shift_L,key,Q,keyup,Shift_L)
67 82=Emulate(keydown,Shift_L,key,R,keyup,Shift_L)
68 83=Emulate(keydown,Shift_L,key,S,keyup,Shift_L)
69 84=Emulate(keydown,Shift_L,key,T,keyup,Shift_L)
70 85=Emulate(keydown,Shift_L,key,U,keyup,Shift_L)
71 86=Emulate(keydown,Shift_L,key,V,keyup,Shift_L)
72 87=Emulate(keydown,Shift_L,key,W,keyup,Shift_L)
73 88=Emulate(keydown,Shift_L,key,X,keyup,Shift_L)
74 89=Emulate(keydown,Shift_L,key,Y,keyup,Shift_L)
75 90=Emulate(keydown,Shift_L,key,Z,keyup,Shift_L)
76
77 97=Emulate(key,a)
78 98=Emulate(key,b)
79 99=Emulate(key,c)
80 100=Emulate(key,d)
81 101=Emulate(key,e)
82 102=Emulate(key,f)
83 103=Emulate(key,g)
84 104=Emulate(key,h)
85 105=Emulate(key,i)
86 106=Emulate(key,j)
87 107=Emulate(key,k)
88 108=Emulate(key,l)
89 109=Emulate(key,m)
90 110=Emulate(key,n)
91 111=Emulate(key,o)
92 112=Emulate(key,p)
93 113=Emulate(key,q)
94 114=Emulate(key,r)
95 115=Emulate(key,s)
96 116=Emulate(key,t)
97 117=Emulate(key,u)
98 118=Emulate(key,v)
99 119=Emulate(key,w)
100 120=Emulate(key,x)
101 121=Emulate(key,y)
102 122=Emulate(key,z)
103 123=Emulate(key,braceleft)
104 124=Emulate(key,bar)
105 125=Emulate(key,braceright)
106 126=Emulate(key,asciitilde)
107
108 163=Emulate(keydown,Shift_L,key,bar,keyup,Shift_L)
109
110 8364=Emulate(keydown,Shift_L,key,euro,keyup,Shift_L)
111
112
113 FIRE=Emulate(key,Return)
114 LEFT=Emulate(key,Left)
115 UP=Emulate(key,Up)
116 RIGHT=Emulate(key,Right)
117 DOWN=Emulate(key,Down)
118
119 [End]
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.65 for anyremote 5.1.3.
2 # Generated by GNU Autoconf 2.65 for anyremote 5.2.
33 #
44 #
55 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
548548 # Identity of this package.
549549 PACKAGE_NAME='anyremote'
550550 PACKAGE_TARNAME='anyremote'
551 PACKAGE_VERSION='5.1.3'
552 PACKAGE_STRING='anyremote 5.1.3'
551 PACKAGE_VERSION='5.2'
552 PACKAGE_STRING='anyremote 5.2'
553553 PACKAGE_BUGREPORT=''
554554 PACKAGE_URL=''
555555
12601260 # Omit some internal or obsolete options to make the list less imposing.
12611261 # This message is too long to be a string in the A/UX 3.1 sh.
12621262 cat <<_ACEOF
1263 \`configure' configures anyremote 5.1.3 to adapt to many kinds of systems.
1263 \`configure' configures anyremote 5.2 to adapt to many kinds of systems.
12641264
12651265 Usage: $0 [OPTION]... [VAR=VALUE]...
12661266
13301330
13311331 if test -n "$ac_init_help"; then
13321332 case $ac_init_help in
1333 short | recursive ) echo "Configuration of anyremote 5.1.3:";;
1333 short | recursive ) echo "Configuration of anyremote 5.2:";;
13341334 esac
13351335 cat <<\_ACEOF
13361336
14301430 test -n "$ac_init_help" && exit $ac_status
14311431 if $ac_init_version; then
14321432 cat <<\_ACEOF
1433 anyremote configure 5.1.3
1433 anyremote configure 5.2
14341434 generated by GNU Autoconf 2.65
14351435
14361436 Copyright (C) 2009 Free Software Foundation, Inc.
18491849 This file contains any messages produced by compilers while
18501850 running configure, to aid debugging if configure makes a mistake.
18511851
1852 It was created by anyremote $as_me 5.1.3, which was
1852 It was created by anyremote $as_me 5.2, which was
18531853 generated by GNU Autoconf 2.65. Invocation command line was
18541854
18551855 $ $0 $@
26582658
26592659 # Define the identity of the package.
26602660 PACKAGE=anyremote
2661 VERSION=5.1.3
2661 VERSION=5.2
26622662
26632663
26642664 cat >>confdefs.h <<_ACEOF
61156115 # report actual input values of CONFIG_FILES etc. instead of their
61166116 # values after options handling.
61176117 ac_log="
6118 This file was extended by anyremote $as_me 5.1.3, which was
6118 This file was extended by anyremote $as_me 5.2, which was
61196119 generated by GNU Autoconf 2.65. Invocation command line was
61206120
61216121 CONFIG_FILES = $CONFIG_FILES
61726172 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61736173 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
61746174 ac_cs_version="\\
6175 anyremote config.status 5.1.3
6175 anyremote config.status 5.2
61766176 configured by $0, generated by GNU Autoconf 2.65,
61776177 with options \\"\$ac_cs_config\\"
61786178
2222
2323 AC_PREREQ(2.59)
2424
25 AC_INIT(anyremote,5.1.3)
25 AC_INIT(anyremote,5.2)
2626 AC_CONFIG_SRCDIR([src/main.c])
2727 AM_INIT_AUTOMAKE(anyremote, AC_PACKAGE_VERSION)
2828
0 anyremote (5.2+dfsg-1) unstable; urgency=low
1
2 * New upstream release
3
4 -- Philipp Huebner <debalance@debian.org> Fri, 27 Aug 2010 11:18:40 +0200
5
06 anyremote (5.1.3+dfsg-1) unstable; urgency=low
17
28 * New upstream release
205205 </tr>
206206 <tr class="alt">
207207 <td class="manufact">Motorola</td>
208 <td class="model">V551</td>
209 <td><img src="data/img/question.png" alt="N/A" /></td>
210 <td><img src="data/img/question.png" alt="N/A" /></td>
208 <td class="model">E2, V551</td>
209 <td><img src="data/img/question.png" alt="N/A" /></td>
210 <td><img src="data/img/no.png" alt="N/A" /></td>
211211 <td><img src="data/img/no.png" alt="no" /></td>
212212 <td><img src="data/img/yes.png" alt="yes" /></td>
213213 <td><img src="data/img/no.png" alt="no" /></td>
206206 <h2>*Ubuntu</h2>
207207
208208 <p><a href="http://ununtu.com"><strong>*Ubuntu</strong></a> users can download packages (a bit outdated, see note below) from official <a href="http://packages.ubuntu.com/search?searchon=names&amp;keywords=anyremote">repository</a>.</p>
209 <p>The latest versions of packages can be obtained from <a href="https://launchpad.net/~anyremote/+archive">Launchpad PPA</a> for anyRemote.</p>
210
209 <p>The latest versions of packages can be obtained from <a href="https://launchpad.net/~anyremote/+archive">Launchpad PPA</a> for anyRemote.</p>
211210 <p>For details take a look <a href="https://help.launchpad.net/Packaging/PPA#Adding%20a%20PPA%20to%20your%20Ubuntu%20repositories">here</a></p>
211 <p><strong>Beware:</strong> You must not mix Launchpad's and official packages.</p>
212212
213213 <h2>Other</h2>
214214
00 Summary: Remote control through bluetooth or IR connection
11 Name: anyremote
2 Version: 5.1.3
2 Version: 5.2
33 Release: 1%{?dist}
44 License: GPLv2+
55 Group: Applications/System
66 Source0: http://downloads.sourceforge.net/anyremote/%{name}-%{version}.tar.gz
77 URL: http://anyremote.sourceforge.net/
88 Requires: bc,dbus-glib,anyremote-data >= 5.1.3
9 BuildRequires:bluez-libs-devel >= 3.35, libX11-devel, libXtst-devel, xorg-x11-proto-devel, glib2-devel >= 2.18, dbus-devel >= 1.2.4, dbus-glib-devel >= 0.76
9 BuildRequires:bluez-libs-devel >= 4.64, libX11-devel, libXtst-devel, xorg-x11-proto-devel, glib2-devel >= 2.24.1, dbus-devel >= 1.2.24, dbus-glib-devel >= 0.86
1010 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1111
1212 %description
5858
5959
6060 %changelog
61
62 * Wed Aug 25 2010 Mikhail Fedotov <anyremote at mail.ru> - 5.2
63 - Enhanced support for Get(password) command. Properly handle ampersand in file
64 names.
6165
6266 * Thu Jul 8 2010 Mikhail Fedotov <anyremote at mail.ru> - 5.1.3
6367 - Some configuration files and documentation were corrected.
00 %define name anyremote
1 %define version 5.1.3
1 %define version 5.2
22 %define release %mkrel 1
33
44 Summary: Remote control through bluetooth or IR connection
1010 Source0: %{name}-%{version}.tar.gz
1111 URL: http://anyremote.sourceforge.net/
1212
13 BuildRequires: libbluez-devel >= 3.35, x11-proto-devel
13 BuildRequires: libbluez-devel, x11-proto-devel
1414 BuildRequires: glib2-devel >= 2.20.1, dbus-devel, dbus-devel >= 0.80
1515 BuildRequires: dbus-glib-devel >= 0.80
1616 BuildRequires: libxtst-devel >= 1.0.3
4545 %{_datadir}/man/man1/anyremote.1.lzma
4646
4747 %changelog
48
49 * Wed Aug 25 2010 Mikhail Fedotov <anyremote at mail.ru> - 5.2
50 - Enhanced support for Get(password) command. Properly handle ampersand in file
51 names.
4852
4953 * Thu Jul 8 2010 Mikhail Fedotov <anyremote at mail.ru> - 5.1.3
5054 - Some configuration files and documentation were corrected.
00 # norootforbuild
11
22 %define name anyremote
3 %define version 5.1.3
3 %define version 5.2
44
55 Summary: Remote control through bluetooth or IR connection
66 Name: %{name}
4343 %{_mandir}/man1/anyremote.1.gz
4444
4545 %changelog
46
47 * Wed Aug 25 2010 Mikhail Fedotov <anyremote at mail.ru> - 5.2
48 - Enhanced support for Get(password) command. Properly handle ampersand in file
49 names.
4650
4751 * Thu Jul 8 2010 Mikhail Fedotov <anyremote at mail.ru> - 5.1.3
4852 - Some configuration files and documentation were corrected.
00 # norootforbuild
11
22 %define name anyremote
3 %define version 5.1.3
3 %define version 5.2
44
55 Summary: Remote control through bluetooth or IR connection
66 Name: %{name}
9696
9797 %changelog
9898
99 * Wed Aug 25 2010 Mikhail Fedotov <anyremote at mail.ru> - 5.2
100 - Enhanced support for Get(password) command. Properly handle ampersand in file
101 names.
102
99103 * Thu Jul 8 2010 Mikhail Fedotov <anyremote at mail.ru> - 5.1.3
100104 - Some configuration files and documentation were corrected.
101105 Added configuration file for QMMP.
00 #
11 # anyRemote - a bluetooth remote for your PC.
22 #
3 # Copyright (C) 2007,2008,2009 Mikhail Fedotov <anyremote@mail.ru>
3 # Copyright (C) 2007,2008,2009,2010 Mikhail Fedotov <anyremote@mail.ru>
44 #
55 # This program is free software; you can redistribute it and/or modify
66 # it under the terms of the GNU General Public License as published by
1717 #
1818 # anyRemote - a bluetooth remote for your PC.
1919 #
20 # Copyright (C) 2007,2008,2009 Mikhail Fedotov <anyremote@mail.ru>
20 # Copyright (C) 2007,2008,2009,2010 Mikhail Fedotov <anyremote@mail.ru>
2121 #
2222 # This program is free software; you can redistribute it and/or modify
2323 # it under the terms of the GNU General Public License as published by
138138 int bt_close_port(int final)
139139 {
140140 int retval = 0;
141
142 logger("INF", "bt_close_port");
141143
142144 if (!portfd) { /* already closed */
143145 if (final) logger("INF", "Already closed ?");
165167 return read(portfd, buf, len);
166168 }
167169
168 int bt_read_tmo(char* buf, int len, int timeout)
170 static int bt_read_tmo(char* buf, int len, int timeout)
169171 {
170172 int ok;
171173 fd_set rdfds;
219221 *c = 0;
220222
221223 int rv = bt_read_tmo(buf, 1, timeout);
222
224 /*if (rv != 0) {
225 sprintf(tmp, "bt_read_tmo returns: %d", rv);
226 logger("DBG", tmp);
227 }*/
228
223229 if (rv == 1) {
224230 *c = buf[0];
225231 return 1;
774780
775781 int closeSocketPort(int type, int final)
776782 {
777 if (final) logger("INF", "closeSocketPort");
783 /*if (final)*/ logger("INF", "closeSocketPort");
778784
779785 if (portfd) {
780786 close(portfd);
826832
827833 while (stillRun) {
828834
829 //logger("INF", "listenAndAcceptSocketConn: accept");
835 logger("INF", "listenAndAcceptSocketConn: accept");
830836
831837 listen(sportfd,5);
832838
2525 int bt_close_port(int final);
2626
2727 int bt_read(char* buf, int len);
28 int bt_read_tmo(char* buf, int len, int timeout);
2928 int bt_readchar(char* c, int timeout);
3029 int bt_write(char* buf, int len);
3130 int bt_put_command(char* command,
2121 #define _GNU_SOURCE
2222 #include <stdio.h>
2323
24 #include <ctype.h>
2425 #include <stdlib.h>
2526 #include <string.h>
2627 #include <time.h>
564565
565566 static int execSimpleCmd(const char *cmd, int toFile)
566567 {
567 if (cmd == NULL || remoteOn != 1) {
568 if (cmd == NULL || strlen(cmd) == 0 || remoteOn != 1) {
568569 logger("DBG", "execSimpleCmd null input or remote if OFF");
569570 return EXIT_OK;
570571 }
587588 strcat(p, " > ");
588589 strcat(p, getResFile());
589590 } else {
590 if (!index(p, '&')) {
591 // How to handle & inside file names ?
592 //if (!index(p, '&') ) {
593
594 int idx = strlen(cmd)-1;
595 while (idx > 0 && isspace(cmd[idx])) { idx--; }
596
597 if (cmd[idx] != '&') {
591598 strcat(p, "&");
592599 }
593600 }
261261 }
262262 }
263263
264 static void handleActiveCall(void)
265 {
266 if (callTimer >= 20) {
267 logger("DBG", "[DS]: Get call list again");
268
269 // Will set global callerId [MAXLEN];
270 int ret = getClip(callerId);
271 if (ret == EXIT_EXACT) {
272 DEBUG2("[DS]: Call still active (%s)", callerId);
273 } else {
274 logger("DBG","[DS]: Call was finished");
275 callOn = 0;
276 strcpy(callerId, "NO CALLER ID");
277
278 sendEventToExecutor(ID_EVT_ENDCALL);
279 }
280 callTimer = 0;
281 } else {
282 callTimer++;
283 }
284 }
285
264286 //
265 // retuencodeis used in case of exit only
287 // return code is used in case of exit only
266288 //
267289 static int proceedDisconnect(void)
268290 {
658680 {
659681 char answer[MAXCMDLEN];
660682 int ret = EXIT_OK;
661 int retRead;
683 int retRead = 0;
662684
663685 logger("DBG","[DS]: start dispatcher thread");
664686
685707 char* dv = getDevice();
686708
687709 logger("DBG","[DS]: ************ outer loop **********");
710 //printf("opening server socket ...\n");
688711
689712 // try to open port
690713 if(openPort(dv) == 1) { // Open device
705728
706729 if (initPort() == 1 ) { // Init modem: AT, ATE0, AT+CMER, in server mode waits for connection
707730
708 dispIsJoinable = TRUE;
731 dispIsJoinable = TRUE;
709732
710 isConnected = 1;
733 isConnected = 1;
711734
712735 if (usePassword()) {
713 int PassOk = 0;
714
736
715737 char *pass = getStoredPass();
716
717738 if (pass) {
718
719 sendToFrontEnd("Verifying password");
739 int gotReply = 1;
740 while (1) {
741
742 if (gotReply == 1) {
743 sendToFrontEnd("Verifying password");
720744
721 ret = writeSocketConn("Get(password);", 14);
722 if (ret != EXIT_OK) {
723 logger("DBG","[DS]: Fails in writeSocketConn()");
724 continue;
725 }
745 ret = writeSocketConn("Get(password);", 14);
746 if (ret != EXIT_OK) {
747 logger("DBG","[DS]: Fails in writeSocketConn()");
748 continue;
749 }
750 if (getHttp()) {
751 ret = writeSocketConn("End();", 6);
752 if (ret != EXIT_OK) {
753 logger("DBG","[DS]: Fails in writeSocketConn()");
754 continue;
755 }
756 }
757 gotReply = 0;
758 }
726759
727 while (1) {
728760 retRead = read_command(answer, sizeof(answer));
729761
730762 if (retRead == EOF) {
763 logger("DBG","[DS]: Got disconnect on verifying password");
731764 sendToFrontEnd("Disconnected");
732765 sendDisconnect();
733766 break;
735768 DEBUG2("[DS]: Password => %s\n",answer);
736769 DEBUG2("[DS]: Password => %s\n",answer+16);
737770 DEBUG2("[DS]: Compare to => %s\n",pass);
771
772 gotReply = 1;
738773
739774 if (memcmp(answer, DEF_MSG, 4) == 0 &&
740775 memcmp(answer+4, "_PASSWORD_(,", 12) == 0) { // Got verification response from Java client
742777 int plen = strlen(pass);
743778 if (memcmp(answer+16, pass, plen) == 0) { // _PASSWORD_(,<password here>)
744779 logger("INF","[DS]: Password OK");
745 PassOk = 1;
780 free(pass);
781 break;
746782 } else {
747783 logger("INF","[DS]: Verification failed. Incorrect password.");
748784 sendToFrontEnd("Verification failed");
752788 logger("INF","[DS]: Verification failed. Incorrect response.");
753789 sendToFrontEnd("Verification failed");
754790 }
755 break;
756791 }
757792
758793 if (checkMsgQueue() == EXIT_ABORT) {
759794 free(dv);
760795 return NULL;
761796 }
762
763797 usleep(50000);
764798 }
765799 } else {
766800 logger("DBG","[DS]: No password specified. Skip check.");
767801 }
802 }
803
804 if (retRead != EOF) {
805 sendToFrontEnd("Connected");
806 sendEventToExecutor(ID_EVT_CONNECT);
807
808 logger("INF","[DS]: Start event forwarding");
809
810 while (1) {
811 //logger("DBG","[DS]: main loop");
812
813 retRead = read_command(answer, sizeof(answer));
814 //if (retRead != 0) printf("GOT %d\n",retRead);
768815
769 free(pass);
770 if (PassOk == 0) {
771 writeSocketConn("Set(title,PASSWORD INVALID);", 28);
816 if (retRead == EOF) {
817 logger("INF", "[DS]: Got disconnected");
818 //printf("Got disconnected\n");
772819
773 sleep(1);
820 freeBtAddress();
774821
775 closePort(1);
776 isConnected = 0;
822 if (gotExitSignal) {
823 logger("INF", "[DS]: Got signal, exiting");
824 closePort(1);
825 free(dv);
826 return NULL;
827
828 }
829 sendToFrontEnd("Disconnected");
830 sendDisconnect();
831 sendEventToExecutor(ID_EVT_DISCONNECT);
832
833 if (serverMode == CLIENT_AT ||
834 serverMode == CLIENT_ILIRC ||
835 serverMode == CLIENT_NOAT) { // In server mode we will reuse already opened socket
836
837 logger("INF", "[DS]: Closing the port");
838 closePort(1);
839 }
840 ret = EXIT_NOK;
841
842 isConnected = 0;
843
844 break;
777845
778 sleep(5);
779 continue;
780 }
781 }
782
783 sendToFrontEnd("Connected");
784 sendEventToExecutor(ID_EVT_CONNECT);
785
786 logger("INF","[DS]: Start event forwarding");
787
788 while (1) {
789 //logger("DBG","[DS]: main loop");
846 } else if (retRead > 0) {
847
848 if (serverMode == CLIENT_NOAT) { // in IR communication a lot of 'empty' chars (= -1) could be added
849 char * k2 = answer;
850 while (*k2 != '\0') {
851 if (*k2 == -1) {
852 *k2 = '\r';
853 }
854 k2++;
855 }
856 }
857
858 parseCommand(answer);
859 if (getHttp()) {
860
861 eMessage* em = malloc(sizeof(eMessage));
862 em->type = EM_AS_IS;
863 em->value = strdup("End();");
864 sendToExecutor(em);
865 }
866 }
790867
791 retRead = read_command(answer, sizeof(answer));
792 //printf("GOT %d\n",retRead);
793
794 if (retRead == EOF) {
795 logger("INF", "[DS]: Got disconnected");
796 printf("Got disconnected\n");
797
798 freeBtAddress();
799
800 if (gotExitSignal) {
801 logger("INF", "[DS]: Got signal, exiting");
802 closePort(1);
868 // Is call still active (timeout about 1 seconds) ?
869 if (callOn) {
870 handleActiveCall();
871 }
872
873 ret = checkMsgQueue();
874 if (ret == EXIT_ABORT) {
803875 free(dv);
804876 return NULL;
805
877 } else if (ret == EXIT_DISCON) {
878 break;
806879 }
807 sendToFrontEnd("Disconnected");
808 sendDisconnect();
809 sendEventToExecutor(ID_EVT_DISCONNECT);
810
811 if (serverMode == CLIENT_AT ||
812 serverMode == CLIENT_ILIRC ||
813 serverMode == CLIENT_NOAT) { // In server mode we will reuse already opened socket
814
815 logger("INF", "[DS]: Closing the port");
816 closePort(1);
817 }
818 ret = EXIT_NOK;
819
820 isConnected = 0;
821
822 break;
823 } else if (retRead > 0) {
824
825 if (serverMode == CLIENT_NOAT) { // in IR communication a lot of 'empty' chars (= -1) could be added
826 char * k2 = answer;
827 while (*k2 != '\0') {
828 if (*k2 == -1) {
829 *k2 = '\r';
830 }
831 k2++;
832 }
833 }
834
835 parseCommand(answer);
836 if (getHttp()) {
837
838 eMessage* em = malloc(sizeof(eMessage));
839 em->type = EM_AS_IS;
840 em->value = strdup("End();");
841 sendToExecutor(em);
842 }
843 }
844
845 // Is call still active (timeout about 1 seconds) ?
846 if (callOn) {
847 if (callTimer >= 20) {
848 logger("DBG", "[DS]: Get call list again");
849
850 // Will set global callerId [MAXLEN];
851 ret = getClip(callerId);
852 if (ret == EXIT_EXACT) {
853 DEBUG2("[DS]: Call still active (%s)", callerId);
854 } else {
855 logger("DBG","[DS]: Call was finished");
856 callOn = 0;
857 strcpy(callerId, "NO CALLER ID");
858
859 sendEventToExecutor(ID_EVT_ENDCALL);
860 }
861
862 callTimer = 0;
863 } else {
864 callTimer++;
865 }
866 }
867
868 ret = checkMsgQueue();
869 if (ret == EXIT_ABORT) {
870 free(dv);
871 return NULL;
872 } else if (ret == EXIT_DISCON) {
873 break;
874 }
875880
876 // Main loop timer (1/50 of second)
877 usleep(20000);
878 }
879 } // init port
880 } // open port
881 // Main loop timer (1/50 of second)
882 usleep(20000);
883 }
884 } // not EOF after password verification
885 } // init port
886 } // open port
881887
882888 free(dv);
883889
884 printf("Connection closed or lost\n");
890 //printf("Connection closed or lost\n");
891 logger("INF", "[DS]: Connection closed or lost");
885892
886893 // Can't open port or it closed again
887 if (dmn ||
888 serverMode == SERVER_BT ||
889 #ifdef USE_L2CAP
890 serverMode == SERVER_L2CAP ||
891 #endif
892 serverMode == SERVER_TCP ||
893 serverMode == SERVER_UX ||
894 serverMode == CLIENT_NOAT ||
895 ret == EXIT_DISCON) {
894 if (!gotExitSignal &&
895 (dmn ||
896 serverMode == SERVER_BT ||
897 #ifdef USE_L2CAP
898 serverMode == SERVER_L2CAP ||
899 #endif
900 serverMode == SERVER_TCP ||
901 serverMode == SERVER_UX ||
902 serverMode == CLIENT_NOAT ||
903 ret == EXIT_DISCON)) {
896904
897905 int timeout;
898906
904912 serverMode == SERVER_UX ||
905913 serverMode == CLIENT_NOAT) {
906914
907 timeout = 5; // wait only 5 seconds
915 timeout = 2; // wait only 2 seconds
908916
909917 } else if (ret == EXIT_DISCON) {
910918
916924 }
917925
918926 INFO2("[DS]: Wait %d seconds to connect/open server socket ...", timeout);
919 printf("Wait %d seconds to connect/open server socket ...\n", timeout);
927 //printf("Wait %d seconds to connect/open server socket ...\n", timeout);
920928
921929 dispIsJoinable = FALSE;
922930 sleep(timeout);
109109 void sig_int() {
110110 signal(SIGINT, SIG_DFL);
111111 printf("\nProcess %d: got SIGINT\n",getpid());
112 //sig_handle();
113112 aboutToExit();
114113 }
115114
116115 void sig_quit() {
117116 signal(SIGQUIT, SIG_DFL);
118117 printf("\nProcess %d: got SIGQUIT\n",getpid());
119 //sig_handle();
120118 aboutToExit();
121119 }
122120
123121 void sig_kill() {
124122 signal(SIGKILL, SIG_DFL);
125123 printf("\nProcess %d: got SIGKILL\n",getpid());
126 //sig_handle();
127124 aboutToExit();
128125 }
129126