home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / ConnectionTools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  3.6 KB  |  177 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ConnectionTools.h
  3.  
  4.      Contains:    Communications Toolbox Connection Tools Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1988-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __CONNECTIONTOOLS__
  18. #define __CONNECTIONTOOLS__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21. #include <ConditionalMacros.h>
  22. #endif
  23. #ifndef __DIALOGS__
  24. #include <Dialogs.h>
  25. #endif
  26. #ifndef __CONNECTIONS__
  27. #include <Connections.h>
  28. #endif
  29.  
  30.  
  31.  
  32. #if PRAGMA_ONCE
  33. #pragma once
  34. #endif
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. #if PRAGMA_IMPORT
  41. #pragma import on
  42. #endif
  43.  
  44. #if PRAGMA_STRUCT_ALIGN
  45.     #pragma options align=mac68k
  46. #elif PRAGMA_STRUCT_PACKPUSH
  47.     #pragma pack(push, 2)
  48. #elif PRAGMA_STRUCT_PACK
  49.     #pragma pack(2)
  50. #endif
  51.  
  52.  
  53. enum {
  54.                                                                 /* messages for DefProc */
  55.     cmInitMsg                    = 0,
  56.     cmDisposeMsg                = 1,
  57.     cmSuspendMsg                = 2,
  58.     cmResumeMsg                    = 3,
  59.     cmMenuMsg                    = 4,
  60.     cmEventMsg                    = 5,
  61.     cmActivateMsg                = 6,
  62.     cmDeactivateMsg                = 7,
  63.     cmIdleMsg                    = 50,
  64.     cmResetMsg                    = 51,
  65.     cmAbortMsg                    = 52,
  66.     cmReadMsg                    = 100,
  67.     cmWriteMsg                    = 101,
  68.     cmStatusMsg                    = 102,
  69.     cmListenMsg                    = 103,
  70.     cmAcceptMsg                    = 104,
  71.     cmCloseMsg                    = 105,
  72.     cmOpenMsg                    = 106,
  73.     cmBreakMsg                    = 107,
  74.     cmIOKillMsg                    = 108,
  75.     cmEnvironsMsg                = 109,                            /* new connection tool messages for ctb 1.1 */
  76.     cmNewIOPBMsg                = 110,
  77.     cmDisposeIOPBMsg            = 111,
  78.     cmGetErrorStringMsg            = 112,
  79.     cmPBReadMsg                    = 113,
  80.     cmPBWriteMsg                = 114,
  81.     cmPBIOKillMsg                = 115
  82. };
  83.  
  84.  
  85. enum {
  86.                                                                 /*    messages for validate DefProc    */
  87.     cmValidateMsg                = 0,
  88.     cmDefaultMsg                = 1
  89. };
  90.  
  91.  
  92. enum {
  93.                                                                 /*    messages for Setup DefProc    */
  94.     cmSpreflightMsg                = 0,
  95.     cmSsetupMsg                    = 1,
  96.     cmSitemMsg                    = 2,
  97.     cmSfilterMsg                = 3,
  98.     cmScleanupMsg                = 4
  99. };
  100.  
  101.  
  102. enum {
  103.                                                                 /*    messages for scripting defProc    */
  104.     cmMgetMsg                    = 0,
  105.     cmMsetMsg                    = 1
  106. };
  107.  
  108.  
  109. enum {
  110.                                                                 /*    messages for localization defProc    */
  111.     cmL2English                    = 0,
  112.     cmL2Intl                    = 1
  113. };
  114.  
  115.  
  116. enum {
  117.                                                                 /* private data constants */
  118.     cdefType                    = FOUR_CHAR_CODE('cdef'),        /* main connection definition procedure */
  119.     cvalType                    = FOUR_CHAR_CODE('cval'),        /* validation definition procedure */
  120.     csetType                    = FOUR_CHAR_CODE('cset'),        /* connection setup definition procedure */
  121.     clocType                    = FOUR_CHAR_CODE('cloc'),        /* connection configuration localization defProc */
  122.     cscrType                    = FOUR_CHAR_CODE('cscr'),        /* connection scripting defProc interfaces */
  123.     cbndType                    = FOUR_CHAR_CODE('cbnd'),        /* bundle type for connection */
  124.     cverType                    = FOUR_CHAR_CODE('vers')
  125. };
  126.  
  127.  
  128. struct CMDataBuffer {
  129.     Ptr                             thePtr;
  130.     long                             count;
  131.     CMChannel                         channel;
  132.     CMFlags                         flags;
  133. };
  134. typedef struct CMDataBuffer                CMDataBuffer;
  135. typedef CMDataBuffer *                    CMDataBufferPtr;
  136.  
  137. struct CMCompletorRecord {
  138.     Boolean                         async;
  139.     SInt8                             filler;
  140.     ConnectionCompletionUPP         completionRoutine;
  141. };
  142. typedef struct CMCompletorRecord        CMCompletorRecord;
  143.  
  144. typedef CMCompletorRecord *                CMCompletorPtr;
  145. /*    Private Data Structure    */
  146.  
  147. struct CMSetupStruct {
  148.     DialogPtr                         theDialog;
  149.     short                             count;
  150.     Ptr                             theConfig;
  151.     short                             procID;                        /* procID of the tool    */
  152. };
  153. typedef struct CMSetupStruct            CMSetupStruct;
  154.  
  155. typedef CMSetupStruct *                    CMSetupPtr;
  156.  
  157. #if PRAGMA_STRUCT_ALIGN
  158.     #pragma options align=reset
  159. #elif PRAGMA_STRUCT_PACKPUSH
  160.     #pragma pack(pop)
  161. #elif PRAGMA_STRUCT_PACK
  162.     #pragma pack()
  163. #endif
  164.  
  165. #ifdef PRAGMA_IMPORT_OFF
  166. #pragma import off
  167. #elif PRAGMA_IMPORT
  168. #pragma import reset
  169. #endif
  170.  
  171. #ifdef __cplusplus
  172. }
  173. #endif
  174.  
  175. #endif /* __CONNECTIONTOOLS__ */
  176.  
  177.