home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Musik / Misc / Amster / Source / include / napster.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-01  |  2.8 KB  |  105 lines

  1. /*
  2. ** Napser Protocol Header
  3. */
  4.  
  5. #include <sys/types.h>
  6.  
  7. #ifndef AMSTER_NAPSTER_H
  8. #define AMSTER_NAPSTER_H
  9.  
  10. extern char nap_host[512];
  11. extern char nap_server[512+6];
  12.  
  13. extern u_long nap_sigmask;
  14. extern char *nap_buf;
  15. extern char *nap_linktype[];
  16.  
  17. extern struct Library *SocketBase;
  18.  
  19. typedef struct song_struct {
  20.     char *title;
  21.     char *md5;
  22.     u_long size;
  23.     int bit, freq, time;
  24.     char *user;
  25.     u_long ip;
  26.     int link;
  27. } *song, _song;
  28.  
  29. #define NAPC_LOGINERROR        0
  30. #define NAPC_LOGIN_REQUEST     2    /* Jordan Ritter */
  31. #define NAPC_LOGINRESP         3
  32. #define NAPC_NEW_USER          6    /* Jordan Ritter */
  33. #define NAPC_CHECK_NAME        7    /* Jordan Ritter */
  34. #define NAPC_REGSUCCESS        8
  35. #define NAPC_REGUSED           9
  36. #define NAPC_NICKINVALID      10
  37. #define NAPC_NOTIFYSHARE     100
  38. #define NAPC_REMOVESHARE     102
  39. #define NAPC_SEARCH          200
  40. #define NAPC_SEARCHRESULT    201
  41. #define NAPC_SEARCHCOMPLETE  202
  42. #define NAPC_FILEINFOREQ     203
  43. #define NAPC_FILEINFO        204
  44. #define NAPC_PRIVATEMSG      205
  45. #define NAPC_GETERROR        206
  46. #define NAPC_HOTLIST_ADD     207
  47. #define NAPC_HOTLIST_INIT    208
  48. #define NAPC_USER_SIGNON     209
  49. #define NAPC_USER_SIGNOFF    210
  50. #define NAPC_BROWSEUSER      211
  51. #define NAPC_BROWSERESULT    212
  52. #define NAPC_BROWSECOMPLETE  213
  53. #define NAPC_FILECOUNT       214
  54. #define NAPC_DLINC           218
  55. #define NAPC_DLCOMPLETE      219
  56. #define NAPC_ULINC           220
  57. #define NAPC_ULCOMPLETE      221
  58. #define NAPC_HOTLIST_ACK     301
  59. #define NAPC_HOTLIST_ERROR   302
  60. #define NAPC_HOTLIST_REMOVE  303
  61. #define NAPC_CHANNELJOIN     400
  62. #define NAPC_CHANNELPART     401
  63. #define NAPC_PUBLICMSGSEND   402
  64. #define NAPC_PUBLICMSGRECV   403
  65. #define NAPC_GENERALERROR    404
  66. #define NAPC_JOINACK         405
  67. #define NAPC_JOINMSG         406
  68. #define NAPC_USERPART        407
  69. #define NAPC_USERLIST        408
  70. #define NAPC_USERLISTEND     409
  71. #define NAPC_CHANNELTOPIC    410
  72. #define NAPC_ALTDLREQ        500
  73. #define NAPC_ALTDLACK        501
  74. #define NAPC_WHOIS           603
  75. #define NAPC_WHOISRESP       604
  76. #define NAPC_WHOWASRESP      605
  77. #define NAPC_UPLOADREQ       607
  78. #define NAPC_UPLOADACCEPT    608
  79. #define NAPC_GETERROR2       609
  80. #define NAPC_LIST_CHANNELS   617
  81. #define NAPC_CHANNEL_ENTRY   618
  82. #define NAPC_LOCALQUEUEFULL  619
  83. #define NAPC_REMOTEQUEUEFULL 620
  84. #define NAPC_SYSMSG          621
  85. #define NAPC_GLOBALMSG       628
  86. #define NAPC_EMAILCHANGE     702
  87.  
  88. extern void nap_login_fromlist(char *server);
  89. extern void nap_login(void);
  90. extern void nap_logout(void);
  91. extern void nap_listen(void);
  92. extern void nap_send(u_int com);
  93. extern int nap_sendbuf(u_int com, char *buf);
  94. extern void nap_songfree(song s);
  95. extern song nap_songdup(song s);
  96.  
  97. extern char *nap_strippath(char *name);
  98. extern char *nap_token(char **str);
  99. extern int nap_itoken(char **str);
  100. extern u_long nap_ltoken(char **str);
  101.  
  102.  
  103.  
  104. #endif    /* AMSTER_NAPSTER_H */
  105.