home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / Universal Headers 2.0.1f / ConnectionTools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-22  |  3.9 KB  |  167 lines  |  [TEXT/MMCC]

  1. /*
  2.      File:        ConnectionTools.h
  3.  
  4.      Contains:    Communications Toolbox Connection Tools Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __CONNECTIONTOOLS__
  21. #define __CONNECTIONTOOLS__
  22.  
  23.  
  24. #ifndef __WINDOWS__
  25. #include <Windows.h>
  26. #endif
  27. /*    #include <Types.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <Memory.h>                                            */
  30. /*        #include <MixedMode.h>                                    */
  31. /*    #include <Quickdraw.h>                                        */
  32. /*        #include <QuickdrawText.h>                                */
  33. /*    #include <Events.h>                                            */
  34. /*        #include <OSUtils.h>                                    */
  35. /*    #include <Controls.h>                                        */
  36. /*        #include <Menus.h>                                        */
  37.  
  38. #ifndef __DIALOGS__
  39. #include <Dialogs.h>
  40. #endif
  41. /*    #include <Errors.h>                                            */
  42. /*    #include <TextEdit.h>                                        */
  43.  
  44. #ifndef __CONNECTIONS__
  45. #include <Connections.h>
  46. #endif
  47. /*    #include <CTBUtilities.h>                                    */
  48. /*        #include <StandardFile.h>                                */
  49. /*            #include <Files.h>                                    */
  50. /*        #include <AppleTalk.h>                                    */
  51.  
  52. #ifdef __cplusplus
  53. extern "C" {
  54. #endif
  55.  
  56. #if PRAGMA_ALIGN_SUPPORTED
  57. #pragma options align=mac68k
  58. #endif
  59.  
  60. #if PRAGMA_IMPORT_SUPPORTED
  61. #pragma import on
  62. #endif
  63.  
  64.  
  65. enum {
  66. /* messages for DefProc */
  67.     cmInitMsg                    = 0,
  68.     cmDisposeMsg                = 1,
  69.     cmSuspendMsg                = 2,
  70.     cmResumeMsg                    = 3,
  71.     cmMenuMsg                    = 4,
  72.     cmEventMsg                    = 5,
  73.     cmActivateMsg                = 6,
  74.     cmDeactivateMsg                = 7,
  75.     cmIdleMsg                    = 50,
  76.     cmResetMsg                    = 51,
  77.     cmAbortMsg                    = 52,
  78.     cmReadMsg                    = 100,
  79.     cmWriteMsg                    = 101,
  80.     cmStatusMsg                    = 102,
  81.     cmListenMsg                    = 103,
  82.     cmAcceptMsg                    = 104,
  83.     cmCloseMsg                    = 105,
  84.     cmOpenMsg                    = 106,
  85.     cmBreakMsg                    = 107,
  86.     cmIOKillMsg                    = 108,
  87.     cmEnvironsMsg                = 109,
  88. /* new connection tool messages for ctb 1.1 */
  89.     cmNewIOPBMsg                = 110,
  90.     cmDisposeIOPBMsg            = 111,
  91.     cmGetErrorStringMsg            = 112,
  92.     cmPBReadMsg                    = 113,
  93.     cmPBWriteMsg                = 114,
  94.     cmPBIOKillMsg                = 115,
  95. /*    messages for validate DefProc    */
  96.     cmValidateMsg                = 0,
  97.     cmDefaultMsg                = 1,
  98. /*    messages for Setup DefProc    */
  99.     cmSpreflightMsg                = 0,
  100.     cmSsetupMsg                    = 1,
  101.     cmSitemMsg                    = 2,
  102.     cmSfilterMsg                = 3,
  103.     cmScleanupMsg                = 4,
  104. /*    messages for scripting defProc    */
  105.     cmMgetMsg                    = 0,
  106.     cmMsetMsg                    = 1,
  107. /*    messages for localization defProc    */
  108.     cmL2English                    = 0,
  109.     cmL2Intl                    = 1
  110. };
  111.  
  112. enum {
  113. /* private data constants */
  114.     cdefType                    = 'cdef',                        /* main connection definition procedure */
  115.     cvalType                    = 'cval',                        /* validation definition procedure */
  116.     csetType                    = 'cset',                        /* connection setup definition procedure */
  117.     clocType                    = 'cloc',                        /* connection configuration localization defProc */
  118.     cscrType                    = 'cscr',                        /* connection scripting defProc interfaces */
  119.     cbndType                    = 'cbnd',                        /* bundle type for connection */
  120.     cverType                    = 'vers'
  121. };
  122.  
  123. struct CMDataBuffer {
  124.     Ptr                                thePtr;
  125.     long                            count;
  126.     CMChannel                        channel;
  127.     CMFlags                            flags;
  128. };
  129. typedef struct CMDataBuffer CMDataBuffer;
  130.  
  131. typedef CMDataBuffer *CMDataBufferPtr;
  132.  
  133. struct CMCompletorRecord {
  134.     Boolean                            async;
  135.     SInt8                            filler;
  136.     ConnectionCompletionUPP            completionRoutine;
  137. };
  138. typedef struct CMCompletorRecord CMCompletorRecord;
  139.  
  140. typedef CMCompletorRecord *CMCompletorPtr;
  141.  
  142. /*    Private Data Structure    */
  143. struct CMSetupStruct {
  144.     DialogPtr                        theDialog;
  145.     short                            count;
  146.     Ptr                                theConfig;
  147.     short                            procID;                        /* procID of the tool    */
  148. };
  149. typedef struct CMSetupStruct CMSetupStruct;
  150.  
  151. typedef CMSetupStruct *CMSetupPtr;
  152.  
  153.  
  154. #if PRAGMA_IMPORT_SUPPORTED
  155. #pragma import off
  156. #endif
  157.  
  158. #if PRAGMA_ALIGN_SUPPORTED
  159. #pragma options align=reset
  160. #endif
  161.  
  162. #ifdef __cplusplus
  163. }
  164. #endif
  165.  
  166. #endif /* __CONNECTIONTOOLS__ */
  167.