home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osr1.exe / src / CMDraft.idl < prev    next >
Text File  |  1997-03-21  |  14KB  |  501 lines

  1. /* @(#)Z 1.6 com/src/bento/localidl/CMDraft.idl, odstorage, od96os2, odos29712d 97/03/21 17:20:04 (96/10/28 13:37:25) */
  2.  
  3. //#====START_GENERATED_PROLOG======================================
  4. //#
  5. //#
  6. //#   COMPONENT_NAME: odstorage
  7. //#
  8. //#   CLASSES: none
  9. //#
  10. //#   ORIGINS: 82,27
  11. //#
  12. //#
  13. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  14. //#   All Rights Reserved
  15. //#   Licensed Materials - Property of IBM
  16. //#   US Government Users Restricted Rights - Use, duplication or
  17. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  18. //#       
  19. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  20. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  21. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  22. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  23. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  24. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  25. //#   OR PERFORMANCE OF THIS SOFTWARE.
  26. //#
  27. //#====END_GENERATED_PROLOG========================================
  28. //#
  29.  
  30. #ifdef __PRIVATE__
  31. //#
  32. //#    File:        CMDraft.idl
  33. //#
  34. //#    Contains:    Definition of CMDraft
  35. //#
  36. //#    Owned by:    Vincent Lo
  37. //#
  38. //#    Copyright:    (r) 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  39. //#
  40. //#    Change History (most recent first):
  41. //#
  42. //#        <30>     10/5/95    CC        1286180: Added private CloneCompanionObject
  43. //#                                    method.
  44. //#        <29>     8/25/95    JBS        1263078 FB: fix part editor swapping
  45. //#        <28>     8/16/95    VL        1275241: Cleaned up IDL file.
  46. //#        <27>      8/3/95    RR        #1257260: Collapse B classes. Remove
  47. //#                                    somInit methods. Don't call IsInitialized
  48. //#                                    or SubclassResponsibility
  49. //#        <26>     6/19/95    VL        1170098: Added DeleteRealPart,
  50. //#                                    PartInstantiated, PartDeleted and
  51. //#                                    fPartClasses.
  52. //#        <25>     6/12/95    CC        1252059: Added fSavedWeakClonedSUIDs.
  53. //#        <24>     6/10/95    VL        1252808: Pass-thru needs to include
  54. //#                                    DocPriv.h for ODVersionID.
  55. //#        <23>     5/25/95    VL        1251403: Multithreading naming support.
  56. //#        <22>     5/22/95    CC        1242879: Added IsValidID.
  57. //#        <21>     5/18/95    CC        1238898: Added fDestFrame field.
  58. //#        <20>     5/17/95    VL        1170098: Added ConstructRealPart and
  59. //#                                    ReleaseRealPart.
  60. //#        <19>      5/2/95    CC        1207493: Added ContainingPartInClone(),
  61. //#                                    CheckClonedObject(), fAnyFrameCloned and
  62. //#                                    fRootPartCloned (all private).
  63. //#        <18>     4/25/95    DM        1172791: Replace AEHashTable with
  64. //#                                    OpenHashTable
  65. //#        <17>     3/24/95    EL        1209355: add private field
  66. //#                                    fRemoveChangeOnAbort
  67. //#           <16>     2/15/95    EL        1182275: Add private field
  68. //#                                    fOrigTopVersionDraftID so we can know on
  69. //#                                    closing that a new user draft has been
  70. //#                                    created.
  71. //#        <15>     1/18/95    VL        1193559: Added new overrides for 2
  72. //#                                    methods(GetPersistentObject and
  73. //#                                    GetPersistentObjectID). Renamed
  74. //#                                    GetPersistentObject to
  75. //#                                    RetrievePersistentObject. Removed
  76. //#                                    GetPersistentLinkID and GetLinkID.
  77. //#        <14>    12/16/94    CC        1203516 Removed ODLinkSource parameter from
  78. //#                                    CreateLink().
  79. //#        <13>     11/1/94    CC        1190911, 1192030, 1196908 - Removed
  80. //#                                    GetWeakReferenceProp(),
  81. //#                                    GetLinkSourceFromLink(),
  82. //#                                    GetLinkFromLinkSource(),
  83. //#                                    ConnectLinkSourceToNewPart(), fClonedLinks.
  84. //#                                        Added SetOriginalID(), GetOriginalID(),
  85. //#                                    ValidWeakReferenceProperty(),
  86. //#                                    CompanionWasCloned(), GetCloneKind(),
  87. //#                                    CopiedLinkSubstitution().
  88. //#        <12>     10/4/94    CC        1190858 - Added ReleaseLinkSource().
  89. //#        <11>     9/16/94    CC        1186957 - Added private methods
  90. //#                                    GetLinkSourceFromLink() and
  91. //#                                    GetLinkFromLinkSource().
  92. //#        <10>     9/15/94    CC        1186776 - Added fClonedLinks,
  93. //#                                    StrongClone(), GetWeakReferenceProp(), and
  94. //#                                    ConnectLinkSourceToNewProp(), and deleted
  95. //#                                    obsoleted methods.
  96. //#         <9>      9/6/94    VL        1184177: Removed GetName and SetName.
  97. //#         <8>     8/26/94    VL        1183174: Added WeakClone and private field
  98. //#                                    fWeakClonedSUIDs.
  99. //#         <7>     8/16/94    VL        1143605: Added Clone.
  100. //#         <6>     8/11/94    CC        Add override of CreateLinkIterator() and
  101. //#                                    CreateLinkSourceIterator().
  102. //#         <5>     7/26/94    VL        Got rid of MacStorageUnit and
  103. //#                                    MacDragAndDropStorageUnit.
  104. //#         <4>      7/5/94    VL        Fixed in/out.
  105. //#         <3>     6/22/94    VL        Added functionprefix.
  106. //#         <2>     6/14/94    CC        Changed ODHeap to ODMemoryHeap.
  107. //#         <1>      6/8/94    VL        first checked in
  108. //#
  109. //#    To Do:
  110. //#
  111. #else
  112. //#    Copyright:    (r) 1993-1995 by Apple Computer, Inc., all rights reserved.
  113. #endif
  114.  
  115. #ifndef _CMDRAFT_
  116. #define _CMDRAFT_
  117.  
  118. #ifndef _DRAFT_
  119. #include "Draft.idl"
  120. #endif
  121.  
  122. #ifdef _PLATFORM_OS2_
  123. #include "IODDefs.idl"
  124. #endif
  125.  
  126. //==============================================================================
  127. // Classes defined in this interface
  128. //==============================================================================
  129. interface  CMDraft;
  130.  
  131. //==============================================================================
  132. // Classes used by this interface
  133. //==============================================================================
  134. interface ODPersistentObject;
  135. interface ODLink;
  136. interface ODLinkSource;
  137. interface CMDocument;
  138. interface ODEmbeddedContainer;
  139. interface CMLinkIterator;
  140. interface CMLinkSourceIterator;
  141. interface ODStorageUnit;
  142.  
  143. #ifdef _PLATFORM_OS2_
  144. interface IODLinkService;
  145. #endif
  146.  
  147. #ifdef __PRIVATE__
  148. //==============================================================================
  149. // Implementation Types
  150. //==============================================================================
  151.  
  152. typedef somToken OpenHashTable;
  153. typedef somToken IDList;
  154. typedef somToken CMContainer;
  155. typedef somToken VersionList;
  156. typedef somToken ODMemoryHeapID;
  157. typedef somToken ODVersionID;
  158. #endif
  159.  
  160. //==============================================================================
  161. // ODDraft
  162. //==============================================================================
  163.  
  164. interface CMDraft :  ODDraft
  165. {
  166.  
  167. #ifdef __PRIVATE__
  168.  
  169.     ODStorageUnit CreateSU(in ODStorageUnitID id, 
  170.                             in ODType suType);
  171.  
  172.     void    CreateVersion();
  173.     void    OpenVersion();
  174.     void    CloseVersion();
  175.     void    DestroyVersion();
  176.     void    FlushVersion();
  177.  
  178.     ODPersistentObject RetrievePersistentObject(in ODStorageUnitID id);
  179.     void    ReleasePersistentObject(in ODPersistentObject object);
  180.     void    RemovePersistentObject(in ODPersistentObject object);
  181.     
  182.     void    CreateCollections();
  183.     void    DeleteCollections();
  184.     void    ExternalizeCollections();
  185.     void    CloseCollections();
  186.     void    OpenCollections();
  187.     ODBoolean    AreEmptyCollections();
  188.     
  189.     void    FailIfNotExclusiveWrite();
  190.     
  191.     ODLink    CreateLink();
  192.  
  193.     ODID    StrongClone(in ODDraftKey key, in ODID fromObjectID, in ODID toObjectID, in ODID scope);
  194.  
  195.     ODBoolean        ValidWeakReferenceProperty(in ODID objectID, in ODPropertyName propertyName);
  196.     void            SetOriginalID(in ODStorageUnitID destID, in ODStorageUnitID originalID);
  197.     ODStorageUnitID GetOriginalID(in ODStorageUnitID fromID);
  198.     ODID            CloneCompanionObject(in ODDraftKey key, in ODID fromID);
  199.     ODBoolean        CompanionWasCloned(in ODStorageUnitID fromID, in ODPropertyName prop);
  200.     ODCloneKind        GetCloneKind();
  201.     ODBoolean        CopiedLinkSubstitution(in ODDraftKey key, in ODID fromObjectID, in ODID toObjectID, out ODID toID);
  202.     ODBoolean        ContainingPartInClone(in ODFrame targetFrame);
  203.     void            CheckClonedObject(in ODID fromID, in ODID toID, in ODID originalID);
  204.  
  205.     void            PartInstantiated(in ODPart part);
  206.     void            PartDeleted(in ODPart part);
  207.     
  208.     void     SetChangedFromPrevFlag(in ODBoolean changed);
  209.  
  210.     IDList*    GetIDList();
  211.  
  212.     void Reinitialize(in ODDraftPermissions perms);
  213.     void Open();
  214.     void Close();
  215.     void Abort();
  216.     void Flush();
  217.     
  218.     ODBoolean    IsNewDraft();
  219.     ODEmbeddedContainer    GetEmbeddedContainer();
  220.     CMContainer    GetCMContainer();
  221.     ODBoolean    NeedExternalizing();
  222.     ODBoolean    IsChangedFromPrev(in VersionList* versionList);
  223.     OpenHashTable* GetClonedSUIDs(in ODDraft destDraft);
  224.  
  225.     ODBoolean        IsValidDraftKey(in ODDraftKey key);
  226.     ODMemoryHeapID    GetHeap();
  227.     
  228.  
  229. #ifdef _PLATFORM_OS2_
  230.         ODLinkSource GetLinkSrcForAvlSvr(in ODStorageUnitID id,
  231.                                          in IODAuxiliaryState auxState);
  232.         // This method is called to obtain and internalize a linksource object
  233.         //   without calling back to the linkservice to get the auxstate,
  234.         //   since the auxstate is supplied already on the call.
  235.         // This method is used in two cases:
  236.         //   1. the linkservice of a document is responding to a
  237.         //      InternalizeLinkSource call from the availability server.
  238.         //   2. the surrogate draft in the link service is being
  239.         //      called to internalize a newly cloned surrogate.
  240.                                    /******** strom@watson ********/
  241. #endif
  242.  
  243.  
  244.  
  245. #endif    // __PRIVATE__
  246.  
  247. #ifdef __SOMIDL__
  248.   implementation
  249.   {
  250.     majorversion = 1; minorversion = 0;
  251.       functionprefix = CMDraft;
  252.  
  253.     override:
  254.         somUninit,
  255.         Acquire,
  256.         Release,
  257.         Purge,
  258.         GetDocument,
  259.         GetID,
  260.         AcquireDraftProperties,
  261.         GetPermissions,
  262.         CreateStorageUnit,
  263.         AcquireStorageUnit,
  264.         RemoveStorageUnit,
  265.         BeginClone,
  266.         EndClone,
  267.         AbortClone,
  268.         Clone,
  269.         WeakClone,
  270.         ChangedFromPrev,
  271.         SetChangedFromPrev,
  272.         RemoveFromDocument,
  273.         RemoveChanges,
  274.         Externalize,
  275.         SaveToAPrevious,
  276.         CreateFrame,
  277.         AcquireFrame,
  278.         RemoveFrame,
  279.         CreatePart,
  280.         AcquirePart,
  281.         RemovePart,
  282.         CreateLinkSpec,
  283.         CreateLinkSource,
  284.         AcquireLinkSource,
  285.         AcquireLink,
  286.         RemoveLink,
  287.         RemoveLinkSource,
  288.         GetPersistentObjectID,
  289.         AcquirePersistentObject,
  290.         ReleasePart,
  291. #ifdef _PLATFORM_OS2_
  292.         IsValidID,
  293.         CreatePartLinkSourceIterator,
  294.         CreatePartLinkIterator,
  295. #else
  296.         IsValidID,
  297. #endif
  298.  
  299. #ifdef __PRIVATE__
  300.         InitDraft,
  301.         ReleaseFrame,
  302.         ReleaseLink,
  303.         ReleaseLinkSource,
  304.         ReleaseStorageUnit,
  305.         CreateLinkIterator,
  306.         CreateLinkSourceIterator,
  307.         ConstructRealPart,
  308.         ReleaseRealPart,
  309.         DeleteRealPart,
  310.         SwapPart;
  311. #else
  312.         reserved1,
  313.         reserved2,
  314.         reserved3,
  315.         reserved4,
  316.         reserved5,
  317.         reserved6,
  318.         reserved7,
  319.         reserved8,
  320.         reserved9,
  321.         reserved10,
  322.         reserved11;
  323. #endif
  324.         
  325.     releaseorder:
  326.         #ifdef __PRIVATE__
  327.             CreateSU,
  328.             CreateVersion,
  329.             OpenVersion,
  330.             CloseVersion,
  331.             DestroyVersion,
  332.             FlushVersion,
  333.             RetrievePersistentObject,
  334.             ReleasePersistentObject,
  335.             RemovePersistentObject,
  336.             CreateCollections,
  337.             DeleteCollections,
  338.             ExternalizeCollections,
  339.             CloseCollections,
  340.             OpenCollections,
  341.             AreEmptyCollections,
  342.             FailIfNotExclusiveWrite,
  343.             CreateLink,
  344.             SetChangedFromPrevFlag,
  345.             GetIDList,
  346.             Reinitialize,
  347.             Open,
  348.             Close,
  349.             Abort,
  350.             Flush,
  351.             IsNewDraft,
  352.             GetEmbeddedContainer,
  353.             GetCMContainer,
  354.             NeedExternalizing,
  355.             IsChangedFromPrev,
  356.             GetClonedSUIDs,
  357.             IsValidDraftKey,
  358.             GetHeap,
  359.             StrongClone,
  360.             ValidWeakReferenceProperty,
  361.             SetOriginalID,
  362.             GetOriginalID,
  363.             CloneCompanionObject,
  364.             CompanionWasCloned,
  365.             GetCloneKind,
  366.             CopiedLinkSubstitution,
  367.             ContainingPartInClone,
  368.             CheckClonedObject,
  369.             PartInstantiated,
  370.  
  371. #ifdef _PLATFORM_OS2_
  372.  
  373.                 PartDeleted,
  374.                 GetLinkSrcForAvlSvr;
  375. #else
  376.                 PartDeleted;
  377. #endif
  378.         #else
  379.             reserved12,
  380.             reserved13,
  381.             reserved14,
  382.             reserved15,
  383.             reserved16,
  384.             reserved17,
  385.             reserved18,
  386.             reserved19,
  387.             reserved20,
  388.             reserved21,
  389.             reserved22,
  390.             reserved23,
  391.             reserved24,
  392.             reserved25,
  393.             reserved26,
  394.             reserved27,
  395.             reserved28,
  396.             reserved29,
  397.             reserved30,
  398.             reserved31,
  399.             reserved32,
  400.             reserved33,
  401.             reserved34,
  402.             reserved35,
  403.             reserved36,
  404.             reserved37,
  405.             reserved38,
  406.             reserved39,
  407.             reserved40,
  408.             reserved41,
  409.             reserved42,
  410.             reserved43,
  411.             reserved44,
  412.             reserved45,
  413.             reserved46,
  414.             reserved47,
  415.             reserved48,
  416.             reserved49,
  417.             reserved50,
  418.             reserved51,
  419.             reserved52,
  420.             reserved53,
  421.             reserved54,
  422.  
  423. #ifdef _PLATFORM_OS2_
  424.                         reserved55,
  425.                         reserved56;
  426. #else
  427.                         reserved55;
  428. #endif
  429.  
  430.         #endif    // __PRIVATE__
  431.  
  432.     #ifdef __PRIVATE__
  433.  
  434.         passthru C_xh =
  435.             ""
  436.             "#include <CMAPI.h>"
  437.             "class OpenHashTable;"
  438.             "class IDList;"
  439.             "class VersionList;"
  440.             "#include <ODMemory.h>"
  441.  
  442. #ifdef _PLATFORM_OS2_
  443.                         "#include <IODDefs.xh>"
  444. #endif
  445.             "";
  446.  
  447.         passthru C_xih =
  448.             ""
  449.             "#include <DocPriv.h>"
  450.             "";
  451.             
  452.         CMDocument                fDocument;
  453.         ODDraftID                fID;
  454.         ODVersionID                fVersionID;
  455.         ODVersionID                fPrevVersionID;
  456.             
  457.         ODDraftPermissions        fPermissions;
  458.         ODEmbeddedContainer        fEmbeddedContainer;
  459.         ODBoolean                fChangedFromPrev;
  460.         ODBoolean                fIsNewDraft;
  461.         ODBoolean                fExternalized;
  462.         ODBoolean                fRemoveChangeOnAbort;
  463.     
  464.         OpenHashTable*            fPersistentObjects;
  465.         OpenHashTable*            fReleasedPersistentObjects;
  466.         OpenHashTable*            fStorageUnits;
  467.         OpenHashTable*            fReleasedStorageUnits;
  468.         
  469.         IDList*                    fIDList;
  470.         ODStorageUnit            fDraftProperties;
  471.         
  472.         OpenHashTable*            fClonedSUIDs;
  473.         OpenHashTable*            fWeakClonedSUIDs;
  474.         OpenHashTable*            fSavedWeakClonedSUIDs;
  475.         ODDraft                    fDestDraft;
  476.         ODFrame                    fDestFrame;
  477.         ODDraftKey                fCurrentKey;
  478.         ODULong                    fLockCount;
  479.         ODCloneKind                fCloneKind;
  480.         ODBoolean                fAnyFrameCloned;
  481.         ODBoolean                fRootPartReused;
  482.     
  483.         ODDraftID                fOrigTopVersionDraftID;
  484.     
  485.         ODMemoryHeapID            fHeap;
  486.         
  487.         OpenHashTable*            fPartClasses;
  488.  
  489. #ifdef _PLATFORM_OS2_
  490.                 IODLinkService                        fLinkService;
  491.                 string                                fLinkServiceXID;
  492. #endif
  493.  
  494.  
  495.     #endif    // __PRIVATE__
  496.   };
  497. #endif   //__SOMIDL__
  498. };
  499.  
  500. #endif  // _CMDRAFT_
  501.