home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / telex1.sit / Telexƒ / TelexDef < prev    next >
Text File  |  1991-05-04  |  2KB  |  50 lines

  1.                             /* ====================================== *\
  2.                             ** ==         AppleTalk  Teletype      == **
  3.                             ** ==         Common  Definitions      == **
  4.               ** == Copyright ⌐ Gamma Software, 1990 == **
  5.               ** ==           Think C version        == **
  6.                             \* ====================================== */
  7.  
  8. #include <AppleTalk.h>
  9. #include <nAppleTalk.h>
  10.  
  11. /* standard #defines   */
  12. #define  NIL    0
  13. #define  TRUE   1
  14. #define  FALSE  0
  15.  
  16. typedef unsigned char unchar;
  17.  
  18.  
  19. #define  RegTimeOut     10         /* time-out for AppleTalk Registration */
  20. #define  Nrepeat         3         /* number of repeats for -- " --       */
  21.  
  22. #define  Nnotes          4         /* Number of Messages in Buffer        */
  23. #define  MaxMessSize   250         /* Max size of Telex Message (bytes)   */
  24. #define  MaxHeaderSize  30         /* -- " --  Msg header for output(sym) */
  25.  
  26. #define  HeaderSTRID   200           /* ID of STR-type resource:Telex Header*/
  27. #define  OKiconID      128         /* ID of ICN#-type rsrc: startup ICON  */
  28. #define  BadIconID     129         /* --- " --- if installation failed    */
  29.  
  30. /* Str "Chooser Name": 'STR ' #0 from AppleTalk ('DRVR' #9) */
  31. #define  HomeID       (0xC000 + 0*0x800 + 9*0x20 + 0)
  32.  
  33. typedef struct {                   /* structure of one Message element    */
  34.   NMRec         q;                 /* Notification Manager Queue element  */
  35.     unchar        mess[MaxMessSize]; /* Message text to output (with Header)*/
  36.     short         busy;              /* flag: this element filled with a msg*/
  37. } NoteBuf;
  38.  
  39. typedef struct {                   /* Listener Global data                */
  40.   ATPParamBlock   ReqBlock;        /* AppleTalk GetRequest parameter block*/
  41.   ATPParamBlock   RespBlock;       /* AppleTalk SendResponse  -- " --     */
  42.   short           ReqSocket;       /* Listener's socket                   */
  43.   NamesTableEntry NbpEntry;        /* NBP names table entry for the socket*/
  44.   short           RespWord;        /* code to send as a response (OK,full)*/
  45.   BDSType         BDSArray;        /* data for sending a response         */
  46.   NoteBuf         NoteBlocks[Nnotes]; /* buffer for received messages     */
  47.   char            ReqBuff[256];    /* buffer for GetRequest (i.e. new msg)*/
  48.   char            MessHeader[MaxHeaderSize]; /* msg header used for output*/
  49. } Storage;
  50.