home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / ftp.vapor.com / amirc / old / amirc_plugin_sdk_22.lzx / amirc_plugin.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-11-21  |  18.1 KB  |  576 lines

  1. #ifndef AMIRC_PLUGIN_H
  2. #define AMIRC_PLUGIN_H
  3.  
  4. /*
  5. ** AmIRC Plugin definitions
  6. ** ========================
  7. **
  8. ** (C) 1997-98 Oliver Wagner <owagner@vapor.com>
  9. ** All Rights Reserved
  10. **
  11. ** Revision 1 (22-11-97)
  12. ** ---------------------
  13. ** - initial version
  14. **
  15. ** Revision 2 (30-11-97)
  16. ** ---------------------
  17. ** - modified by Simone Tellini for
  18. **   GCC/StormC-compatibility
  19. ** - added note to not store the
  20. **   function table pointer globally.
  21. **
  22. ** Revision 3 (30-11-97)
  23. ** ---------------------
  24. ** - now all hook functions are
  25. **   called with a pointer to the
  26. **   functable, to overcome
  27. **   compiler which don't support
  28. **   unique data segments per opener.
  29. **
  30. ** Revision 4 (02-01-98)
  31. ** ---------------------
  32. ** - added new DCC handling functions
  33. ** - added sound function
  34. ** - added userdata field
  35. **
  36. ** Revision 5 (03-01-98)
  37. ** ---------------------
  38. ** - added color code definitions
  39. ** - added AMIPLUGATTR_ for Alias, Ignore and Hilite list
  40. ** - added amiplug_malloc()
  41. ** - added amiplug_getstring()
  42. ** - added amirc_stringnode and amirc_ignore definitions
  43. ** - modified amiplug_get(dcc)attr() prototype to use
  44. **   APTR for the storage pointer
  45. ** - added AMIPLUGATTR_StartupCFG, _FKeyStrings,
  46. **   _Catalog and _MemPool
  47. ** - added DCC state definitions
  48. **
  49. ** Revision 6 (04-01-98)
  50. ** ---------------------
  51. ** - added amiplug_queueline() function
  52. **
  53. ** Revision 7 (06-01-98)
  54. ** ---------------------
  55. ** - added AMIPLUGDCCATR_UserData
  56. **
  57. ** Revision 8 (08-01-98)
  58. ** ---------------------
  59. ** - added AMIPLUG_Query_CustomCTCP and related stuff
  60. **
  61. */
  62.  
  63. #ifndef _reg
  64. #ifdef _DCC
  65. #define _reg(x) __ ## x
  66. #else
  67. #define _reg(x) register __ ## x
  68. #endif
  69. #endif
  70.  
  71. #ifndef PLFUNC
  72. #if defined __MAXON__ || defined __STORM__ || defined _DCC
  73. #define PLFUNC
  74. #else
  75. #define PLFUNC __asm
  76. #endif
  77. #endif
  78.  
  79. #ifndef SAVEDS
  80. #ifdef __MAXON__
  81. #define SAVEDS
  82. #endif
  83. #if defined __STORM__ || defined __SASC
  84. #define SAVEDS __saveds
  85. #endif
  86. #if defined _GCC || defined _DCC
  87. #define SAVEDS __geta4
  88. #endif
  89. #endif
  90.  
  91. #include <exec/types.h>
  92. #ifdef __STORM__
  93. #include <exec/libraries.h>
  94. #endif
  95. /* ^ needed for the #pragma libbase below  */
  96. #include <utility/tagitem.h>
  97.  
  98. #define AMIPLUG_TAGBASE (TAG_USER+0x87c12)
  99.  
  100. /*
  101. ** AMIPLUG_Setup() is supposed to return a static TagList
  102. ** which describes the ability and requirements of
  103. ** a plugin.
  104. **
  105. ** Upon startup, AmIRC will scan PROGDIR:Plugins/#?.AMIPlug,
  106. ** OpenLibrary() anything it finds and call upon AMIPLUG_Setup()
  107. ** to get information.
  108. ** 
  109. */
  110.  
  111. #define AMIPLUG_QUERYBASE (AMIPLUG_TAGBASE+100)
  112.  
  113. #define AMIPLUG_Query_Version (AMIPLUG_QUERYBASE+0)                             /* ULONG version */
  114. #define AMIPLUG_Query_Revision (AMIPLUG_QUERYBASE+1)                    /* ULONG revision */
  115. #define AMIPLUG_Query_Copyright (AMIPLUG_QUERYBASE+2)                   /* STRPTR copyright information */
  116. #define AMIPLUG_Query_Infostring (AMIPLUG_QUERYBASE+3)                  /* STRPTR generic info string */
  117.  
  118. /* ULONG
  119.    Here you can specifiy the minimum AmIRC version
  120.    required for this plugin. AmIRC versions below
  121.    this one will simply skip the plugin during load.
  122.    The version is specified as a longword with the
  123.    high 16 bit word specifying the version, and the low
  124.    16 bit word specifying the revision. Example:
  125.    If the plugin requires a minimum AmIRC version of
  126.    2.1, the value would be 0x00020001
  127. */
  128. #define AMIPLUG_Query_MinAmIRCVersion (AMIPLUG_QUERYBASE+4)             /* ULONG */
  129.  
  130. /* BOOL
  131.    If this is TRUE, AmIRC will call the plugin's 
  132.    AMIPLUG_Hook_Rawline() function for every raw
  133.    line received from the server. If the function
  134.    returns a non-zero value, AmIRC will *NOT*
  135.    further process the line. Beware -- be very
  136.    very sure to not eat up any WHOIS or NAMES
  137.    or other server responses this way, otherwise
  138.    you may mess up AmIRC's internal processing
  139.    big time.
  140. */
  141. #define AMIPLUG_Query_Hook_Rawline (AMIPLUG_QUERYBASE+10)               
  142.  
  143. /* BOOL
  144.    If this is TRUE, AmIRC will call the plugin's 
  145.    AMIPLUG_Hook_DCC() function for every update of
  146.    the DCC list windows. The plugin can then call
  147.    upon amiplug_getdccattr() to find out more about
  148.    about the DCC connection in question.
  149. */
  150. #define AMIPLUG_Query_Hook_DCC (AMIPLUG_QUERYBASE+14)
  151.  
  152. /* BOOL
  153.    If this is TRUE, AmIRC will call the plugin's 
  154.    AMIPLUG_Hook_NumericMsg() function for every raw
  155.    line received from the server which is a numeric
  156.    message code. If the function returns a non-zero value, 
  157.    AmIRC will *NOT* further process the line. Beware -- be 
  158.    very very sure to not eat up any WHOIS or NAMES
  159.    or other server responses this way, otherwise
  160.    you may mess up AmIRC's internal processing
  161.    big time.
  162. */
  163. #define AMIPLUG_Query_Hook_NumericMsg (AMIPLUG_QUERYBASE+12)
  164.  
  165. /* struct amiplug_cmd *
  166.    This tag may appear several times. It specifies a 
  167.    custom command which will appear to the user as a
  168.    "normal" command. If the command parser hits one
  169.    of the user commands, it calls upon the plugin's
  170.    AMIPLUG_DoCommand() function.
  171.    See below for a description of amiplug_cmd.
  172. */
  173. #define AMIPLUG_Query_CustomCommand (AMIPLUG_QUERYBASE+11)
  174.  
  175. /* struct amiplug_menu *
  176.    This tag may appear several times. It specifies a 
  177.    custom menu item in the "Plugins" section. If the user
  178.    selects the menu item, the plugin's AMIPLUG_DoMenu() 
  179.    function is called.
  180.    See below for a description of amiplug_menu
  181. */
  182. #define AMIPLUG_Query_CustomMenu (AMIPLUG_QUERYBASE+13)
  183.  
  184. /* struct amiplug_ctcp *
  185.    This tag may appear several times. It specifies a 
  186.    custom ctcp command which will appear to the user as a
  187.    "normal" ctcp command. If a user request one
  188.    of the custom ctcp commands, it calls upon the plugin's
  189.    AMIPLUG_DoCTCP() function.
  190.    See below for a description of amiplug_ctcp.
  191. */
  192. #define AMIPLUG_Query_CustomCTCP (AMIPLUG_QUERYBASE+15)
  193.  
  194.  
  195. /*
  196. ** Structure describing a command.
  197. ** "name" is the command name (without trailing "/")
  198. ** "template" is the template given when the user types
  199. **   /? command
  200. ** "minimumparms" is the minimum number of parameters
  201. **   required for this command
  202. ** "needchannel" specifies that the first parameter
  203. **   has to be a channel name.
  204. */
  205. struct amiplug_cmd {
  206.         struct MinNode n;
  207.         char *name;
  208.         char *template;
  209.         ULONG commandid;
  210.         ULONG minimumparms;
  211.         ULONG needchannel;
  212. };
  213.  
  214. /*
  215. ** This structure is handed to a custom command
  216. ** when it is called.
  217. ** The "parms" pointers point to the start of
  218. ** the first, second and third command parts;
  219. ** parms2b and parms3b point to the WSP between
  220. ** the second and third command token. Example:
  221. ** If you want to split out the first command word,
  222. ** do a "*parms2b = 0;"
  223. */
  224. struct amiplug_cmdparm {
  225.         char *cmdline;
  226.         char *channelname;
  227.         char *parms, *parms2, *parms3;
  228.         char *parms2b, *parms3b;
  229.         APTR muiapp;
  230. };
  231.  
  232. /*
  233. ** Menu item specifier
  234. */
  235. struct amiplug_menu {
  236.         struct MinNode n;
  237.         APTR link;
  238.         char *label;
  239.         ULONG commandid;
  240. };
  241.  
  242. /*
  243. ** Custom CTCP command specifier
  244. */
  245. struct amiplug_ctcp {
  246.         struct MinNode n;
  247.         char *name;
  248.         ULONG commandid;
  249. };
  250.  
  251.  
  252. /*
  253. ** amiplug_getattr() can be used to get information
  254. ** an various internal states. It's used similiar
  255. ** to BOOPSI GetAttr(), and it returns a BOOL
  256. ** TRUE/FALSE value which designates whether
  257. ** the storage location is valid or not.
  258. **
  259. */
  260.  
  261. enum {
  262.     AMIPLUGATTR_first = 1,
  263.     AMIPLUGATTR_IsConnected,        /* ULONG: currently connected */
  264.     AMIPLUGATTR_CurrentNick,        /* STRPTR: Current nickname */
  265.     AMIPLUGATTR_CurrentServer,        /* STRPTR: Current server */
  266.     AMIPLUGATTR_CurrentServerPort,    /* ULONG: Current server port */
  267.     AMIPLUGATTR_ConnectTime,        /* time_t: When connection was established */
  268.     AMIPLUGATTR_AppObject,            /* APTR: MUI application object */
  269.     AMIPLUGATTR_AliasList,            /* struct MinList* list of amirc_stringnodes */
  270.     AMIPLUGATTR_HiliteList,            /* struct MinList* list of amirc_stringnodes */
  271.     AMIPLUGATTR_IgnoreList,            /* struct MinList* list of amirc_ignorenodes */
  272.     AMIPLUGATTR_StartupCFG,            /* STRPTR: name of startup cfg file */
  273.     AMIPLUGATTR_MemPool,            /* APTR: general AmIRC memory pool */
  274.     AMIPLUGATTR_FKeyStrings,        /* STRPTR[30]: function key strings*/
  275.     AMIPLUGATTR_Catalog,            /* APTR: catalog in use (may be NULL!) */
  276. };
  277.  
  278. /*
  279. ** amiplug_dccgetattr() can be used to get information
  280. ** about DCC connections. Returns FALSE if the DCCID
  281. ** could not be found, or the attribte was invalid.
  282. ** [SRC] shows whether the attribute is valid for
  283. ** Sends, Receives and Chats respectivly.
  284. **
  285. */
  286.  
  287. enum {
  288.     AMIPLUGDCCATTR_first = 8192,
  289.     AMIPLUGDCCATTR_Type,                /* [SRC] ULONG: 0 = Send, 1 = Receive, 2 = Chat */
  290.     AMIPLUGDCCATTR_Nick,                /* [SRC] STPRTR: nickname */
  291.     AMIPLUGDCCATTR_Filename,            /* [SR.] STPRTR: filename with path */
  292.     AMIPLUGDCCATTR_State,                /* [SRC] ULONG: state */
  293.     AMIPLUGDCCATTR_RemoteHostname,        /* [SRC] STRPTR: remote hostname */
  294.     AMIPLUGDCCATTR_RemoteIP,            /* [SRC] ULONG: remote IP */
  295.     AMIPLUGDCCATTR_Starttime,            /* [SR.] time_t: when transfer was started */
  296.     AMIPLUGDCCATTR_Filelen,                /* [SR.] ULONG: total filelen */
  297.     AMIPLUGDCCATTR_Filedone,            /* [SR.] ULONG: how much is transfered */
  298.     AMIPLUGDCCATTR_Startoffset,            /* [SR.] ULONG: startoffset, for resumes/moves */
  299.     AMIPLUGDCCATTR_IsMove,                /* [SR.] ULONG: whether this is a DCC MOVE */
  300.     AMIPLUGDCCATTR_IsTurbo,                /* [.R.] ULONG: whether this is a DCC TSEND */
  301.     AMIPLUGDCCATTR_IsStalled,            /* [SR.] ULONG: transfer stalled? */
  302.     AMIPLUGDCCATTR_IsSecure,            /* [..C] ULONG: encrypted SCHAT? */
  303.     AMIPLUGDCCATTR_UserData,            /* [..C] ULONG*: Pointer (!) to Userdata */
  304. };
  305.  
  306. /*
  307. ** Color codes for text output functions.
  308. ** These correspondend to user defined
  309. ** settings.
  310. */
  311. enum AMIRC_TEXTCOLS {
  312.     amirc_tc_normal = 0,
  313.     amirc_tc_highlite,
  314.     amirc_tc_private,
  315.     amirc_tc_server,
  316.     amirc_tc_mode,
  317.     amirc_tc_dcc,
  318.     amirc_tc_local
  319. };
  320.  
  321. /*
  322. ** Alias and Ignore lists are build of these nodes
  323. ** If you add your own, use amiplug_malloc() to
  324. ** obtain the memory, extending "string" to fit
  325. ** the string length, including (!) the zero terminator.
  326. */
  327. struct amirc_stringnode {
  328.     struct MinNode n;
  329.     char string[ 0 ];
  330. };
  331.  
  332. /*
  333. ** Structure used for Ignorelist. This may
  334. ** be subject for change in later versions.
  335. ** If you add your own, use amiplug_malloc() to
  336. ** obtain the memory, extending "string" to fit
  337. ** the string length, including (!) the zero terminator.
  338. */
  339. struct amirc_ignorenode {
  340.     struct MinNode n;
  341.     ULONG what;
  342.     ULONG count;
  343.     ULONG transient;
  344.     char userhost[ 0 ];
  345. };
  346. #define IGNF_TEXT 1
  347. #define IGNF_PRIV 2
  348. #define IGNF_CTCP 4
  349.  
  350.  
  351. /*
  352. ** DCC states
  353. */
  354.  
  355. /* Receive */
  356. #define DCCRS_WAITING 0
  357. #define DCCRS_CONNECTING 1
  358. #define DCCRS_RECEIVING 2
  359. #define DCCRS_COMPLETE 3
  360. #define DCCRS_FAILED 4
  361. #define DCCRS_NOCONNECT 5
  362. #define DCCRS_ABORTED 6
  363. #define DCCRS_NOSOCK 7
  364. #define DCCRS_NOHOST 8
  365. #define DCCRS_NOFILE 9
  366. #define DCCRS_WRITEERROR 10
  367.  
  368. /* Chat */
  369. #define DCCCS_WAITING 0
  370. #define DCCCS_CONNECTING 1
  371. #define DCCCS_CONNECTED 2
  372. #define DCCCS_WAITINGFOR 3
  373. #define DCCCS_CLOSED 4
  374. #define DCCCS_NOCONNECT 5
  375. #define DCCCS_NOSOCK 6
  376. #define DCCCS_ABORTED 7
  377.  
  378. /* Send */
  379. #define DCCSS_WAITINGFOR 0
  380. #define DCCSS_ABORTED 1
  381. #define DCCSS_SENDING 2
  382. #define DCCSS_COMPLETE 3
  383. #define DCCSS_FAILED 4
  384. #define DCCSS_NOSOCK 5
  385. #define DCCSS_NOFILE 6
  386. #define DCCSS_READERROR 7
  387. #define DCCSS_CALCCHECK 8
  388.  
  389.  
  390. /*
  391. ** All hook functions also receives a pointer to a table of
  392. ** functions which the plugin can call to have AmIRC perform
  393. ** certain operations. *NOTE* You *MUST NOT* store this
  394. ** function pointer globally, as it will be a different
  395. ** table for every new opener of the plugin library.
  396. ** If you use SAS/C, you can use libinitr.o to have
  397. ** the compiler create a new data segment for every
  398. ** opener; this also allows you to use global
  399. ** variables in the code easily.
  400. **
  401. ** Note that all functions have to follow register
  402. ** calling conventions.
  403. **
  404. ** The table also contains (hidden) context information,
  405. ** so it's necessary to pass it back to any function
  406. ** you call. Confusing? Nah :)
  407. **
  408. */
  409.  
  410. struct amiplug_functable {
  411.         int             amiplug_functabversion;
  412.  
  413.         /* Send raw data to the server */
  414.         int (PLFUNC * amiplug_sendraw)                  
  415.                 ( _reg(a0) struct amiplug_functable *ctx, _reg(a1) APTR data, _reg(d0) ULONG len );       
  416.  
  417.         /* find the user@host for a given nick */
  418.         char * (PLFUNC *amiplug_findnickuserhost)
  419.                 ( _reg(a0) struct amiplug_functable *ctx, _reg(a1) STRPTR nick );
  420.         /* like findnickuserhost, but will print a warning message
  421.            if the userhost can't be found */
  422.         char * (PLFUNC *amiplug_findnickuserhost_warn)
  423.                 ( _reg(a0) struct amiplug_functable *ctx, _reg(a1) STRPTR nick );
  424.  
  425.         /* The following functions are for outputting text to
  426.            any of the AmIRC windows */
  427.         /* Default window */
  428.         void (PLFUNC *amiplug_out_defwin)
  429.                 ( _reg(a0) struct amiplug_functable *ctx, _reg(d0) int color, _reg(a1) STRPTR prefix, _reg(a2) STRPTR txt );
  430.  
  431.         /* Output to a query window, if it exists, otherwise def window */
  432.         void (PLFUNC *amiplug_out_userwin)
  433.                 ( _reg(a0) struct amiplug_functable *ctx, _reg(d0) int color, _reg(a1) STRPTR prefix, _reg(a2) STRPTR txt, _reg(a3) STRPTR nick );
  434.  
  435.         /* Output to a channel window, if it exists, otherwise def window */
  436.         void (PLFUNC *amiplug_out_channelwin)
  437.                 ( _reg(a0) struct amiplug_functable *ctx, _reg(d0) int color, _reg(a1) STRPTR prefix, _reg(a2) STRPTR txt, _reg(a3) STRPTR channel );
  438.  
  439.         /* Get a pointer to the MUI userlist object of a certain channel */
  440.         APTR (PLFUNC *amiplug_getuserlv)
  441.                 ( _reg(a0) struct amiplug_functable *ctx, _reg(a1) STRPTR channel );
  442.  
  443.         /* Get some information from various AmIRC states. See
  444.            AMIPLUGATTR_ definitions above */
  445.         int (PLFUNC *amiplug_getattr)
  446.                 ( _reg(a0) struct amiplug_functable *ctx, _reg(d0) ULONG attrid, _reg(a1) APTR storage );
  447.  
  448.         /* Execute "line" as if the user entered it in the default
  449.            window. Similiar to AmIRC's "SAY" Rexx command. Returns FALSE
  450.            if the line couldn't be executed for some reason, TRUE otherwise */
  451.         int (PLFUNC *amiplug_say)
  452.                 ( _reg(a0) struct amiplug_functable *ctx, _reg(a1) STRPTR line );
  453.  
  454.         /* Play either a vanilla sound file or a event sound (if soundfile is NULL) */
  455.         int (PLFUNC *amiplug_playsound)
  456.                 ( _reg(a0) struct amiplug_functable *ctx, _reg(a1) STRPTR soundfile, _reg(d0) ULONG event );
  457.  
  458.         /* Add a DCC send request. Returns ID. method is 0 for DCC SEND,
  459.            1 for DCC MOVE. delay is in ticks, before the DCC offer is
  460.            send to the nick
  461.         */
  462.         ULONG (PLFUNC *amiplug_adddcc_send)
  463.                 ( _reg(a0) struct amiplug_functable *ctx, 
  464.                 _reg(a1) STRPTR nick ,
  465.                 _reg(a2) STRPTR filename,
  466.                 _reg(d0) ULONG method,
  467.                 _reg(d1) ULONG delay
  468.         );
  469.         /* Add a DCC receive request. ip and port show where
  470.            to connect to, "ismove" specifies whether this
  471.            is a DCC MOVE instead of a DCC SEND, "fileexists"
  472.            specifies the amount of "filename" already
  473.            there (locally), "isturbo" flags whether this is
  474.            a (PIRCH) TSEND, DCC SEND without ACKs. Returns
  475.            the DCC ID.
  476.         */
  477.         ULONG (PLFUNC *amiplug_adddcc_recv)
  478.                 ( _reg(a0) struct amiplug_functable *ctx, 
  479.                 _reg(a1) STRPTR nick ,
  480.                 _reg(a2) STRPTR filename,
  481.                 _reg(d0) ULONG len,
  482.                 _reg(d1) ULONG ip,
  483.                 _reg(d2) ULONG port,
  484.                 _reg(d3) ULONG ismove,
  485.                 _reg(d4) ULONG fileexists,
  486.                 _reg(d5) ULONG isturbo
  487.         );
  488.         /* Add a DCC CHAT request to "nick". */
  489.         ULONG (PLFUNC *amiplug_adddcc_chat)
  490.                 ( _reg(a0) struct amiplug_functable *ctx, 
  491.                 _reg(a1) STRPTR nick ,
  492.                 _reg(d0) ULONG secure
  493.         );
  494.  
  495.         /* Get some information about a DCC connection. Returns
  496.            FALSE if the DCCID could not be found, or the attribute
  497.            was invalid. See AMIPLUGDCCATTR_ definitions above */
  498.         int (PLFUNC *amiplug_dccgetattr)
  499.                ( _reg(a0) struct amiplug_functable *ctx, 
  500.                  _reg(d0) ULONG dccid, 
  501.                  _reg(d1) ULONG attrid, 
  502.                  _reg(a1) APTR storage 
  503.         );
  504.  
  505.         /* Abort DCC connection */
  506.         int (PLFUNC *amiplug_dccabort)
  507.                ( _reg(a0) struct amiplug_functable *ctx, 
  508.                  _reg(d0) ULONG dccid
  509.         );
  510.  
  511.         APTR userdata; /* Do with that whatever you want */
  512.  
  513.         /* Allocate some memory from AmIRC internal
  514.            pools. Used to manipulate Alias/Hilite/Ignorelists */
  515.         APTR (PLFUNC *amiplug_malloc)
  516.                ( _reg(a0) struct amiplug_functable *ctx, 
  517.                  _reg(d0) ULONG size
  518.         );
  519.  
  520.         /* Get a string from the internal catalog */
  521.         STRPTR (PLFUNC *amiplug_getstring)
  522.                ( _reg(a0) struct amiplug_functable *ctx, 
  523.                  _reg(d0) ULONG stringid
  524.         );
  525.  
  526.         /* Queue a line into AmIRC's throttled output queue */
  527.         void (PLFUNC *amiplug_queueline)
  528.                ( _reg(a0) struct amiplug_functable *ctx, 
  529.                  _reg(a1) STRPTR line
  530.         );
  531.  
  532.         APTR context; /* ***PRIVATE!!! DO NOT TOUCH!!!*** */
  533. };
  534.  
  535. #define AMIPLUG_FUNCTAB_VERSION 6
  536.  
  537. /*
  538. ** Library defintions
  539. */
  540.  
  541. #ifndef BUILDPLUGIN
  542.  
  543. #ifndef __STORM__
  544.  
  545. #ifndef NO_PRAGMAS
  546. #pragma libcall classlib AMIPLUG_Setup 1e 801
  547. #pragma libcall classlib AMIPLUG_Cleanup 24 801
  548. #pragma libcall classlib AMIPLUG_Hook_Rawline 2a 09803
  549. #pragma libcall classlib AMIPLUG_Hook_NumericMsg 30 C1BA09807
  550. #pragma libcall classlib AMIPLUG_DoCommand 36 90803
  551. #pragma libcall classlib AMIPLUG_DoMenu 3c 90803
  552. #pragma libcall classlib AMIPLUG_Hook_DCC 42 0802
  553. #pragma libcall classlib AMIPLUG_DoCTCP 48 BA90805
  554. #endif
  555.  
  556. #else
  557.  
  558. #pragma libbase Library;
  559.  
  560. #endif
  561.  
  562. #ifndef NO_PROTOS
  563. struct TagItem *AMIPLUG_Setup( struct amiplug_functable *ctx );
  564. void AMIPLUG_Cleanup( struct amiplug_functable *ctx );
  565. int AMIPLUG_Hook_Rawline( struct amiplug_functable *ctx, STRPTR line, ULONG len );
  566. int AMIPLUG_Hook_NumericMsg( struct amiplug_functable *ctx, STRPTR line, ULONG numericcode, STRPTR prefix, STRPTR dest, ULONG numargs, STRPTR *args );
  567. void AMIPLUG_DoCommand( struct amiplug_functable *ctx, ULONG commandid, struct amiplug_cmdparm *parmpacket );
  568. void AMIPLUG_DoMenu( struct amiplug_functable *ctx, ULONG commandid, APTR muiapp );
  569. void AMIPLUG_Hook_DCC( struct amiplug_functable *ctx, ULONG dccid );
  570. void AMIPLUG_DoCTCP( struct amiplug_functable *ctx, ULONG commandid, char *from, char *rest, char *to );
  571. #endif
  572.  
  573. #endif
  574.  
  575. #endif
  576.