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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       OCEMail.h
  3.  
  4.      Contains:   Apple Open Collaboration Environment OCEMail Interfaces.
  5.  
  6.      Version:    Technology: AOCE Toolbox 1.02
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1994-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 __OCEMAIL__
  18. #define __OCEMAIL__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __FILES__
  23. #include "Files.h"
  24. #endif
  25. #ifndef __TEXTEDIT__
  26. #include "TextEdit.h"
  27. #endif
  28. #ifndef __DIGITALSIGNATURE__
  29. #include "DigitalSignature.h"
  30. #endif
  31. #ifndef __OCE__
  32. #include "OCE.h"
  33. #endif
  34. #ifndef __OCEAUTHDIR__
  35. #include "OCEAuthDir.h"
  36. #endif
  37. #ifndef __OCEMESSAGING__
  38. #include "OCEMessaging.h"
  39. #endif
  40. #if PRAGMA_ONCE
  41. #pragma once
  42. #endif
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46. #if PRAGMA_IMPORT
  47. #pragma import on
  48. #endif
  49. #if PRAGMA_STRUCT_ALIGN
  50.     #pragma options align=mac68k
  51. #elif PRAGMA_STRUCT_PACKPUSH
  52.     #pragma pack(push, 2)
  53. #elif PRAGMA_STRUCT_PACK
  54.     #pragma pack(2)
  55. #endif
  56. /**************************************************************************************/
  57. /* Common Definitions */
  58. /**************************************************************************************/
  59. /* reference to a new or open letter or message */
  60. typedef long                            MailMsgRef;
  61. /* reference to an open msam queue */
  62. typedef long                            MSAMQueueRef;
  63. /* identifies slots managed by a PMSAM */
  64. typedef unsigned short                  MSAMSlotID;
  65. /* reference to an active mailbox */
  66. typedef long                            MailboxRef;
  67. /* identifies slots within a mailbox */
  68. typedef unsigned short                  MailSlotID;
  69. /* identifies a letter in a mailbox */
  70. struct MailSeqNum {
  71.     MailSlotID                      slotID;
  72.     long                            seqNum;
  73. };
  74. typedef struct MailSeqNum               MailSeqNum;
  75. /* A MailBuffer is used to describe a buffer used for an IO operation.
  76. The location of the buffer is pointed to by 'buffer'. 
  77. When reading, the size of the buffer is 'bufferSize' 
  78. and the size of data actually read is 'dataSize'.
  79. When writing, the size of data to be written is 'bufferSize' 
  80. and the size of data actually written is 'dataSize'.
  81. */
  82. struct MailBuffer {
  83.     long                            bufferSize;
  84.     void *                          buffer;
  85.     long                            dataSize;
  86. };
  87. typedef struct MailBuffer               MailBuffer;
  88. /* A MailReply is used to describe a commonly used reply buffer format.
  89. It contains a count of tuples followed by an array of tuples.
  90. The format of the tuple itself depends on each particular call.
  91. */
  92. struct MailReply {
  93.     unsigned short                  tupleCount;
  94.                                                                 /* tuple[tupleCount] */
  95. };
  96. typedef struct MailReply                MailReply;
  97. /* Shared Memory Communication Area used when Mail Manager sends 
  98. High Level Events to a PMSAM. 
  99. */
  100. struct SMCA {
  101.     unsigned short                  smcaLength;                 /* includes size of smcaLength field */
  102.     OSErr                           result;
  103.     long                            userBytes;
  104.     union {
  105.         CreationID                      slotCID;                /* for create/modify/delete slot calls */
  106.         long                            msgHint;                /* for kMailEPPCMsgOpened */
  107.     } u;
  108. };
  109. typedef struct SMCA                     SMCA;
  110. /**************************************************************************************/
  111. /* Value of creator and types fields for messages and blocks defined by MailManager */
  112. enum {
  113.     kMailAppleMailCreator       = FOUR_CHAR_CODE('apml'),       /* message and letter block creator */
  114.     kMailLtrMsgType             = FOUR_CHAR_CODE('lttr'),       /* message type of letters, reports */
  115.     kMailLtrHdrType             = FOUR_CHAR_CODE('lthd'),       /* contains letter header */
  116.     kMailContentType            = FOUR_CHAR_CODE('body'),       /* contains content of letter */
  117.     kMailEnclosureListType      = FOUR_CHAR_CODE('elst'),       /* contains list of enclosures */
  118.     kMailEnclosureDesktopType   = FOUR_CHAR_CODE('edsk'),       /* contains desktop mgr info for enclosures */
  119.     kMailEnclosureFileType      = FOUR_CHAR_CODE('asgl'),       /* contains a file enclosure, format is defined by AppleSingle */
  120.     kMailImageBodyType          = FOUR_CHAR_CODE('imag'),       /* contains image of letter */
  121.     kMailMSAMType               = FOUR_CHAR_CODE('gwyi'),       /* contains msam specific information */
  122.     kMailTunnelLtrType          = FOUR_CHAR_CODE('tunl'),       /* used to read a tunnelled message */
  123.     kMailHopInfoType            = FOUR_CHAR_CODE('hopi'),       /* used to read hopInfo for a tunnelled message */
  124.     kMailReportType             = FOUR_CHAR_CODE('rpti'),       /* contains report info */
  125.     kMailFamily                 = FOUR_CHAR_CODE('mail'),       /* Defines family of "mail" msgs: content, header, etc */
  126.     kMailFamilyFile             = FOUR_CHAR_CODE('file')        /* Defines family of "direct display" msgs */
  127. };
  128. /*    
  129. kMailImageBodyType:
  130.     format is struct TPfPgDir - in Printing.h
  131.     *   struct TPfPgDir {
  132.     *       short   pageCount;      - number of pages in the image.
  133.     *       long    iPgPos[129];    - iPgPos[n] is the offset from the start of the block
  134.     *                               - to image of page n.
  135.     *                               - iPgPos[n+1] - iPgPos[n] is the length of page n.
  136. kMailReportType:
  137. Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  138. This block has a header, IPMReportBlockHeader,
  139. followed by an array of elements, each of type IPMRecipientReport
  140. Various families used by mail or related msgs
  141. */
  142. /**************************************************************************************/
  143. typedef unsigned short                  MailAttributeID;
  144. /* Values of MailAttributeID */
  145. /* Message store attributes - stored in the catalog */
  146. /* Will always be present in a letter and have fixed sizes */
  147. enum {
  148.     kMailLetterFlagsBit         = 1,                            /* MailLetterFlags */
  149.                                                                 /* Letter attributes - stored in the letter will always be present in a letter and have fixed sizes */
  150.     kMailIndicationsBit         = 3,                            /* MailIndications */
  151.     kMailMsgTypeBit             = 4,                            /* OCECreatorType */
  152.     kMailLetterIDBit            = 5,                            /* MailLetterID */
  153.     kMailSendTimeStampBit       = 6,                            /* MailTime */
  154.     kMailNestingLevelBit        = 7,                            /* MailNestingLevel */
  155.     kMailMsgFamilyBit           = 8,                            /* OSType */
  156.                                                                 /* Letter attributes - stored in the letter may be present in a letter and have fixed sizes */
  157.     kMailReplyIDBit             = 9,                            /* MailLetterID */
  158.     kMailConversationIDBit      = 10,                           /* MailLetterID */
  159.                                                                 /* Letter attributes - stored in the letter may be present in a letter and have variable length sizes */
  160.     kMailSubjectBit             = 11,                           /* RString */
  161.     kMailFromBit                = 12,                           /* MailRecipient */
  162.     kMailToBit                  = 13,                           /* MailRecipient */
  163.     kMailCcBit                  = 14,                           /* MailRecipient */
  164.     kMailBccBit                 = 15                            /* MailRecipient */
  165. };
  166. typedef unsigned long                   MailAttributeMask;
  167. /* Values of MailAttributeMask */
  168. enum {
  169.     kMailLetterFlagsMask        = 1L << (kMailLetterFlagsBit - 1),
  170.     kMailIndicationsMask        = 1L << (kMailIndicationsBit - 1),
  171.     kMailMsgTypeMask            = 1L << (kMailMsgTypeBit - 1),
  172.     kMailLetterIDMask           = 1L << (kMailLetterIDBit - 1),
  173.     kMailSendTimeStampMask      = 1L << (kMailSendTimeStampBit - 1),
  174.     kMailNestingLevelMask       = 1L << (kMailNestingLevelBit - 1),
  175.     kMailMsgFamilyMask          = 1L << (kMailMsgFamilyBit - 1),
  176.     kMailReplyIDMask            = 1L << (kMailReplyIDBit - 1),
  177.     kMailConversationIDMask     = 1L << (kMailConversationIDBit - 1),
  178.     kMailSubjectMask            = 1L << (kMailSubjectBit - 1),
  179.     kMailFromMask               = 1L << (kMailFromBit - 1),
  180.     kMailToMask                 = 1L << (kMailToBit - 1),
  181.     kMailCcMask                 = 1L << (kMailCcBit - 1),
  182.     kMailBccMask                = 1L << (kMailBccBit - 1)
  183. };
  184. typedef unsigned long                   MailAttributeBitmap;
  185. /**************************************************************************************/
  186. typedef unsigned short                  MailLetterSystemFlags;
  187. /* Values of MailLetterSystemFlags */
  188. /* letter is available locally (either by nature or via cache) */
  189. enum {
  190.     kMailIsLocalBit             = 2
  191. };
  192. enum {
  193.     kMailIsLocalMask            = 1L << kMailIsLocalBit
  194. };
  195. typedef unsigned short                  MailLetterUserFlags;
  196. enum {
  197.     kMailReadBit                = 0,                            /* this letter has been opened */
  198.     kMailDontArchiveBit         = 1,                            /* this letter is not to be archived either because it has already been archived or it should not be archived. */
  199.     kMailInTrashBit             = 2                             /* this letter is in trash */
  200. };
  201. /* Values of MailLetterUserFlags */
  202. enum {
  203.     kMailReadMask               = 1L << kMailReadBit,
  204.     kMailDontArchiveMask        = 1L << kMailDontArchiveBit,
  205.     kMailInTrashMask            = 1L << kMailInTrashBit
  206. };
  207. struct MailLetterFlags {
  208.     MailLetterSystemFlags           sysFlags;
  209.     MailLetterUserFlags             userFlags;
  210. };
  211. typedef struct MailLetterFlags          MailLetterFlags;
  212. struct MailMaskedLetterFlags {
  213.     MailLetterFlags                 flagMask;                   /* flags that are to be set */
  214.     MailLetterFlags                 flagValues;                 /* and their values */
  215. };
  216. typedef struct MailMaskedLetterFlags    MailMaskedLetterFlags;
  217. enum {
  218.     kMailOriginalInReportBit    = 1,
  219.     kMailNonReceiptReportsBit   = 3,
  220.     kMailReceiptReportsBit      = 4,
  221.     kMailForwardedBit           = 5,
  222.     kMailPriorityBit            = 6,
  223.     kMailIsReportWithOriginalBit = 8,
  224.     kMailIsReportBit            = 9,
  225.     kMailHasContentBit          = 10,
  226.     kMailHasSignatureBit        = 11,
  227.     kMailAuthenticatedBit       = 12,
  228.     kMailSentBit                = 13,
  229.     kMailNativeContentBit       = 14,
  230.     kMailImageContentBit        = 15,
  231.     kMailStandardContentBit     = 16
  232. };
  233. /* Values of MailIndications */
  234. enum {
  235.     kMailStandardContentMask    = 1L << (kMailStandardContentBit - 1),
  236.     kMailImageContentMask       = 1L << (kMailImageContentBit - 1),
  237.     kMailNativeContentMask      = 1L << (kMailNativeContentBit - 1),
  238.     kMailSentMask               = 1L << (kMailSentBit - 1),
  239.     kMailAuthenticatedMask      = 1L << (kMailAuthenticatedBit - 1),
  240.     kMailHasSignatureMask       = 1L << (kMailHasSignatureBit - 1),
  241.     kMailHasContentMask         = 1L << (kMailHasContentBit - 1),
  242.     kMailIsReportMask           = 1L << (kMailIsReportBit - 1),
  243.     kMailIsReportWithOriginalMask = 1L << (kMailIsReportWithOriginalBit - 1),
  244.     kMailPriorityMask           = 3L << (kMailPriorityBit - 1),
  245.     kMailForwardedMask          = 1L << (kMailForwardedBit - 1),
  246.     kMailReceiptReportsMask     = 1L << (kMailReceiptReportsBit - 1),
  247.     kMailNonReceiptReportsMask  = 1L << (kMailNonReceiptReportsBit - 1),
  248.     kMailOriginalInReportMask   = 3L << (kMailOriginalInReportBit - 1)
  249. };
  250. typedef unsigned long                   MailIndications;
  251. /* values of the field originalInReport in MailIndications */
  252. enum {
  253.     kMailNoOriginal             = 0,                            /* do not enclose original in reports */
  254.     kMailEncloseOnNonReceipt    = 3                             /* enclose original in non-delivery reports */
  255. };
  256. typedef IPMMsgID                        MailLetterID;
  257. struct MailTime {
  258.     UTCTime                         time;                       /* current UTC(GMT) time */
  259.     UTCOffset                       offset;                     /* offset from GMT */
  260. };
  261. typedef struct MailTime                 MailTime;
  262. /* innermost letter has nestingLevel 0 */
  263. typedef unsigned short                  MailNestingLevel;
  264. typedef OCERecipient                    MailRecipient;
  265. /**************************************************************************************/
  266. enum {
  267.     kMailTextSegmentBit         = 0,
  268.     kMailPictSegmentBit         = 1,
  269.     kMailSoundSegmentBit        = 2,
  270.     kMailStyledTextSegmentBit   = 3,
  271.     kMailMovieSegmentBit        = 4
  272. };
  273. typedef unsigned short                  MailSegmentMask;
  274. /* Values of MailSegmentMask */
  275. enum {
  276.     kMailTextSegmentMask        = 1L << kMailTextSegmentBit,
  277.     kMailPictSegmentMask        = 1L << kMailPictSegmentBit,
  278.     kMailSoundSegmentMask       = 1L << kMailSoundSegmentBit,
  279.     kMailStyledTextSegmentMask  = 1L << kMailStyledTextSegmentBit,
  280.     kMailMovieSegmentMask       = 1L << kMailMovieSegmentBit
  281. };
  282. typedef unsigned short                  MailSegmentType;
  283. /* Values of MailSegmentType */
  284. enum {
  285.     kMailInvalidSegmentType     = 0,
  286.     kMailTextSegmentType        = 1,
  287.     kMailPictSegmentType        = 2,
  288.     kMailSoundSegmentType       = 3,
  289.     kMailStyledTextSegmentType  = 4,
  290.     kMailMovieSegmentType       = 5
  291. };
  292. /**************************************************************************************/
  293. enum {
  294.     kMailErrorLogEntryVersion   = 0x0101,
  295.     kMailMSAMErrorStringListID  = 128,                          /* These 'STR#' resources should be */
  296.     kMailMSAMActionStringListID = 129                           /* in the PMSAM resource fork */
  297. };
  298. typedef unsigned short                  MailLogErrorType;
  299. /* Values of MailLogErrorType */
  300. enum {
  301.     kMailELECorrectable         = 0,
  302.     kMailELEError               = 1,
  303.     kMailELEWarning             = 2,
  304.     kMailELEInformational       = 3
  305. };
  306. typedef short                           MailLogErrorCode;
  307. /* Values of MailLogErrorCode */
  308. enum {
  309.     kMailMSAMErrorCode          = 0,                            /* positive codes are indices into PMSAM defined strings */
  310.     kMailMiscError              = -1,                           /* negative codes are OCE defined */
  311.     kMailNoModem                = -2                            /* modem required, but missing */
  312. };
  313. struct MailErrorLogEntryInfo {
  314.     short                           version;
  315.     UTCTime                         timeOccurred;               /* do not fill in */
  316.     Str31                           reportingPMSAM;             /* do not fill in */
  317.     Str31                           reportingMSAMSlot;          /* do not fill in */
  318.     MailLogErrorType                errorType;
  319.     MailLogErrorCode                errorCode;
  320.     short                           errorResource;              /* resources are valid if */
  321.     short                           actionResource;             /* errorCode = kMailMSAMErrorCode index starts from 1 */
  322.     unsigned long                   filler;
  323.     unsigned short                  filler2;
  324. };
  325. typedef struct MailErrorLogEntryInfo    MailErrorLogEntryInfo;
  326. /**************************************************************************************/
  327. typedef short                           MailBlockMode;
  328. /* Values of MailBlockMode */
  329. enum {
  330.     kMailFromStart              = 1,                            /* write data from offset calculated from */
  331.     kMailFromLEOB               = 2,                            /* start of block, end of block, */
  332.     kMailFromMark               = 3                             /* or from the current mark */
  333. };
  334. struct MailEnclosureInfo {
  335.     StringPtr                       enclosureName;
  336.     CInfoPBPtr                      catInfo;
  337.     StringPtr                       comment;
  338.     void *                          icon;
  339. };
  340. typedef struct MailEnclosureInfo        MailEnclosureInfo;
  341. /**************************************************************************************/
  342. enum {
  343.     kOCESetupLocationNone       = 0,                            /* disconnect state */
  344.     kOCESetupLocationMax        = 8                             /* maximum location value */
  345. };
  346. typedef char                            OCESetupLocation;
  347. /* location state is a bitmask, 0x1=>1st location active, 
  348.  * 0x2 => 2nd, 0x4 => 3rd, etc.
  349.  */
  350. #define MailLocationMask(locationNumber) (1<<((locationNumber)-1))
  351. typedef UInt8                           MailLocationFlags;
  352. struct MailLocationInfo {
  353.     OCESetupLocation                location;
  354.     MailLocationFlags               active;
  355. };
  356. typedef struct MailLocationInfo         MailLocationInfo;
  357. /**************************************************************************************/
  358. /* Definitions for Personal MSAMs */
  359. /**************************************************************************************/
  360. enum {
  361.     kMailEPPCMsgVersion         = 3
  362. };
  363. struct MailEPPCMsg {
  364.     short                           version;
  365.     union {
  366.         SMCA *                          theSMCA;                /* for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn' */
  367.         long                            sequenceNumber;         /* for 'inqu', 'dlom' */
  368.         MailLocationInfo                locationInfo;           /* for 'locc' */
  369.     }                                 u;
  370. };
  371. typedef struct MailEPPCMsg              MailEPPCMsg;
  372. /* Values of OCE defined High Level Event message classes */
  373. enum {
  374.     kMailEPPCCreateSlot         = FOUR_CHAR_CODE('crsl'),
  375.     kMailEPPCModifySlot         = FOUR_CHAR_CODE('mdsl'),
  376.     kMailEPPCDeleteSlot         = FOUR_CHAR_CODE('dlsl'),
  377.     kMailEPPCShutDown           = FOUR_CHAR_CODE('quit'),
  378.     kMailEPPCMailboxOpened      = FOUR_CHAR_CODE('mbop'),
  379.     kMailEPPCMailboxClosed      = FOUR_CHAR_CODE('mbcl'),
  380.     kMailEPPCMsgPending         = FOUR_CHAR_CODE('msgp'),
  381.     kMailEPPCSendImmediate      = FOUR_CHAR_CODE('sndi'),
  382.     kMailEPPCContinue           = FOUR_CHAR_CODE('cont'),
  383.     kMailEPPCSchedule           = FOUR_CHAR_CODE('sked'),
  384.     kMailEPPCAdmin              = FOUR_CHAR_CODE('admn'),
  385.     kMailEPPCInQUpdate          = FOUR_CHAR_CODE('inqu'),
  386.     kMailEPPCMsgOpened          = FOUR_CHAR_CODE('msgo'),
  387.     kMailEPPCDeleteOutQMsg      = FOUR_CHAR_CODE('dlom'),
  388.     kMailEPPCWakeup             = FOUR_CHAR_CODE('wkup'),
  389.     kMailEPPCLocationChanged    = FOUR_CHAR_CODE('locc')
  390. };
  391. union MailTimer {
  392.     long                            frequency;                  /* how often to connect */
  393.     long                            connectTime;                /* time since midnight */
  394. };
  395. typedef union MailTimer                 MailTimer;
  396. enum {
  397.     kMailTimerOff               = 0,                            /* control is off */
  398.     kMailTimerTime              = 1,                            /* specifies connect time (relative to midnight) */
  399.     kMailTimerFrequency         = 2                             /* specifies connect frequency */
  400. };
  401. typedef Byte                            MailTimerKind;
  402. struct MailTimers {
  403.     MailTimerKind                   sendTimeKind;               /* either kMailTimerTime or kMailTimerFrequency */
  404.     MailTimerKind                   receiveTimeKind;            /* either kMailTimerTime or kMailTimerFrequency */
  405.     MailTimer                       send;
  406.     MailTimer                       receive;
  407. };
  408. typedef struct MailTimers               MailTimers;
  409. struct MailStandardSlotInfoAttribute {
  410.     short                           version;
  411.     MailLocationFlags               active;                     /* active if MailLocationMask(i) is set */
  412.     Byte                            padByte;
  413.     MailTimers                      sendReceiveTimer;
  414. };
  415. typedef struct MailStandardSlotInfoAttribute MailStandardSlotInfoAttribute;
  416. typedef union MSAMParam TempMSAMParam;
  417. typedef CALLBACK_API( void , MSAMIOCompletionProcPtr )(TempMSAMParam *paramBlock);
  418. /*
  419.     WARNING: MSAMIOCompletionProcPtr uses register based parameters under classic 68k
  420.              and cannot be written in a high-level language without 
  421.              the help of mixed mode or assembly glue.
  422. */
  423. typedef REGISTER_UPP_TYPE(MSAMIOCompletionProcPtr)              MSAMIOCompletionUPP;
  424. struct PMSAMGetMSAMRecordPB {
  425.     void *                          qLink;
  426.     long                            reservedH1;
  427.     long                            reservedH2;
  428.     MSAMIOCompletionUPP             ioCompletion;
  429.     OSErr                           ioResult;
  430.     long                            saveA5;
  431.     short                           reqCode;
  432.     CreationID                      msamCID;
  433. };
  434. typedef struct PMSAMGetMSAMRecordPB     PMSAMGetMSAMRecordPB;
  435. struct PMSAMOpenQueuesPB {
  436.     void *                          qLink;
  437.     long                            reservedH1;
  438.     long                            reservedH2;
  439.     MSAMIOCompletionUPP             ioCompletion;
  440.     OSErr                           ioResult;
  441.     long                            saveA5;
  442.     short                           reqCode;
  443.     MSAMQueueRef                    inQueueRef;
  444.     MSAMQueueRef                    outQueueRef;
  445.     MSAMSlotID                      msamSlotID;
  446.     long                            filler[2];
  447. };
  448. typedef struct PMSAMOpenQueuesPB        PMSAMOpenQueuesPB;
  449. typedef unsigned short                  PMSAMStatus;
  450. /* Values of PMSAMStatus */
  451. enum {
  452.     kPMSAMStatusPending         = 1,                            /* for inQueue and outQueue */
  453.     kPMSAMStatusError           = 2,                            /* for inQueue and outQueue */
  454.     kPMSAMStatusSending         = 3,                            /* for outQueue only */
  455.     kPMSAMStatusCaching         = 4,                            /* for inQueue only */
  456.     kPMSAMStatusSent            = 5                             /* for outQueue only */
  457. };
  458. struct PMSAMSetStatusPB {
  459.     void *                          qLink;
  460.     long                            reservedH1;
  461.     long                            reservedH2;
  462.     MSAMIOCompletionUPP             ioCompletion;
  463.     OSErr                           ioResult;
  464.     long                            saveA5;
  465.     short                           reqCode;
  466.     MSAMQueueRef                    queueRef;
  467.     long                            seqNum;
  468.     long                            msgHint;                    /* for posting cache error,set this to 0 when report outq status */
  469.     PMSAMStatus                     status;
  470. };
  471. typedef struct PMSAMSetStatusPB         PMSAMSetStatusPB;
  472. struct PMSAMLogErrorPB {
  473.     void *                          qLink;
  474.     long                            reservedH1;
  475.     long                            reservedH2;
  476.     MSAMIOCompletionUPP             ioCompletion;
  477.     OSErr                           ioResult;
  478.     long                            saveA5;
  479.     short                           reqCode;
  480.     MSAMSlotID                      msamSlotID;                 /* 0 for PMSAM errors */
  481.     MailErrorLogEntryInfo *         logEntry;
  482.     long                            filler[2];
  483. };
  484. typedef struct PMSAMLogErrorPB          PMSAMLogErrorPB;
  485. /****************************************************************************************/
  486. enum {
  487.     kMailMsgSummaryVersion      = 1
  488. };
  489. struct MailMasterData {
  490.     MailAttributeBitmap             attrMask;                   /* indicates attributes present in MsgSummary */
  491.     MailLetterID                    messageID;
  492.     MailLetterID                    replyID;
  493.     MailLetterID                    conversationID;
  494. };
  495. typedef struct MailMasterData           MailMasterData;
  496. /* Values for addressedToMe in struct MailCoreData */
  497. enum {
  498.     kAddressedAs_TO             = 0x01,
  499.     kAddressedAs_CC             = 0x02,
  500.     kAddressedAs_BCC            = 0x04
  501. };
  502. struct MailCoreData {
  503.     MailLetterFlags                 letterFlags;
  504.     unsigned long                   messageSize;
  505.     MailIndications                 letterIndications;
  506.     OCECreatorType                  messageType;
  507.     MailTime                        sendTime;
  508.     OSType                          messageFamily;
  509.     unsigned char                   reserved;
  510.     unsigned char                   addressedToMe;
  511.     char                            agentInfo[6];               /* 6 bytes of special info [set to zero] */
  512.                                                                 /* these are variable length and even padded */
  513.     RString32                       sender;                     /* recipient's entityName (trunc)*/
  514.     RString32                       subject;                    /* subject maybe truncated */
  515. };
  516. typedef struct MailCoreData             MailCoreData;
  517. struct MSAMMsgSummary {
  518.     short                           version;                    /* following flags are defaulted by Toolbox */
  519.     Boolean                         msgDeleted;                 /* true if msg is to be deleted by PMSAM */
  520.     Boolean                         msgUpdated;                 /* true if msgSummary was updated by MailManager */
  521.     Boolean                         msgCached;                  /* true if msg is in the slot's InQueue */
  522.     Byte                            padByte;
  523.     MailMasterData                  masterData;
  524.     MailCoreData                    coreData;
  525. };
  526. typedef struct MSAMMsgSummary           MSAMMsgSummary;
  527. /* PMSAM can put up to 128 bytes of private msg summary data */
  528. enum {
  529.     kMailMaxPMSAMMsgSummaryData = 128
  530. };
  531. struct PMSAMCreateMsgSummaryPB {
  532.     void *                          qLink;
  533.     long                            reservedH1;
  534.     long                            reservedH2;
  535.     MSAMIOCompletionUPP             ioCompletion;
  536.     OSErr                           ioResult;
  537.     long                            saveA5;
  538.     short                           reqCode;
  539.     MSAMQueueRef                    inQueueRef;
  540.     long                            seqNum;                     /* <- seq of the new message */
  541.     MSAMMsgSummary *                msgSummary;                 /* attributes and mask filled in */
  542.     MailBuffer *                    buffer;                     /* PMSAM specific data to be appended */
  543. };
  544. typedef struct PMSAMCreateMsgSummaryPB  PMSAMCreateMsgSummaryPB;
  545. struct PMSAMPutMsgSummaryPB {
  546.     void *                          qLink;
  547.     long                            reservedH1;
  548.     long                            reservedH2;
  549.     MSAMIOCompletionUPP             ioCompletion;
  550.     OSErr                           ioResult;
  551.     long                            saveA5;
  552.     short                           reqCode;
  553.     MSAMQueueRef                    inQueueRef;
  554.     long                            seqNum;
  555.     MailMaskedLetterFlags *         letterFlags;                /* if not nil, then set msgStoreFlags */
  556.     MailBuffer *                    buffer;                     /* PMSAM specific data to be overwritten */
  557. };
  558. typedef struct PMSAMPutMsgSummaryPB     PMSAMPutMsgSummaryPB;
  559. struct PMSAMGetMsgSummaryPB {
  560.     void *                          qLink;
  561.     long                            reservedH1;
  562.     long                            reservedH2;
  563.     MSAMIOCompletionUPP             ioCompletion;
  564.     OSErr                           ioResult;
  565.     long                            saveA5;
  566.     short                           reqCode;
  567.     MSAMQueueRef                    inQueueRef;
  568.     long                            seqNum;
  569.     MSAMMsgSummary *                msgSummary;                 /* if not nil, then read in the msgSummary */
  570.     MailBuffer *                    buffer;                     /* PMSAM specific data to be read */
  571.     unsigned short                  msgSummaryOffset;           /* offset of PMSAM specific data from start of MsgSummary */
  572. };
  573. typedef struct PMSAMGetMsgSummaryPB     PMSAMGetMsgSummaryPB;
  574. /****************************************************************************************/
  575. /* Definitions for Server MSAMs */
  576. /**************************************************************************************/
  577. typedef unsigned short                  SMSAMAdminCode;
  578. /* Values of SMSAMAdminCode */
  579. enum {
  580.     kSMSAMNotifyFwdrSetupChange = 1,
  581.     kSMSAMNotifyFwdrNameChange  = 2,
  582.     kSMSAMNotifyFwdrPwdChange   = 3,
  583.     kSMSAMGetDynamicFwdrParams  = 4
  584. };
  585. typedef unsigned long                   SMSAMSlotChanges;
  586. enum {
  587.     kSMSAMFwdrHomeInternetChangedBit = 0,
  588.     kSMSAMFwdrConnectedToChangedBit = 1,
  589.     kSMSAMFwdrForeignRLIsChangedBit = 2,
  590.     kSMSAMFwdrMnMServerChangedBit = 3
  591. };
  592. /* Values of SMSAMSlotChanges */
  593. enum {
  594.     kSMSAMFwdrEverythingChangedMask = -1,
  595.     kSMSAMFwdrHomeInternetChangedMask = 1L << kSMSAMFwdrHomeInternetChangedBit,
  596.     kSMSAMFwdrConnectedToChangedMask = 1L << kSMSAMFwdrConnectedToChangedBit,
  597.     kSMSAMFwdrForeignRLIsChangedMask = 1L << kSMSAMFwdrForeignRLIsChangedBit,
  598.     kSMSAMFwdrMnMServerChangedMask = 1L << kSMSAMFwdrMnMServerChangedBit
  599. };
  600. /* kSMSAMNotifyFwdrSetupChange */
  601. struct SMSAMSetupChange {
  602.     SMSAMSlotChanges                whatChanged;                /*  --> bitmap of what parameters changed */
  603.     AddrBlock                       serverHint;                 /*  --> try this ADAP server first */
  604. };
  605. typedef struct SMSAMSetupChange         SMSAMSetupChange;
  606. /* kSMSAMNotifyFwdrNameChange */
  607. struct SMSAMNameChange {
  608.     RString                         newName;                    /*  --> msams new name */
  609.     AddrBlock                       serverHint;                 /*  --> try this ADAP server first */
  610. };
  611. typedef struct SMSAMNameChange          SMSAMNameChange;
  612. /* kSMSAMNotifyFwdrPasswordChange */
  613. struct SMSAMPasswordChange {
  614.     RString                         newPassword;                /*  --> msams new password */
  615.     AddrBlock                       serverHint;                 /*  --> try this ADAP server first */
  616. };
  617. typedef struct SMSAMPasswordChange      SMSAMPasswordChange;
  618. /* kSMSAMGetDynamicFwdrParams */
  619. struct SMSAMDynamicParams {
  620.     unsigned long                   curDiskUsed;                /* <--  amount of disk space used by msam */
  621.     unsigned long                   curMemoryUsed;              /* <--  amount of memory used by msam */
  622. };
  623. typedef struct SMSAMDynamicParams       SMSAMDynamicParams;
  624. struct SMSAMAdminEPPCRequest {
  625.     SMSAMAdminCode                  adminCode;
  626.     union {
  627.         SMSAMSetupChange                setupChange;
  628.         SMSAMNameChange                 nameChange;
  629.         SMSAMPasswordChange             passwordChange;
  630.         SMSAMDynamicParams              dynamicParams;
  631.     }                                 u;
  632. };
  633. typedef struct SMSAMAdminEPPCRequest    SMSAMAdminEPPCRequest;
  634. struct SMSAMSetupPB {
  635.     void *                          qLink;
  636.     long                            reservedH1;
  637.     long                            reservedH2;
  638.     MSAMIOCompletionUPP             ioCompletion;
  639.     OSErr                           ioResult;
  640.     long                            saveA5;
  641.     short                           reqCode;
  642.     RecordIDPtr                     serverMSAM;
  643.     RStringPtr                      password;
  644.     OSType                          gatewayType;
  645.     RStringPtr                      gatewayTypeDescription;
  646.     AddrBlock                       catalogServerHint;
  647. };
  648. typedef struct SMSAMSetupPB             SMSAMSetupPB;
  649. struct SMSAMStartupPB {
  650.     void *                          qLink;
  651.     long                            reservedH1;
  652.     long                            reservedH2;
  653.     MSAMIOCompletionUPP             ioCompletion;
  654.     OSErr                           ioResult;
  655.     long                            saveA5;
  656.     short                           reqCode;
  657.     AuthIdentity                    msamIdentity;
  658.     MSAMQueueRef                    queueRef;
  659. };
  660. typedef struct SMSAMStartupPB           SMSAMStartupPB;
  661. struct SMSAMShutdownPB {
  662.     void *                          qLink;
  663.     long                            reservedH1;
  664.     long                            reservedH2;
  665.     MSAMIOCompletionUPP             ioCompletion;
  666.     OSErr                           ioResult;
  667.     long                            saveA5;
  668.     short                           reqCode;
  669.     MSAMQueueRef                    queueRef;
  670. };
  671. typedef struct SMSAMShutdownPB          SMSAMShutdownPB;
  672. /****************************************************************************************/
  673. /* Definitions for reading and writing MSAM Letters */
  674. /****************************************************************************************/
  675. struct MSAMEnumeratePB {
  676.     void *                          qLink;
  677.     long                            reservedH1;
  678.     long                            reservedH2;
  679.     MSAMIOCompletionUPP             ioCompletion;
  680.     OSErr                           ioResult;
  681.     long                            saveA5;
  682.     short                           reqCode;
  683.     MSAMQueueRef                    queueRef;
  684.     long                            startSeqNum;
  685.     long                            nextSeqNum;
  686.                                                                 /* buffer contains a Mail Reply. Each tuple is a MSAMEnumerateInQReply when enumerating the inQueue MSAMEnumerateOutQReply when enumerating the outQueue */
  687.     MailBuffer                      buffer;
  688. };
  689. typedef struct MSAMEnumeratePB          MSAMEnumeratePB;
  690. struct MSAMEnumerateInQReply {
  691.     long                            seqNum;
  692.     Boolean                         msgDeleted;                 /* true if msg is to be deleted by PMSAM */
  693.     Boolean                         msgUpdated;                 /* true if MsgSummary has been updated by TB */
  694.     Boolean                         msgCached;                  /* true if msg is in the incoming queue */
  695.     Byte                            padByte;
  696. };
  697. typedef struct MSAMEnumerateInQReply    MSAMEnumerateInQReply;
  698. struct MSAMEnumerateOutQReply {
  699.     long                            seqNum;
  700.     Boolean                         done;                       /* true if all responsible recipients have been processed */
  701.     IPMPriority                     priority;
  702.     OSType                          msgFamily;
  703.     long                            approxSize;
  704.     Boolean                         tunnelForm;                 /* true if this letter has to be tunnelled */
  705.     Byte                            padByte;
  706.     NetworkSpec                     nextHop;                    /* valid if tunnelForm is true */
  707.     OCECreatorType                  msgType;
  708. };
  709. typedef struct MSAMEnumerateOutQReply   MSAMEnumerateOutQReply;
  710. struct MSAMDeletePB {
  711.     void *                          qLink;
  712.     long                            reservedH1;
  713.     long                            reservedH2;
  714.     MSAMIOCompletionUPP             ioCompletion;
  715.     OSErr                           ioResult;
  716.     long                            saveA5;
  717.     short                           reqCode;
  718.     MSAMQueueRef                    queueRef;
  719.     long                            seqNum;
  720.     Boolean                         msgOnly;                    /* only valid for PMSAM & inQueue */
  721.                                                                 /* set true to delete message but not msgSummary */
  722.     Byte                            padByte;
  723.                                                                 /* only valid for SMSAM & tunnelled messages */
  724.     OSErr                           result;
  725. };
  726. typedef struct MSAMDeletePB             MSAMDeletePB;
  727. struct MSAMOpenPB {
  728.     void *                          qLink;
  729.     long                            reservedH1;
  730.     long                            reservedH2;
  731.     MSAMIOCompletionUPP             ioCompletion;
  732.     OSErr                           ioResult;
  733.     long                            saveA5;
  734.     short                           reqCode;
  735.     MSAMQueueRef                    queueRef;
  736.     long                            seqNum;
  737.     MailMsgRef                      mailMsgRef;
  738. };
  739. typedef struct MSAMOpenPB               MSAMOpenPB;
  740. struct MSAMOpenNestedPB {
  741.     void *                          qLink;
  742.     long                            reservedH1;
  743.     long                            reservedH2;
  744.     MSAMIOCompletionUPP             ioCompletion;
  745.     OSErr                           ioResult;
  746.     long                            saveA5;
  747.     short                           reqCode;
  748.     MailMsgRef                      mailMsgRef;
  749.     MailMsgRef                      nestedRef;
  750. };
  751. typedef struct MSAMOpenNestedPB         MSAMOpenNestedPB;
  752. struct MSAMClosePB {
  753.     void *                          qLink;
  754.     long                            reservedH1;
  755.     long                            reservedH2;
  756.     MSAMIOCompletionUPP             ioCompletion;
  757.     OSErr                           ioResult;
  758.     long                            saveA5;
  759.     short                           reqCode;
  760.     MailMsgRef                      mailMsgRef;
  761. };
  762. typedef struct MSAMClosePB              MSAMClosePB;
  763. struct MSAMGetMsgHeaderPB {
  764.     void *                          qLink;
  765.     long                            reservedH1;
  766.     long                            reservedH2;
  767.     MSAMIOCompletionUPP             ioCompletion;
  768.     OSErr                           ioResult;
  769.     long                            saveA5;
  770.     short                           reqCode;
  771.     MailMsgRef                      mailMsgRef;
  772.     IPMHeaderSelector               selector;
  773.     Boolean                         filler1;
  774.     unsigned long                   offset;
  775.     MailBuffer                      buffer;
  776.     unsigned long                   remaining;
  777. };
  778. typedef struct MSAMGetMsgHeaderPB       MSAMGetMsgHeaderPB;
  779. /*    MSAMGetAttributesPB.buffer returned will contain the attribute values of 
  780.     the attributes indicated in responseMask, 
  781.     from the attribute indicated by the least significant bit set
  782.     to the attribute indicated by the most significant bit set.
  783.     Note that recipients - from, to, cc, bcc cannot be read using
  784.     this call. Use GetRecipients to read these. 
  785. */
  786. struct MSAMGetAttributesPB {
  787.     void *                          qLink;
  788.     long                            reservedH1;
  789.     long                            reservedH2;
  790.     MSAMIOCompletionUPP             ioCompletion;
  791.     OSErr                           ioResult;
  792.     long                            saveA5;
  793.     short                           reqCode;
  794.     MailMsgRef                      mailMsgRef;
  795.     MailAttributeBitmap             requestMask;                /* kMailIndicationsBit thru kMailSubjectBit */
  796.     MailBuffer                      buffer;
  797.     MailAttributeBitmap             responseMask;
  798.     Boolean                         more;
  799.     Boolean                         filler1;
  800. };
  801. typedef struct MSAMGetAttributesPB      MSAMGetAttributesPB;
  802. /* attrID value to get resolved recipient list */
  803. enum {
  804.     kMailResolvedList           = 0
  805. };
  806. struct MailOriginalRecipient {
  807.     short                           index;
  808. };
  809. typedef struct MailOriginalRecipient    MailOriginalRecipient;
  810. /* Followed by OCEPackedRecipient */
  811. struct MailResolvedRecipient {
  812.     short                           index;
  813.     short                           recipientFlags;
  814.     Boolean                         responsible;
  815.     Byte                            padByte;
  816. };
  817. typedef struct MailResolvedRecipient    MailResolvedRecipient;
  818. /* Followed by OCEPackedRecipient */
  819. /*    MSAMGetRecipientsPB.buffer contains a Mail Reply. Each tuple is a
  820.     MailOriginalRecipient if getting original recipients 
  821.                             ie the attrID is kMail[From, To, Cc, Bcc]Bit
  822.     MailResolvedRecipient if getting resolved reicpients
  823.                             ie the attrID is kMailResolvedList
  824.     Both tuples are word alligned.  
  825. */
  826. struct MSAMGetRecipientsPB {
  827.     void *                          qLink;
  828.     long                            reservedH1;
  829.     long                            reservedH2;
  830.     MSAMIOCompletionUPP             ioCompletion;
  831.     OSErr                           ioResult;
  832.     long                            saveA5;
  833.     short                           reqCode;
  834.     MailMsgRef                      mailMsgRef;
  835.     MailAttributeID                 attrID;                     /* kMailFromBit thru kMailBccBit */
  836.     unsigned short                  startIndex;                 /* starts at 1 */
  837.     MailBuffer                      buffer;
  838.     unsigned short                  nextIndex;
  839.     Boolean                         more;
  840.     Boolean                         filler1;
  841. };
  842. typedef struct MSAMGetRecipientsPB      MSAMGetRecipientsPB;
  843. struct MSAMGetContentPB {
  844.     void *                          qLink;
  845.     long                            reservedH1;
  846.     long                            reservedH2;
  847.     MSAMIOCompletionUPP             ioCompletion;
  848.     OSErr                           ioResult;
  849.     long                            saveA5;
  850.     short                           reqCode;
  851.     MailMsgRef                      mailMsgRef;
  852.     MailSegmentMask                 segmentMask;
  853.     MailBuffer                      buffer;
  854.     StScrpRec *                     textScrap;
  855.     ScriptCode                      script;
  856.     MailSegmentType                 segmentType;
  857.     Boolean                         endOfScript;
  858.     Boolean                         endOfSegment;
  859.     Boolean                         endOfContent;
  860.     Boolean                         filler1;
  861.     long                            segmentLength;              /* NEW: <-  valid first call in a segment */
  862.     long                            segmentID;                  /* NEW: <-> identifier for this segment */
  863. };
  864. typedef struct MSAMGetContentPB         MSAMGetContentPB;
  865. struct MSAMGetEnclosurePB {
  866.     void *                          qLink;
  867.     long                            reservedH1;
  868.     long                            reservedH2;
  869.     MSAMIOCompletionUPP             ioCompletion;
  870.     OSErr                           ioResult;
  871.     long                            saveA5;
  872.     short                           reqCode;
  873.     MailMsgRef                      mailMsgRef;
  874.     Boolean                         contentEnclosure;
  875.     Byte                            padByte;
  876.     MailBuffer                      buffer;
  877.     Boolean                         endOfFile;
  878.     Boolean                         endOfEnclosures;
  879. };
  880. typedef struct MSAMGetEnclosurePB       MSAMGetEnclosurePB;
  881. struct MailBlockInfo {
  882.     OCECreatorType                  blockType;
  883.     unsigned long                   offset;
  884.     unsigned long                   blockLength;
  885. };
  886. typedef struct MailBlockInfo            MailBlockInfo;
  887. struct MSAMEnumerateBlocksPB {
  888.     void *                          qLink;
  889.     long                            reservedH1;
  890.     long                            reservedH2;
  891.     MSAMIOCompletionUPP             ioCompletion;
  892.     OSErr                           ioResult;
  893.     long                            saveA5;
  894.     short                           reqCode;
  895.     MailMsgRef                      mailMsgRef;
  896.     unsigned short                  startIndex;                 /* starts at 1 */
  897.     MailBuffer                      buffer;
  898.                                                                 /*    buffer contains a Mail Reply. Each tuple is a MailBlockInfo */
  899.     unsigned short                  nextIndex;
  900.     Boolean                         more;
  901.     Boolean                         filler1;
  902. };
  903. typedef struct MSAMEnumerateBlocksPB    MSAMEnumerateBlocksPB;
  904. struct MSAMGetBlockPB {
  905.     void *                          qLink;
  906.     long                            reservedH1;
  907.     long                            reservedH2;
  908.     MSAMIOCompletionUPP             ioCompletion;
  909.     OSErr                           ioResult;
  910.     long                            saveA5;
  911.     short                           reqCode;
  912.     MailMsgRef                      mailMsgRef;
  913.     OCECreatorType                  blockType;
  914.     unsigned short                  blockIndex;
  915.     MailBuffer                      buffer;
  916.     unsigned long                   dataOffset;
  917.     Boolean                         endOfBlock;
  918.     Byte                            padByte;
  919.     unsigned long                   remaining;
  920. };
  921. typedef struct MSAMGetBlockPB           MSAMGetBlockPB;
  922. /* YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  923.  * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  924.  * REASONS.
  925. */
  926. /* not valid for tunnel form letters */
  927. struct MSAMMarkRecipientsPB {
  928.     void *                          qLink;
  929.     long                            reservedH1;
  930.     long                            reservedH2;
  931.     MSAMIOCompletionUPP             ioCompletion;
  932.     OSErr                           ioResult;
  933.     long                            saveA5;
  934.     short                           reqCode;
  935.     MSAMQueueRef                    queueRef;
  936.     long                            seqNum;
  937.     MailBuffer                      buffer;                     /*    buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked. */
  938. };
  939. typedef struct MSAMMarkRecipientsPB     MSAMMarkRecipientsPB;
  940. /* 
  941.  * same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  942.  * queueRef, seqNum 
  943. */
  944. /* not valid for tunnel form letters */
  945. struct MSAMnMarkRecipientsPB {
  946.     void *                          qLink;
  947.     long                            reservedH1;
  948.     long                            reservedH2;
  949.     MSAMIOCompletionUPP             ioCompletion;
  950.     OSErr                           ioResult;
  951.     long                            saveA5;
  952.     short                           reqCode;
  953.     MailMsgRef                      mailMsgRef;
  954.     MailBuffer                      buffer;                     /*    buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked. */
  955. };
  956. typedef struct MSAMnMarkRecipientsPB    MSAMnMarkRecipientsPB;
  957. /****************************************************************************************/
  958. struct MSAMCreatePB {
  959.     void *                          qLink;
  960.     long                            reservedH1;
  961.     long                            reservedH2;
  962.     MSAMIOCompletionUPP             ioCompletion;
  963.     OSErr                           ioResult;
  964.     long                            saveA5;
  965.     short                           reqCode;
  966.     MSAMQueueRef                    queueRef;
  967.     Boolean                         asLetter;                   /* indicate if we should create as letter or msg */
  968.     Boolean                         filler1;
  969.     IPMMsgType                      msgType;                    /* up to application discretion: must be of IPMSenderTag  kIPMOSFormatType for asLetter=true */
  970.     long                            refCon;                     /* for messages only */
  971.     long                            seqNum;                     /* set if creating message in the inQueue */
  972.     Boolean                         tunnelForm;                 /* if true tunnelForm else newForm */
  973.     Boolean                         bccRecipients;              /* true if creating letter with bcc recipients */
  974.     MailMsgRef                      newRef;
  975. };
  976. typedef struct MSAMCreatePB             MSAMCreatePB;
  977. struct MSAMBeginNestedPB {
  978.     void *                          qLink;
  979.     long                            reservedH1;
  980.     long                            reservedH2;
  981.     MSAMIOCompletionUPP             ioCompletion;
  982.     OSErr                           ioResult;
  983.     long                            saveA5;
  984.     short                           reqCode;
  985.     MailMsgRef                      mailMsgRef;
  986.     long                            refCon;                     /* for messages only */
  987.     IPMMsgType                      msgType;
  988. };
  989. typedef struct MSAMBeginNestedPB        MSAMBeginNestedPB;
  990. struct MSAMEndNestedPB {
  991.     void *                          qLink;
  992.     long                            reservedH1;
  993.     long                            reservedH2;
  994.     MSAMIOCompletionUPP             ioCompletion;
  995.     OSErr                           ioResult;
  996.     long                            saveA5;
  997.     short                           reqCode;
  998.     MailMsgRef                      mailMsgRef;
  999. };
  1000. typedef struct MSAMEndNestedPB          MSAMEndNestedPB;
  1001. struct MSAMSubmitPB {
  1002.     void *                          qLink;
  1003.     long                            reservedH1;
  1004.     long                            reservedH2;
  1005.     MSAMIOCompletionUPP             ioCompletion;
  1006.     OSErr                           ioResult;
  1007.     long                            saveA5;
  1008.     short                           reqCode;
  1009.     MailMsgRef                      mailMsgRef;
  1010.     Boolean                         submitFlag;
  1011.     Byte                            padByte;
  1012.     MailLetterID                    msgID;
  1013. };
  1014. typedef struct MSAMSubmitPB             MSAMSubmitPB;
  1015. struct MSAMPutMsgHeaderPB {
  1016.     void *                          qLink;
  1017.     long                            reservedH1;
  1018.     long                            reservedH2;
  1019.     MSAMIOCompletionUPP             ioCompletion;
  1020.     OSErr                           ioResult;
  1021.     long                            saveA5;
  1022.     short                           reqCode;
  1023.     MailMsgRef                      mailMsgRef;
  1024.     OCERecipient *                  replyQueue;
  1025.     IPMSender *                     sender;
  1026.     IPMNotificationType             deliveryNotification;
  1027.     IPMPriority                     priority;
  1028. };
  1029. typedef struct MSAMPutMsgHeaderPB       MSAMPutMsgHeaderPB;
  1030. struct MSAMPutAttributePB {
  1031.     void *                          qLink;
  1032.     long                            reservedH1;
  1033.     long                            reservedH2;
  1034.     MSAMIOCompletionUPP             ioCompletion;
  1035.     OSErr                           ioResult;
  1036.     long                            saveA5;
  1037.     short                           reqCode;
  1038.     MailMsgRef                      mailMsgRef;
  1039.     MailAttributeID                 attrID;                     /* kMailIndicationsBit thru kMailSubjectBit */
  1040.     MailBuffer                      buffer;
  1041. };
  1042. typedef struct MSAMPutAttributePB       MSAMPutAttributePB;
  1043. struct MSAMPutRecipientPB {
  1044.     void *                          qLink;
  1045.     long                            reservedH1;
  1046.     long                            reservedH2;
  1047.     MSAMIOCompletionUPP             ioCompletion;
  1048.     OSErr                           ioResult;
  1049.     long                            saveA5;
  1050.     short                           reqCode;
  1051.     MailMsgRef                      mailMsgRef;
  1052.     MailAttributeID                 attrID;                     /* kMailFromBit thru kMailBccBit */
  1053.     MailRecipient *                 recipient;
  1054.     Boolean                         responsible;                /* valid for server and message msams only */
  1055.     Boolean                         filler1;
  1056. };
  1057. typedef struct MSAMPutRecipientPB       MSAMPutRecipientPB;
  1058. struct MSAMPutContentPB {
  1059.     void *                          qLink;
  1060.     long                            reservedH1;
  1061.     long                            reservedH2;
  1062.     MSAMIOCompletionUPP             ioCompletion;
  1063.     OSErr                           ioResult;
  1064.     long                            saveA5;
  1065.     short                           reqCode;
  1066.     MailMsgRef                      mailMsgRef;
  1067.     MailSegmentType                 segmentType;
  1068.     Boolean                         append;
  1069.     Byte                            padByte;
  1070.     MailBuffer                      buffer;
  1071.     StScrpRec *                     textScrap;
  1072.     Boolean                         startNewScript;
  1073.     Boolean                         filler1;
  1074.     ScriptCode                      script;                     /* valid only if startNewScript is true */
  1075. };
  1076. typedef struct MSAMPutContentPB         MSAMPutContentPB;
  1077. struct MSAMPutEnclosurePB {
  1078.     void *                          qLink;
  1079.     long                            reservedH1;
  1080.     long                            reservedH2;
  1081.     MSAMIOCompletionUPP             ioCompletion;
  1082.     OSErr                           ioResult;
  1083.     long                            saveA5;
  1084.     short                           reqCode;
  1085.     MailMsgRef                      mailMsgRef;
  1086.     Boolean                         contentEnclosure;
  1087.     Byte                            padByte;
  1088.     Boolean                         hfs;                        /* true => in file system, false => in memory */
  1089.     Boolean                         append;
  1090.     MailBuffer                      buffer;                     /* Unused if hfs == true */
  1091.     FSSpec                          enclosure;
  1092.     MailEnclosureInfo               addlInfo;
  1093. };
  1094. typedef struct MSAMPutEnclosurePB       MSAMPutEnclosurePB;
  1095. struct MSAMPutBlockPB {
  1096.     void *                          qLink;
  1097.     long                            reservedH1;
  1098.     long                            reservedH2;
  1099.     MSAMIOCompletionUPP             ioCompletion;
  1100.     OSErr                           ioResult;
  1101.     long                            saveA5;
  1102.     short                           reqCode;
  1103.     MailMsgRef                      mailMsgRef;
  1104.     long                            refCon;                     /* for messages only */
  1105.     OCECreatorType                  blockType;
  1106.     Boolean                         append;
  1107.     Boolean                         filler1;
  1108.     MailBuffer                      buffer;
  1109.     MailBlockMode                   mode;                       /* if blockType is kMailTunnelLtrType or kMailHopInfoType  mode is assumed to be kMailFromMark */
  1110.     unsigned long                   offset;
  1111. };
  1112. typedef struct MSAMPutBlockPB           MSAMPutBlockPB;
  1113. /****************************************************************************************/
  1114. struct MSAMCreateReportPB {
  1115.     void *                          qLink;
  1116.     long                            reservedH1;
  1117.     long                            reservedH2;
  1118.     MSAMIOCompletionUPP             ioCompletion;
  1119.     OSErr                           ioResult;
  1120.     long                            saveA5;
  1121.     short                           reqCode;
  1122.     MSAMQueueRef                    queueRef;                   /* to distinguish personal and server MSAMs */
  1123.     MailMsgRef                      mailMsgRef;
  1124.     MailLetterID                    msgID;                      /* kMailLetterIDBit of letter being reported upon */
  1125.     MailRecipient *                 sender;                     /* sender of the letter you are creating report on */
  1126. };
  1127. typedef struct MSAMCreateReportPB       MSAMCreateReportPB;
  1128. struct MSAMPutRecipientReportPB {
  1129.     void *                          qLink;
  1130.     long                            reservedH1;
  1131.     long                            reservedH2;
  1132.     MSAMIOCompletionUPP             ioCompletion;
  1133.     OSErr                           ioResult;
  1134.     long                            saveA5;
  1135.     short                           reqCode;
  1136.     MailMsgRef                      mailMsgRef;
  1137.     short                           recipientIndex;             /* recipient index in the original letter */
  1138.     OSErr                           result;                     /* result of sending the recipient */
  1139. };
  1140. typedef struct MSAMPutRecipientReportPB MSAMPutRecipientReportPB;
  1141. /****************************************************************************************/
  1142. struct MailWakeupPMSAMPB {
  1143.     void *                          qLink;
  1144.     long                            reservedH1;
  1145.     long                            reservedH2;
  1146.     MSAMIOCompletionUPP             ioCompletion;
  1147.     OSErr                           ioResult;
  1148.     long                            saveA5;
  1149.     short                           reqCode;
  1150.     CreationID                      pmsamCID;
  1151.     MailSlotID                      mailSlotID;
  1152. };
  1153. typedef struct MailWakeupPMSAMPB        MailWakeupPMSAMPB;
  1154. struct MailCreateMailSlotPB {
  1155.     void *                          qLink;
  1156.     long                            reservedH1;
  1157.     long                            reservedH2;
  1158.     MSAMIOCompletionUPP             ioCompletion;
  1159.     OSErr                           ioResult;
  1160.     long                            saveA5;
  1161.     short                           reqCode;
  1162.     MailboxRef                      mailboxRef;
  1163.     long                            timeout;
  1164.     CreationID                      pmsamCID;
  1165.     SMCA                            smca;
  1166. };
  1167. typedef struct MailCreateMailSlotPB     MailCreateMailSlotPB;
  1168. struct MailModifyMailSlotPB {
  1169.     void *                          qLink;
  1170.     long                            reservedH1;
  1171.     long                            reservedH2;
  1172.     MSAMIOCompletionUPP             ioCompletion;
  1173.     OSErr                           ioResult;
  1174.     long                            saveA5;
  1175.     short                           reqCode;
  1176.     MailboxRef                      mailboxRef;
  1177.     long                            timeout;
  1178.     CreationID                      pmsamCID;
  1179.     SMCA                            smca;
  1180. };
  1181. typedef struct MailModifyMailSlotPB     MailModifyMailSlotPB;
  1182. union MSAMParam {
  1183.     struct {
  1184.         void *                          qLink;
  1185.         long                            reservedH1;
  1186.         long                            reservedH2;
  1187.         MSAMIOCompletionUPP             ioCompletion;
  1188.         OSErr                           ioResult;
  1189.         long                            saveA5;
  1190.         short                           reqCode;
  1191.     }                                 header;
  1192.     PMSAMGetMSAMRecordPB            pmsamGetMSAMRecord;
  1193.     PMSAMOpenQueuesPB               pmsamOpenQueues;
  1194.     PMSAMSetStatusPB                pmsamSetStatus;
  1195.     PMSAMLogErrorPB                 pmsamLogError;
  1196.     SMSAMSetupPB                    smsamSetup;
  1197.     SMSAMStartupPB                  smsamStartup;
  1198.     SMSAMShutdownPB                 smsamShutdown;
  1199.     MSAMEnumeratePB                 msamEnumerate;
  1200.     MSAMDeletePB                    msamDelete;
  1201.     MSAMOpenPB                      msamOpen;
  1202.     MSAMOpenNestedPB                msamOpenNested;
  1203.     MSAMClosePB                     msamClose;
  1204.     MSAMGetMsgHeaderPB              msamGetMsgHeader;
  1205.     MSAMGetAttributesPB             msamGetAttributes;
  1206.     MSAMGetRecipientsPB             msamGetRecipients;
  1207.     MSAMGetContentPB                msamGetContent;
  1208.     MSAMGetEnclosurePB              msamGetEnclosure;
  1209.     MSAMEnumerateBlocksPB           msamEnumerateBlocks;
  1210.     MSAMGetBlockPB                  msamGetBlock;
  1211.     MSAMMarkRecipientsPB            msamMarkRecipients;
  1212.     MSAMnMarkRecipientsPB           msamnMarkRecipients;
  1213.     MSAMCreatePB                    msamCreate;
  1214.     MSAMBeginNestedPB               msamBeginNested;
  1215.     MSAMEndNestedPB                 msamEndNested;
  1216.     MSAMSubmitPB                    msamSubmit;
  1217.     MSAMPutMsgHeaderPB              msamPutMsgHeader;
  1218.     MSAMPutAttributePB              msamPutAttribute;
  1219.     MSAMPutRecipientPB              msamPutRecipient;
  1220.     MSAMPutContentPB                msamPutContent;
  1221.     MSAMPutEnclosurePB              msamPutEnclosure;           /* this field is SYSTEM8_DEPRECATED*/
  1222.     MSAMPutBlockPB                  msamPutBlock;
  1223.     MSAMCreateReportPB              msamCreateReport;           /* Reports and Error Handling Calls */
  1224.     MSAMPutRecipientReportPB        msamPutRecipientReport;
  1225.     PMSAMCreateMsgSummaryPB         pmsamCreateMsgSummary;
  1226.     PMSAMPutMsgSummaryPB            pmsamPutMsgSummary;
  1227.     PMSAMGetMsgSummaryPB            pmsamGetMsgSummary;
  1228.     MailWakeupPMSAMPB               wakeupPMSAM;
  1229.     MailCreateMailSlotPB            createMailSlot;
  1230.     MailModifyMailSlotPB            modifyMailSlot;
  1231. };
  1232. typedef union MSAMParam                 MSAMParam;
  1233. #if OPAQUE_UPP_TYPES
  1234. #if CALL_NOT_IN_CARBON
  1235.     EXTERN_API(MSAMIOCompletionUPP)
  1236.     NewMSAMIOCompletionUPP         (MSAMIOCompletionProcPtr userRoutine);
  1237.     EXTERN_API(void)
  1238.     DisposeMSAMIOCompletionUPP     (MSAMIOCompletionUPP     userUPP);
  1239.     EXTERN_API(void)
  1240.     InvokeMSAMIOCompletionUPP      (TempMSAMParam *         paramBlock,
  1241.                                     MSAMIOCompletionUPP     userUPP);
  1242. #endif  /* CALL_NOT_IN_CARBON */
  1243. #else
  1244.     enum { uppMSAMIOCompletionProcInfo = 0x00009802 };              /* register no_return_value Func(4_bytes:A0) */
  1245.     #define NewMSAMIOCompletionUPP(userRoutine)                     (MSAMIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMSAMIOCompletionProcInfo, GetCurrentArchitecture())
  1246.     #define DisposeMSAMIOCompletionUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  1247.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1248.     #pragma parameter InvokeMSAMIOCompletionUPP(__A0, __A1)
  1249.     void InvokeMSAMIOCompletionUPP(TempMSAMParam * paramBlock, MSAMIOCompletionUPP userUPP) = 0x4E91;
  1250.     #else
  1251.         #define InvokeMSAMIOCompletionUPP(paramBlock, userUPP)          CALL_ONE_PARAMETER_UPP((userUPP), uppMSAMIOCompletionProcInfo, (paramBlock))
  1252.     #endif
  1253. #endif
  1254. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  1255. #define NewMSAMIOCompletionProc(userRoutine)                    NewMSAMIOCompletionUPP(userRoutine)
  1256. #define CallMSAMIOCompletionProc(userRoutine, paramBlock)       InvokeMSAMIOCompletionUPP(paramBlock, userRoutine)
  1257. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1258. #if CALL_NOT_IN_CARBON
  1259. EXTERN_API( OSErr )
  1260. MailCreateMailSlot              (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x052B, 0xAA5E);
  1261. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1262. EXTERN_API( OSErr )
  1263. MailModifyMailSlot              (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x052C, 0xAA5E);
  1264. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1265. EXTERN_API( OSErr )
  1266. MailWakeupPMSAM                 (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x0507, 0xAA5E);
  1267. /* Personal MSAM Glue Routines */
  1268. EXTERN_API( OSErr )
  1269. PMSAMOpenQueues                 (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0500, 0xAA5E);
  1270. EXTERN_API( OSErr )
  1271. PMSAMSetStatus                  (MSAMParam *            paramBlock,
  1272.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0527, 0xAA5E);
  1273. /* SYNC ONLY */
  1274. EXTERN_API( OSErr )
  1275. PMSAMGetMSAMRecord              (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0506, 0xAA5E);
  1276. /* Server MSAM Glue Routines */
  1277. /* SYNC ONLY */
  1278. EXTERN_API( OSErr )
  1279. SMSAMSetup                      (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0523, 0xAA5E);
  1280. /* SYNC ONLY */
  1281. EXTERN_API( OSErr )
  1282. SMSAMStartup                    (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0501, 0xAA5E);
  1283. EXTERN_API( OSErr )
  1284. SMSAMShutdown                   (MSAMParam *            paramBlock,
  1285.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0502, 0xAA5E);
  1286. /* Get Interface Glue Routines */
  1287. EXTERN_API( OSErr )
  1288. MSAMEnumerate                   (MSAMParam *            paramBlock,
  1289.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0503, 0xAA5E);
  1290. EXTERN_API( OSErr )
  1291. MSAMDelete                      (MSAMParam *            paramBlock,
  1292.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0504, 0xAA5E);
  1293. EXTERN_API( OSErr )
  1294. MSAMMarkRecipients              (MSAMParam *            paramBlock,
  1295.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0505, 0xAA5E);
  1296. EXTERN_API( OSErr )
  1297. MSAMnMarkRecipients             (MSAMParam *            paramBlock,
  1298.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0512, 0xAA5E);
  1299. EXTERN_API( OSErr )
  1300. MSAMOpen                        (MSAMParam *            paramBlock,
  1301.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0508, 0xAA5E);
  1302. EXTERN_API( OSErr )
  1303. MSAMOpenNested                  (MSAMParam *            paramBlock,
  1304.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0509, 0xAA5E);
  1305. EXTERN_API( OSErr )
  1306. MSAMClose                       (MSAMParam *            paramBlock,
  1307.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x050A, 0xAA5E);
  1308. EXTERN_API( OSErr )
  1309. MSAMGetRecipients               (MSAMParam *            paramBlock,
  1310.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x050C, 0xAA5E);
  1311. EXTERN_API( OSErr )
  1312. MSAMGetAttributes               (MSAMParam *            paramBlock,
  1313.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x050B, 0xAA5E);
  1314. EXTERN_API( OSErr )
  1315. MSAMGetContent                  (MSAMParam *            paramBlock,
  1316.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x050D, 0xAA5E);
  1317. EXTERN_API( OSErr )
  1318. MSAMGetEnclosure                (MSAMParam *            paramBlock,
  1319.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x050E, 0xAA5E);
  1320. EXTERN_API( OSErr )
  1321. MSAMEnumerateBlocks             (MSAMParam *            paramBlock,
  1322.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x050F, 0xAA5E);
  1323. EXTERN_API( OSErr )
  1324. MSAMGetBlock                    (MSAMParam *            paramBlock,
  1325.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0510, 0xAA5E);
  1326. EXTERN_API( OSErr )
  1327. MSAMGetMsgHeader                (MSAMParam *            paramBlock,
  1328.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0511, 0xAA5E);
  1329. /* Put Interface Glue Routines */
  1330. EXTERN_API( OSErr )
  1331. MSAMCreate                      (MSAMParam *            paramBlock,
  1332.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0514, 0xAA5E);
  1333. EXTERN_API( OSErr )
  1334. MSAMBeginNested                 (MSAMParam *            paramBlock,
  1335.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0515, 0xAA5E);
  1336. EXTERN_API( OSErr )
  1337. MSAMEndNested                   (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0516, 0xAA5E);
  1338. /*  SYNCHRONOUS ONLY */
  1339. EXTERN_API( OSErr )
  1340. MSAMSubmit                      (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0517, 0xAA5E);
  1341. EXTERN_API( OSErr )
  1342. MSAMPutAttribute                (MSAMParam *            paramBlock,
  1343.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0518, 0xAA5E);
  1344. EXTERN_API( OSErr )
  1345. MSAMPutRecipient                (MSAMParam *            paramBlock,
  1346.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0519, 0xAA5E);
  1347. EXTERN_API( OSErr )
  1348. MSAMPutContent                  (MSAMParam *            paramBlock,
  1349.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x051A, 0xAA5E);
  1350. /*  SYNCHRONOUS ONLY */
  1351. EXTERN_API( OSErr )
  1352. MSAMPutEnclosure                (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x051B, 0xAA5E);
  1353. EXTERN_API( OSErr )
  1354. MSAMPutBlock                    (MSAMParam *            paramBlock,
  1355.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x051C, 0xAA5E);
  1356. EXTERN_API( OSErr )
  1357. MSAMPutMsgHeader                (MSAMParam *            paramBlock,
  1358.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x051D, 0xAA5E);
  1359. /* Reports and Error Handling Glue Routines */
  1360. EXTERN_API( OSErr )
  1361. MSAMCreateReport                (MSAMParam *            paramBlock,
  1362.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x051F, 0xAA5E);
  1363. EXTERN_API( OSErr )
  1364. MSAMPutRecipientReport          (MSAMParam *            paramBlock,
  1365.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0520, 0xAA5E);
  1366. EXTERN_API( OSErr )
  1367. PMSAMLogError                   (MSAMParam *            paramBlock)                         FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0521, 0xAA5E);
  1368. /* MsgSummary Glue Routines */
  1369. EXTERN_API( OSErr )
  1370. PMSAMCreateMsgSummary           (MSAMParam *            paramBlock,
  1371.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0522, 0xAA5E);
  1372. EXTERN_API( OSErr )
  1373. PMSAMPutMsgSummary              (MSAMParam *            paramBlock,
  1374.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0525, 0xAA5E);
  1375. EXTERN_API( OSErr )
  1376. PMSAMGetMsgSummary              (MSAMParam *            paramBlock,
  1377.                                  Boolean                asyncFlag)                          THREEWORDINLINE(0x3F3C, 0x0526, 0xAA5E);
  1378. #endif  /* CALL_NOT_IN_CARBON */
  1379. #if PRAGMA_STRUCT_ALIGN
  1380.     #pragma options align=reset
  1381. #elif PRAGMA_STRUCT_PACKPUSH
  1382.     #pragma pack(pop)
  1383. #elif PRAGMA_STRUCT_PACK
  1384.     #pragma pack()
  1385. #endif
  1386. #ifdef PRAGMA_IMPORT_OFF
  1387. #pragma import off
  1388. #elif PRAGMA_IMPORT
  1389. #pragma import reset
  1390. #endif
  1391. #ifdef __cplusplus
  1392. }
  1393. #endif
  1394. #endif /* __OCEMAIL__ */