home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / on-line / amster / src / napster.h < prev    next >
C/C++ Source or Header  |  2000-01-21  |  2KB  |  69 lines

  1. /*
  2. ** Napser Protocol Header
  3. */
  4.  
  5. #ifndef INCL_NAPSTER_H
  6. #define INCL_NAPSTER_H
  7.  
  8. #define NAP_SWAPIP(x) ( ((x&0xFF)<<24) | ((x&0xFF00)<<8) | ((x&0xFF0000)>>8) | (x>>24) )
  9.  
  10. extern unsigned long nap_sigmask;
  11. extern char *nap_linktype[];
  12.  
  13. #define NAP_ERROR 0
  14. #define NAP_LOGIN 2
  15. #define NAP_LOGINRESP 3
  16. #define NAP_LOGINALT 6
  17. #define NAP_CREATEUSER 7
  18. #define NAP_REGSUCCESS 8
  19. #define NAP_REGUSED 9
  20. #define NAP_NICKINVALID 10
  21. #define NAP_NOTIFYSHARE 100
  22. #define NAP_SEARCH 200
  23. #define NAP_SEARCHRESULT 201
  24. #define NAP_SEARCHCOMPLETE 202
  25. #define NAP_FILEINFOREQ 203
  26. #define NAP_FILEINFO 204
  27. #define NAP_PRIVATEMSG 205
  28. #define NAP_BROWSEUSER 211
  29. #define NAP_BROWSERESULT 212
  30. #define NAP_BROWSECOMPLETE 213
  31. #define NAP_FILECOUNT 214
  32. #define NAP_CHANNELJOIN 400
  33. #define NAP_CHANNELPART 401
  34. #define NAP_PUBLICMSGSEND 402
  35. #define NAP_PUBLICMSGRECV 403
  36. #define NAP_NOUSERCHANNEL 404
  37. #define NAP_JOINACK 405
  38. #define NAP_JOINMSG 406
  39. #define NAP_USERPART 407
  40. #define NAP_USERLIST 408
  41. #define NAP_USERLISTEND 409
  42. #define NAP_CHANNELTOPIC 410
  43. #define NAP_ALTDLREQ 500
  44. #define NAP_REMOTEQUEUEFULL 620
  45. #define NAP_SYSMSG 621
  46. #define NAP_EMAILCHANGE 702
  47.  
  48. typedef struct songdata_struct {
  49.     char title[256];
  50.     char chksum[40];
  51.     unsigned long size;
  52.     int bitrate,freq,time;
  53.     char user[20];
  54.     int link;
  55. } *songdata, _songdata;
  56.  
  57.  
  58. extern int nap_login(void);
  59. extern void nap_logout(void);
  60. extern int nap_listen(void);
  61. extern void nap_search(char *keys, int max, int speed, int speedval, int bit, int bitval, int freq, int freqval);
  62. extern void nap_request(songdata sd);
  63. extern void nap_msg(char *nick, char *msg);
  64. extern char *nap_getlinktype(int link);
  65. extern void nap_browseuser(char *nick);
  66. extern void nap_updateaccount(void);
  67.  
  68. #endif /* INCL_NAPSTER_H */
  69.