ConnectionTools.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:5k
源码类别:

多媒体编程

开发平台:

Visual C++

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