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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       AEDataModel.h
  3.  
  4.      Contains:   AppleEvent Data Model Interfaces.
  5.  
  6.      Version:    Technology: System 7.5
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1996-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 __AEDATAMODEL__
  18. #define __AEDATAMODEL__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __MIXEDMODE__
  23. #include "MixedMode.h"
  24. #endif
  25. #if PRAGMA_ONCE
  26. #pragma once
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34. #if PRAGMA_STRUCT_ALIGN
  35.     #pragma options align=mac68k
  36. #elif PRAGMA_STRUCT_PACKPUSH
  37.     #pragma pack(push, 2)
  38. #elif PRAGMA_STRUCT_PACK
  39.     #pragma pack(2)
  40. #endif
  41. /* Apple event descriptor types */
  42. enum {
  43.     typeBoolean                 = FOUR_CHAR_CODE('bool'),
  44.     typeChar                    = FOUR_CHAR_CODE('TEXT')
  45. };
  46. /* Preferred numeric Apple event descriptor types */
  47. enum {
  48.     typeSInt16                  = FOUR_CHAR_CODE('shor'),
  49.     typeSInt32                  = FOUR_CHAR_CODE('long'),
  50.     typeUInt32                  = FOUR_CHAR_CODE('magn'),
  51.     typeSInt64                  = FOUR_CHAR_CODE('comp'),
  52.     typeIEEE32BitFloatingPoint  = FOUR_CHAR_CODE('sing'),
  53.     typeIEEE64BitFloatingPoint  = FOUR_CHAR_CODE('doub'),
  54.     type128BitFloatingPoint     = FOUR_CHAR_CODE('ldbl'),
  55.     typeDecimalStruct           = FOUR_CHAR_CODE('decm')
  56. };
  57. /* Non-preferred Apple event descriptor types */
  58. enum {
  59.     typeSMInt                   = typeSInt16,
  60.     typeShortInteger            = typeSInt16,
  61.     typeInteger                 = typeSInt32,
  62.     typeLongInteger             = typeSInt32,
  63.     typeMagnitude               = typeUInt32,
  64.     typeComp                    = typeSInt64,
  65.     typeSMFloat                 = typeIEEE32BitFloatingPoint,
  66.     typeShortFloat              = typeIEEE32BitFloatingPoint,
  67.     typeFloat                   = typeIEEE64BitFloatingPoint,
  68.     typeLongFloat               = typeIEEE64BitFloatingPoint,
  69.     typeExtended                = FOUR_CHAR_CODE('exte')
  70. };
  71. /* More Apple event descriptor types */
  72. enum {
  73.     typeAEList                  = FOUR_CHAR_CODE('list'),
  74.     typeAERecord                = FOUR_CHAR_CODE('reco'),
  75.     typeAppleEvent              = FOUR_CHAR_CODE('aevt'),
  76.     typeEventRecord             = FOUR_CHAR_CODE('evrc'),
  77.     typeTrue                    = FOUR_CHAR_CODE('true'),
  78.     typeFalse                   = FOUR_CHAR_CODE('fals'),
  79.     typeAlias                   = FOUR_CHAR_CODE('alis'),
  80.     typeEnumerated              = FOUR_CHAR_CODE('enum'),
  81.     typeType                    = FOUR_CHAR_CODE('type'),
  82.     typeAppParameters           = FOUR_CHAR_CODE('appa'),
  83.     typeProperty                = FOUR_CHAR_CODE('prop'),
  84.     typeFSS                     = FOUR_CHAR_CODE('fss '),
  85.     typeKeyword                 = FOUR_CHAR_CODE('keyw'),
  86.     typeSectionH                = FOUR_CHAR_CODE('sect'),
  87.     typeWildCard                = FOUR_CHAR_CODE('****'),
  88.     typeApplSignature           = FOUR_CHAR_CODE('sign'),
  89.     typeQDRectangle             = FOUR_CHAR_CODE('qdrt'),
  90.     typeFixed                   = FOUR_CHAR_CODE('fixd'),
  91.     typeSessionID               = FOUR_CHAR_CODE('ssid'),
  92.     typeTargetID                = FOUR_CHAR_CODE('targ'),
  93.     typeProcessSerialNumber     = FOUR_CHAR_CODE('psn '),
  94.     typeKernelProcessID         = FOUR_CHAR_CODE('kpid'),
  95.     typeDispatcherID            = FOUR_CHAR_CODE('dspt'),
  96.     typeNull                    = FOUR_CHAR_CODE('null')        /* null or nonexistent data */
  97. };
  98. /* Keywords for Apple event attributes */
  99. enum {
  100.     keyTransactionIDAttr        = FOUR_CHAR_CODE('tran'),
  101.     keyReturnIDAttr             = FOUR_CHAR_CODE('rtid'),
  102.     keyEventClassAttr           = FOUR_CHAR_CODE('evcl'),
  103.     keyEventIDAttr              = FOUR_CHAR_CODE('evid'),
  104.     keyAddressAttr              = FOUR_CHAR_CODE('addr'),
  105.     keyOptionalKeywordAttr      = FOUR_CHAR_CODE('optk'),
  106.     keyTimeoutAttr              = FOUR_CHAR_CODE('timo'),
  107.     keyInteractLevelAttr        = FOUR_CHAR_CODE('inte'),       /* this attribute is read only - will be set in AESend */
  108.     keyEventSourceAttr          = FOUR_CHAR_CODE('esrc'),       /* this attribute is read only */
  109.     keyMissedKeywordAttr        = FOUR_CHAR_CODE('miss'),       /* this attribute is read only */
  110.     keyOriginalAddressAttr      = FOUR_CHAR_CODE('from')        /* new in 1.0.1 */
  111. };
  112. /*  Constants used for specifying the factoring of AEDescLists. */
  113. enum {
  114.     kAEDescListFactorNone       = 0,
  115.     kAEDescListFactorType       = 4,
  116.     kAEDescListFactorTypeAndSize = 8
  117. };
  118. /* Constants used creating an AppleEvent */
  119. enum {
  120.                                                                 /* Constant for the returnID param of AECreateAppleEvent */
  121.     kAutoGenerateReturnID       = -1,                           /* AECreateAppleEvent will generate a session-unique ID */
  122.                                                                 /* Constant for transaction ID's */
  123.     kAnyTransactionID           = 0                             /* no transaction is in use */
  124. };
  125. /* Apple event manager data types */
  126. typedef ResType                         DescType;
  127. typedef FourCharCode                    AEKeyword;
  128. #if OPAQUE_TOOLBOX_STRUCTS
  129. typedef struct OpaqueAEDataStorage*     AEDataStorage;
  130. #else
  131. typedef Handle                          AEDataStorage;
  132. #endif  /* OPAQUE_TOOLBOX_STRUCTS */
  133. struct AEDesc {
  134.     DescType                        descriptorType;
  135.     AEDataStorage                   dataHandle;
  136. };
  137. typedef struct AEDesc                   AEDesc;
  138. typedef AEDesc *                        AEDescPtr;
  139. struct AEKeyDesc {
  140.     AEKeyword                       descKey;
  141.     AEDesc                          descContent;
  142. };
  143. typedef struct AEKeyDesc                AEKeyDesc;
  144. /* a list of AEDesc's is a special kind of AEDesc */
  145. typedef AEDesc                          AEDescList;
  146. /* AERecord is a list of keyworded AEDesc's */
  147. typedef AEDescList                      AERecord;
  148. /* an AEDesc which contains address data */
  149. typedef AEDesc                          AEAddressDesc;
  150. /* an AERecord that contains an AppleEvent, and related data types */
  151. typedef AERecord                        AppleEvent;
  152. typedef AppleEvent *                    AppleEventPtr;
  153. typedef SInt16                          AEReturnID;
  154. typedef SInt32                          AETransactionID;
  155. typedef FourCharCode                    AEEventClass;
  156. typedef FourCharCode                    AEEventID;
  157. typedef SInt8                           AEArrayType;
  158. enum {
  159.     kAEDataArray                = 0,
  160.     kAEPackedArray              = 1,
  161.     kAEDescArray                = 3,
  162.     kAEKeyDescArray             = 4
  163. };
  164. enum {
  165.     kAEHandleArray              = 2
  166. };
  167. union AEArrayData {
  168.     short                           kAEDataArray[1];
  169.     char                            kAEPackedArray[1];
  170.     Handle                          kAEHandleArray[1];
  171.     AEDesc                          kAEDescArray[1];
  172.     AEKeyDesc                       kAEKeyDescArray[1];
  173. };
  174. typedef union AEArrayData               AEArrayData;
  175. typedef AEArrayData *                   AEArrayDataPointer;
  176. /**************************************************************************
  177.   These calls are used to set up and modify the coercion dispatch table.
  178. **************************************************************************/
  179. typedef CALLBACK_API( OSErr , AECoerceDescProcPtr )(const AEDesc *fromDesc, DescType toType, long handlerRefcon, AEDesc *toDesc);
  180. typedef CALLBACK_API( OSErr , AECoercePtrProcPtr )(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, long handlerRefcon, AEDesc *result);
  181. typedef STACK_UPP_TYPE(AECoerceDescProcPtr)                     AECoerceDescUPP;
  182. typedef STACK_UPP_TYPE(AECoercePtrProcPtr)                      AECoercePtrUPP;
  183. #if OPAQUE_UPP_TYPES
  184.     EXTERN_API(AECoerceDescUPP)
  185.     NewAECoerceDescUPP             (AECoerceDescProcPtr     userRoutine);
  186.     EXTERN_API(AECoercePtrUPP)
  187.     NewAECoercePtrUPP              (AECoercePtrProcPtr      userRoutine);
  188.     EXTERN_API(void)
  189.     DisposeAECoerceDescUPP         (AECoerceDescUPP         userUPP);
  190.     EXTERN_API(void)
  191.     DisposeAECoercePtrUPP          (AECoercePtrUPP          userUPP);
  192.     EXTERN_API(OSErr)
  193.     InvokeAECoerceDescUPP          (const AEDesc *          fromDesc,
  194.                                     DescType                toType,
  195.                                     long                    handlerRefcon,
  196.                                     AEDesc *                toDesc,
  197.                                     AECoerceDescUPP         userUPP);
  198.     EXTERN_API(OSErr)
  199.     InvokeAECoercePtrUPP           (DescType                typeCode,
  200.                                     const void *            dataPtr,
  201.                                     Size                    dataSize,
  202.                                     DescType                toType,
  203.                                     long                    handlerRefcon,
  204.                                     AEDesc *                result,
  205.                                     AECoercePtrUPP          userUPP);
  206. #else
  207.     enum { uppAECoerceDescProcInfo = 0x00003FE0 };                  /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  208.     enum { uppAECoercePtrProcInfo = 0x0003FFE0 };                   /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  209.     #define NewAECoerceDescUPP(userRoutine)                         (AECoerceDescUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoerceDescProcInfo, GetCurrentArchitecture())
  210.     #define NewAECoercePtrUPP(userRoutine)                          (AECoercePtrUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoercePtrProcInfo, GetCurrentArchitecture())
  211.     #define DisposeAECoerceDescUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  212.     #define DisposeAECoercePtrUPP(userUPP)                          DisposeRoutineDescriptor(userUPP)
  213.     #define InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppAECoerceDescProcInfo, (fromDesc), (toType), (handlerRefcon), (toDesc))
  214.     #define InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, result, userUPP)  (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppAECoercePtrProcInfo, (typeCode), (dataPtr), (dataSize), (toType), (handlerRefcon), (result))
  215. #endif
  216. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  217. #define NewAECoerceDescProc(userRoutine)                        NewAECoerceDescUPP(userRoutine)
  218. #define NewAECoercePtrProc(userRoutine)                         NewAECoercePtrUPP(userRoutine)
  219. #define CallAECoerceDescProc(userRoutine, fromDesc, toType, handlerRefcon, toDesc) InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userRoutine)
  220. #define CallAECoercePtrProc(userRoutine, typeCode, dataPtr, dataSize, toType, handlerRefcon, result) InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, result, userRoutine)
  221. typedef UniversalProcPtr                AECoercionHandlerUPP;
  222. EXTERN_API( OSErr )
  223. AEInstallCoercionHandler        (DescType               fromType,
  224.                                  DescType               toType,
  225.                                  AECoercionHandlerUPP   handler,
  226.                                  long                   handlerRefcon,
  227.                                  Boolean                fromTypeIsDesc,
  228.                                  Boolean                isSysHandler)                       THREEWORDINLINE(0x303C, 0x0A22, 0xA816);
  229. EXTERN_API( OSErr )
  230. AERemoveCoercionHandler         (DescType               fromType,
  231.                                  DescType               toType,
  232.                                  AECoercionHandlerUPP   handler,
  233.                                  Boolean                isSysHandler)                       THREEWORDINLINE(0x303C, 0x0723, 0xA816);
  234. EXTERN_API( OSErr )
  235. AEGetCoercionHandler            (DescType               fromType,
  236.                                  DescType               toType,
  237.                                  AECoercionHandlerUPP * handler,
  238.                                  long *                 handlerRefcon,
  239.                                  Boolean *              fromTypeIsDesc,
  240.                                  Boolean                isSysHandler)                       THREEWORDINLINE(0x303C, 0x0B24, 0xA816);
  241. /**************************************************************************
  242.   The following calls provide for a coercion interface.
  243. **************************************************************************/
  244. EXTERN_API( OSErr )
  245. AECoercePtr                     (DescType               typeCode,
  246.                                  const void *           dataPtr,
  247.                                  Size                   dataSize,
  248.                                  DescType               toType,
  249.                                  AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0A02, 0xA816);
  250. EXTERN_API( OSErr )
  251. AECoerceDesc                    (const AEDesc *         theAEDesc,
  252.                                  DescType               toType,
  253.                                  AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0603, 0xA816);
  254. /**************************************************************************
  255.  The following calls apply to any AEDesc. Every 'result' descriptor is
  256.  created for you, so you will be responsible for memory management
  257.  (including disposing) of the descriptors so created.  
  258. **************************************************************************/
  259. EXTERN_API( OSErr )
  260. AECreateDesc                    (DescType               typeCode,
  261.                                  const void *           dataPtr,
  262.                                  Size                   dataSize,
  263.                                  AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0825, 0xA816);
  264. EXTERN_API( OSErr )
  265. AEDisposeDesc                   (AEDesc *               theAEDesc)                          THREEWORDINLINE(0x303C, 0x0204, 0xA816);
  266. EXTERN_API( OSErr )
  267. AEDuplicateDesc                 (const AEDesc *         theAEDesc,
  268.                                  AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0405, 0xA816);
  269. /**************************************************************************
  270.   The following calls apply to AEDescList. Since AEDescList is a subtype of
  271.   AEDesc, the calls in the previous section can also be used for AEDescList.
  272.   All list and array indices are 1-based. If the data was greater than
  273.   maximumSize in the routines below, then actualSize will be greater than
  274.   maximumSize, but only maximumSize bytes will actually be retrieved.
  275. **************************************************************************/
  276. EXTERN_API( OSErr )
  277. AECreateList                    (const void *           factoringPtr,
  278.                                  Size                   factoredSize,
  279.                                  Boolean                isRecord,
  280.                                  AEDescList *           resultList)                         THREEWORDINLINE(0x303C, 0x0706, 0xA816);
  281. EXTERN_API( OSErr )
  282. AECountItems                    (const AEDescList *     theAEDescList,
  283.                                  long *                 theCount)                           THREEWORDINLINE(0x303C, 0x0407, 0xA816);
  284. EXTERN_API( OSErr )
  285. AEPutPtr                        (AEDescList *           theAEDescList,
  286.                                  long                   index,
  287.                                  DescType               typeCode,
  288.                                  const void *           dataPtr,
  289.                                  Size                   dataSize)                           THREEWORDINLINE(0x303C, 0x0A08, 0xA816);
  290. EXTERN_API( OSErr )
  291. AEPutDesc                       (AEDescList *           theAEDescList,
  292.                                  long                   index,
  293.                                  const AEDesc *         theAEDesc)                          THREEWORDINLINE(0x303C, 0x0609, 0xA816);
  294. EXTERN_API( OSErr )
  295. AEGetNthPtr                     (const AEDescList *     theAEDescList,
  296.                                  long                   index,
  297.                                  DescType               desiredType,
  298.                                  AEKeyword *            theAEKeyword,
  299.                                  DescType *             typeCode,
  300.                                  void *                 dataPtr,
  301.                                  Size                   maximumSize,
  302.                                  Size *                 actualSize)                         THREEWORDINLINE(0x303C, 0x100A, 0xA816);
  303. EXTERN_API( OSErr )
  304. AEGetNthDesc                    (const AEDescList *     theAEDescList,
  305.                                  long                   index,
  306.                                  DescType               desiredType,
  307.                                  AEKeyword *            theAEKeyword,
  308.                                  AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0A0B, 0xA816);
  309. EXTERN_API( OSErr )
  310. AESizeOfNthItem                 (const AEDescList *     theAEDescList,
  311.                                  long                   index,
  312.                                  DescType *             typeCode,
  313.                                  Size *                 dataSize)                           THREEWORDINLINE(0x303C, 0x082A, 0xA816);
  314. EXTERN_API( OSErr )
  315. AEGetArray                      (const AEDescList *     theAEDescList,
  316.                                  AEArrayType            arrayType,
  317.                                  AEArrayDataPointer     arrayPtr,
  318.                                  Size                   maximumSize,
  319.                                  DescType *             itemType,
  320.                                  Size *                 itemSize,
  321.                                  long *                 itemCount)                          THREEWORDINLINE(0x303C, 0x0D0C, 0xA816);
  322. EXTERN_API( OSErr )
  323. AEPutArray                      (AEDescList *           theAEDescList,
  324.                                  AEArrayType            arrayType,
  325.                                  const AEArrayData *    arrayPtr,
  326.                                  DescType               itemType,
  327.                                  Size                   itemSize,
  328.                                  long                   itemCount)                          THREEWORDINLINE(0x303C, 0x0B0D, 0xA816);
  329. EXTERN_API( OSErr )
  330. AEDeleteItem                    (AEDescList *           theAEDescList,
  331.                                  long                   index)                              THREEWORDINLINE(0x303C, 0x040E, 0xA816);
  332. /**************************************************************************
  333.  The following calls apply to AERecord. Since AERecord is a subtype of
  334.  AEDescList, the calls in the previous sections can also be used for
  335.  AERecord an AERecord can be created by using AECreateList with isRecord
  336.  set to true. 
  337. **************************************************************************/
  338. /*
  339.   Note: The following #defines map "key" calls on AERecords into "param" calls on 
  340.   AppleEvents.  Although no errors are currently returned if AERecords are 
  341.   passed to "param" calls and AppleEvents to "key" calls, the behavior of 
  342.   this type of API-mixing is not explicitly documented in Inside Macintosh.  
  343.   It just happens that the "key" calls have the same functionality as their 
  344.   "param" counterparts.  Since none of the "key" calls are currently available 
  345.   in the PowerPC IntefaceLib, the #defines exploit the fact that "key" and 
  346.   "param" routines can be used interchangeably, and makes sure that every 
  347.   invokation of a "key" API becomes an invokation of a "param" API.
  348. */
  349. #define AEPutKeyPtr(theAERecord, theAEKeyword, typeCode, dataPtr, dataSize) 
  350.     AEPutParamPtr((theAERecord), (theAEKeyword), (typeCode), (dataPtr), (dataSize))
  351. #define AEPutKeyDesc(theAERecord, theAEKeyword, theAEDesc) 
  352.     AEPutParamDesc((theAERecord), (theAEKeyword), (theAEDesc))
  353. #define AEGetKeyPtr(theAERecord, theAEKeyword, desiredType, typeCode, dataPtr, maxSize, actualSize) 
  354.     AEGetParamPtr((theAERecord), (theAEKeyword), (desiredType), (typeCode), (dataPtr), (maxSize), (actualSize))
  355. #define AEGetKeyDesc(theAERecord, theAEKeyword, desiredType, result) 
  356.     AEGetParamDesc((theAERecord), (theAEKeyword), (desiredType), (result))
  357. #define AESizeOfKeyDesc(theAERecord, theAEKeyword, typeCode, dataSize) 
  358.     AESizeOfParam((theAERecord), (theAEKeyword), (typeCode), (dataSize))
  359. #define AEDeleteKeyDesc(theAERecord, theAEKeyword) 
  360.     AEDeleteParam((theAERecord), (theAEKeyword))
  361. /**************************************************************************
  362.   The following calls create and manipulate the AppleEvent data type.
  363. **************************************************************************/
  364. EXTERN_API( OSErr )
  365. AECreateAppleEvent              (AEEventClass           theAEEventClass,
  366.                                  AEEventID              theAEEventID,
  367.                                  const AEAddressDesc *  target,
  368.                                  AEReturnID             returnID,
  369.                                  AETransactionID        transactionID,
  370.                                  AppleEvent *           result)                             THREEWORDINLINE(0x303C, 0x0B14, 0xA816);
  371. /**************************************************************************
  372.   The following calls are used to pack and unpack parameters from records
  373.   of type AppleEvent. Since AppleEvent is a subtype of AERecord, the calls
  374.   in the previous sections can also be used for variables of type
  375.   AppleEvent. The next six calls are in fact identical to the six calls
  376.   for AERecord.
  377. **************************************************************************/
  378. EXTERN_API( OSErr )
  379. AEPutParamPtr                   (AppleEvent *           theAppleEvent,
  380.                                  AEKeyword              theAEKeyword,
  381.                                  DescType               typeCode,
  382.                                  const void *           dataPtr,
  383.                                  Size                   dataSize)                           THREEWORDINLINE(0x303C, 0x0A0F, 0xA816);
  384. EXTERN_API( OSErr )
  385. AEPutParamDesc                  (AppleEvent *           theAppleEvent,
  386.                                  AEKeyword              theAEKeyword,
  387.                                  const AEDesc *         theAEDesc)                          THREEWORDINLINE(0x303C, 0x0610, 0xA816);
  388. EXTERN_API( OSErr )
  389. AEGetParamPtr                   (const AppleEvent *     theAppleEvent,
  390.                                  AEKeyword              theAEKeyword,
  391.                                  DescType               desiredType,
  392.                                  DescType *             typeCode,
  393.                                  void *                 dataPtr,
  394.                                  Size                   maximumSize,
  395.                                  Size *                 actualSize)                         THREEWORDINLINE(0x303C, 0x0E11, 0xA816);
  396. EXTERN_API( OSErr )
  397. AEGetParamDesc                  (const AppleEvent *     theAppleEvent,
  398.                                  AEKeyword              theAEKeyword,
  399.                                  DescType               desiredType,
  400.                                  AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0812, 0xA816);
  401. EXTERN_API( OSErr )
  402. AESizeOfParam                   (const AppleEvent *     theAppleEvent,
  403.                                  AEKeyword              theAEKeyword,
  404.                                  DescType *             typeCode,
  405.                                  Size *                 dataSize)                           THREEWORDINLINE(0x303C, 0x0829, 0xA816);
  406. EXTERN_API( OSErr )
  407. AEDeleteParam                   (AppleEvent *           theAppleEvent,
  408.                                  AEKeyword              theAEKeyword)                       THREEWORDINLINE(0x303C, 0x0413, 0xA816);
  409. /**************************************************************************
  410.  The following calls also apply to type AppleEvent. Message attributes are
  411.  far more restricted, and can only be accessed through the following 5
  412.  calls. The various list and record routines cannot be used to access the
  413.  attributes of an event. 
  414. **************************************************************************/
  415. EXTERN_API( OSErr )
  416. AEGetAttributePtr               (const AppleEvent *     theAppleEvent,
  417.                                  AEKeyword              theAEKeyword,
  418.                                  DescType               desiredType,
  419.                                  DescType *             typeCode,
  420.                                  void *                 dataPtr,
  421.                                  Size                   maximumSize,
  422.                                  Size *                 actualSize)                         THREEWORDINLINE(0x303C, 0x0E15, 0xA816);
  423. EXTERN_API( OSErr )
  424. AEGetAttributeDesc              (const AppleEvent *     theAppleEvent,
  425.                                  AEKeyword              theAEKeyword,
  426.                                  DescType               desiredType,
  427.                                  AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0826, 0xA816);
  428. EXTERN_API( OSErr )
  429. AESizeOfAttribute               (const AppleEvent *     theAppleEvent,
  430.                                  AEKeyword              theAEKeyword,
  431.                                  DescType *             typeCode,
  432.                                  Size *                 dataSize)                           THREEWORDINLINE(0x303C, 0x0828, 0xA816);
  433. EXTERN_API( OSErr )
  434. AEPutAttributePtr               (AppleEvent *           theAppleEvent,
  435.                                  AEKeyword              theAEKeyword,
  436.                                  DescType               typeCode,
  437.                                  const void *           dataPtr,
  438.                                  Size                   dataSize)                           THREEWORDINLINE(0x303C, 0x0A16, 0xA816);
  439. EXTERN_API( OSErr )
  440. AEPutAttributeDesc              (AppleEvent *           theAppleEvent,
  441.                                  AEKeyword              theAEKeyword,
  442.                                  const AEDesc *         theAEDesc)                          THREEWORDINLINE(0x303C, 0x0627, 0xA816);
  443. /**************************************************************************
  444.  The following calls are necessary to deal with opaque data in AEDescs, because the
  445.  traditional way of dealing with a basic AEDesc has been to dereference the dataHandle
  446.  directly.  This is not supported under Carbon.
  447. **************************************************************************/
  448. #if ACCESSOR_CALLS_ARE_FUNCTIONS
  449. /*
  450.         AEGetDescData no longer supports automatic coercion. If you'd like to
  451.         coerce the descriptor use AECoerceDesc.
  452.     */
  453. EXTERN_API( OSErr )
  454. AEGetDescData                   (const AEDesc *         theAEDesc,
  455.                                  void *                 dataPtr,
  456.                                  Size                   maximumSize);
  457. EXTERN_API( Size )
  458. AEGetDescDataSize               (const AEDesc *         theAEDesc);
  459. EXTERN_API( OSErr )
  460. AEReplaceDescData               (DescType               typeCode,
  461.                                  const void *           dataPtr,
  462.                                  Size                   dataSize,
  463.                                  AEDesc *               theAEDesc);
  464. #endif  /* ACCESSOR_CALLS_ARE_FUNCTIONS */
  465. #if PRAGMA_STRUCT_ALIGN
  466.     #pragma options align=reset
  467. #elif PRAGMA_STRUCT_PACKPUSH
  468.     #pragma pack(pop)
  469. #elif PRAGMA_STRUCT_PACK
  470.     #pragma pack()
  471. #endif
  472. #ifdef PRAGMA_IMPORT_OFF
  473. #pragma import off
  474. #elif PRAGMA_IMPORT
  475. #pragma import reset
  476. #endif
  477. #ifdef __cplusplus
  478. }
  479. #endif
  480. #endif /* __AEDATAMODEL__ */