ABC Web Interface Service (Alpha-2.1 version) [23/10/2003] ===================================== Propose : ========= To allow users who are always away from home can communicate with ABC client and manage ABC client from distance. In this alpha-2 version allows 9 commands to manage ABC client via web: 1) Close Web Service 2) Query current status of all torrents in ABC client 3) Add Torrent to ABC client by giving URL 4) Delete Torrent from ABC client 5) Clear all completed torrent 6) Pause Torrent 7) Resume Torrent 8) Force Queue Torrent 9) Query version of ABC client Protocol ======== Web Interface Service use TCP protocol. After you send command to ABC web interface the connection will close immediatly, so remember that you need to make new connection everytime you send 1 command. ***** All Messages MUST begin with "ID|\n" and then follow with these commands ***** CLOSE| To tell ABC to close web interface service. QUERY| To get current status of all torrents. when you send this message to ABC web interface, ABC will return result by using protocol below Filename|Progress|BT Status|ETA|DL Speed|UL Speed|%UL/DL|#Peers|#Seeds|#Copies|DL Size|UL Size|Peer Avg Progress|Total Speed|Info Hash(new line [\n]) filename1|xx.x%|status1|xx:xx:xx|xx.x kB/s|xx.x kB/s|x(xx)|x(xx)|x.xxx|xx.xx MB|xxx.xx MB|xx.x%|xxx kB/s|xxxxxxxxxxxxxxxxxxxx(new line[\n]) . . . . . . . . . . . . filenameN|xx.x%|statusN|xx:xx:xx|xx.x kB/s|xx.x kB/s||x(xx)|x(xx)|x.xxx|xx.xx MB|xxx.xx MB|xx.x%|xxx kB/s|xxxxxxxxxxxxxxxxxxxx(new line[\n]) The First line just to tell you the ordering of field (Thanks to Michel Hartmann) to design this protocol, so web server side can be dymanically. QUERY|,,.., To specific what field you want ABC to return Field can be : - filename - progress - btstatus - eta - dlspeed - ulspeed - ratio - peers - seeds - copies - dlsize - ulsize - peeravgprogress - totalspeed - totalsize For example : you want to query only Filename, Progress, ETA so you make a protocol like this QUERY|filename,progress,eta and ABC will return Filename|Progress|ETA|Info Hash\n filename1|xx.x%|xx:xx:xx|xxxxxxxxxxxxxxxxxxxx\n . . . . . . filenameN|xx.x%|xx:xx:xx|xxxxxxxxxxxxxxxxxxxx\n VERSION| return ABC version with this format "Version(new line[ \n])x.x" ( where x.x is ABC version) DELETE| To delete torrent which matches info_hash from ABC list. For example : DELETE|81d042b69f58775a8116ff214507dd52cee47df9 DELETE|COMPLETED To delete all completed torrents from ABC list. ADD| For example : ADD|http://animeforever.ddrmaniax.net/[Inf-AF-F]Last_EXILE_ep26[FINAL][CB44A3C2].torrent ABC will add this torrent into torrent list. So ABC client should set default download folder so ABC client won't block for asking download location. RESUME| To resume torrent which matches info_hash in ABC list. For example : RESUME|81d042b69f58775a8116ff214507dd52cee47df9 PAUSE| To pause torrent which matches info_hash in ABC list. For example : PAUSE|81d042b69f58775a8116ff214507dd52cee47df9 QUEUE| To force torrent which matches info_hash in ABC list to queue state. For example : QUEUE|81d042b69f58775a8116ff214507dd52cee47df9 ********************************************************************************************************************* NOTE : All commands that send to ABC, ABC will return message back in protocol "Feedback\nOK" if operation is successful OR "Feedback\nError=", if error Except : QUERY, VERSION that already return message back CLOSE won't return message back because it's closed -_-" ********************************************************************************************************************* =============================================================== Protocol Design: Michel Hartmann, Choopan Rattanapoka =============================================================== Author: Choopan RATTANAPOKA (choopanr[AT]hotmail.com) Project-site : http://pingpong-abc.sourceforge.net