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

  1. /* @(#)Z 1.5 com/src/bento/localidl/CMSU.idl, odstorage, od96os2, odos29712d 97/03/21 17:20:05 (96/10/29 09:14:32) */
  2. //#====START_GENERATED_PROLOG======================================
  3. //#
  4. //#
  5. //#   COMPONENT_NAME: odstorage
  6. //#
  7. //#   CLASSES: none
  8. //#
  9. //#   ORIGINS: 82,27
  10. //#
  11. //#
  12. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13. //#   All Rights Reserved
  14. //#   Licensed Materials - Property of IBM
  15. //#   US Government Users Restricted Rights - Use, duplication or
  16. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17. //#       
  18. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24. //#   OR PERFORMANCE OF THIS SOFTWARE.
  25. //#
  26. //#====END_GENERATED_PROLOG========================================
  27. //#
  28.  
  29. #ifdef __PRIVATE__
  30. //#
  31. //#    File:        CMSU.idl
  32. //#
  33. //#    Contains:    Definition of CMStorageUnit
  34. //#
  35. //#    Owned by:    Vincent Lo
  36. //#
  37. //#    Copyright:    (r) 1994 by Apple Computer, Inc., all rights reserved.
  38. //#
  39. //#    Change History (most recent first):
  40. //#
  41. //#        <17>     8/16/95    VL        1275241: Cleaned up IDL file.
  42. //#        <16>      8/3/95    RR        #1257260: Collapse B classes. Remove
  43. //#                                    somInit methods. Don't call IsInitialized
  44. //#                                    or SubclassResponsibility
  45. //#        <15>     6/13/95    VL        1241352: Added fModificationDate and
  46. //#                                    fDirty.
  47. //#        <14>     5/25/95    VL        1251403: Multithreading naming support.
  48. //#        <13>     5/11/95    EL        1242515: remove SetCurValue.
  49. //#       <12+>     5/11/95    EL        1242515: remove SetCurValue.
  50. //#        <12>     4/25/95    DM        1172791: avoid crash when AppleEvent
  51. //#                                    Manager not installed by replacing
  52. //#                                    AEHashTable with OpenHashTable
  53. //#        <11>     3/27/95    VL        1231412: Removed CopyTo.
  54. //#        <10>     3/10/95    VL        1226116: Added SetStorageUnitRef.
  55. //#         <9>     1/26/95    VL        #???: SURef is now a 4-byte array.
  56. //#         <8>      9/1/94    VL        1183174: Removed Clone and GetClonedIDs.
  57. //#         <7>     8/26/94    VL        1183174: Removed CloneTo.
  58. //#         <6>     8/11/94    VL        1180299: Added CreateCursor.
  59. //#         <5>     7/26/94    VL        Removed helper functions for promise
  60. //#                                    resolution.
  61. //#         <4>      7/5/94    VL        Fixed inout. Added a few calls to get/set
  62. //#                                    value, property.
  63. //#         <3>     6/22/94    VL        Added functionprefix.
  64. //#         <2>     6/15/94    RR        ODHeap -> ODMemoryHeap
  65. //#         <1>      6/8/94    VL        first checked in
  66. //#
  67. //#    To Do:
  68. //#
  69. #else
  70. //#    Copyright:    (r) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  71. #endif
  72.  
  73. #ifndef _CMSU_
  74. #define _CMSU_
  75.  
  76. #ifndef _STORAGEU_
  77. #include "StorageU.idl"
  78. #endif
  79.  
  80. //==============================================================================
  81. // Classes defined in this interface
  82. //==============================================================================
  83. interface   CMStorageUnit;
  84.  
  85. //==============================================================================
  86. // Classes used by this interface
  87. //==============================================================================
  88. interface    CMDraft;
  89.  
  90. #ifdef __PRIVATE__
  91. //=====================================================================================
  92. // Implementation Types
  93. //=====================================================================================
  94.  
  95. typedef somToken CMContainer;
  96. typedef somToken CMValue;
  97. typedef somToken CMProperty;
  98. typedef somToken CMObject;
  99. typedef somToken CMObjectID;
  100. typedef somToken CMType;
  101. typedef somToken ODMemoryHeapID;
  102. typedef somToken PromiseResolver;
  103. typedef somToken SURefKeeper;
  104. typedef somToken SUCloneHelper;
  105. #endif
  106.  
  107. //==============================================================================
  108. // CMStorageUnit
  109. //==============================================================================
  110.  
  111. interface CMStorageUnit :  ODStorageUnit 
  112. {
  113. #ifdef __PRIVATE__
  114.  
  115.     void        SetChangedFromPrevFlag(in ODBoolean changed);
  116.     
  117.     CMContainer    GetCMContainer();
  118.  
  119.     void                CleanupAndFail(in ODError    err);
  120.     
  121.     void     GetStorageUnitRef(in ODStorageUnitID embeddedSUID,
  122.                                             in ODBoolean strong,
  123.                                             out ODStorageUnitRef ref);
  124.                                                                                         
  125.     ODMemoryHeapID        GetHeap();
  126.     
  127.     ODID        GetObjectID();
  128.         
  129.     CMValue        GetCurValue();
  130.     
  131.     CMProperty    GetCurProperty();
  132.  
  133.     CMType        GetCurType();
  134.  
  135.     void        SetCurType(in CMType curType);
  136.  
  137.     CMObject    GetObject();
  138.  
  139. #endif
  140.  
  141. #ifdef __SOMIDL__
  142.     implementation
  143.     {
  144.         majorversion = 1; minorversion = 0;
  145.           functionprefix = CMStorageUnit;
  146.         
  147.         override:
  148.             somUninit,
  149.             Acquire,
  150.             Release,
  151.             Purge,
  152.             InitStorageUnit,
  153.             GetDraft,
  154.             GetSession,
  155.             Exists,
  156.             ExistsWithCursor,
  157.             CountProperties,
  158.             CountValues,
  159.             Focus,
  160.             FocusWithCursor,
  161.             Externalize,
  162.             Internalize,
  163.             GetID,
  164.             GetName,
  165.             SetName,
  166.             AddProperty,
  167.             AddValue,
  168.             Remove,
  169.             CloneInto,
  170.             CreateView,
  171.             CreateCursor,
  172.             CreateCursorWithFocus,
  173.             GetProperty,
  174.             GetType,
  175.             SetType,
  176.             SetOffset,
  177.             GetOffset,
  178.             GetValue,
  179.             SetValue,
  180.             InsertValue,
  181.             DeleteValue,
  182.             GetSize,
  183.             IsValidStorageUnitRef,
  184.             GetStrongStorageUnitRef,
  185.             GetWeakStorageUnitRef,
  186.             IsStrongStorageUnitRef,
  187.             IsWeakStorageUnitRef,
  188.             RemoveStorageUnitRef,
  189.             GetIDFromStorageUnitRef,
  190.             CreateStorageUnitRefIterator,
  191.             SetStorageUnitRef,
  192.             GetGenerationNumber,
  193.             IncrementGenerationNumber,
  194.             IsPromiseValue,
  195.             SetPromiseValue,
  196.             GetPromiseValue,
  197.             ClearAllPromises,
  198.             ResolveAllPromises,
  199.             Lock,
  200.             Unlock;
  201.         releaseorder:
  202.             #ifdef __PRIVATE__
  203.                 SetChangedFromPrevFlag,
  204.                 GetCMContainer,
  205.                 CleanupAndFail,
  206.                 GetStorageUnitRef,
  207.                 GetHeap,
  208.                 GetObjectID,
  209.                 GetCurValue,
  210.                 GetCurProperty,
  211.                 GetCurType,
  212.                 SetCurType,
  213.                 GetObject;
  214.             #else
  215.                 reserved1,
  216.                 reserved2,
  217.                 reserved3,
  218.                 reserved4,
  219.                 reserved5,
  220.                 reserved6,
  221.                 reserved7,
  222.                 reserved8,
  223.                 reserved9,
  224.                 reserved10,
  225.                 reserved11;
  226.             #endif
  227.             
  228.     #ifdef __PRIVATE__
  229.         passthru C_xh = 
  230.             ""
  231.             "#include <CMAPI.h>"
  232.             "#include <ODMemory.h>"
  233.             "";
  234.         passthru C_xih = 
  235.             ""
  236.             "class PromiseResolver;"
  237.             "class SURefKeeper;"
  238.             "class SUCloneHelper;"
  239.             "";
  240.  
  241.         CMContainer            fCMContainer;
  242.         CMObject            fObject;
  243.         CMDraft                fDraft;
  244.         ODStorageUnitID        fID;    
  245.         CMObjectID            fObjectID;
  246.         CMProperty            fCurProperty;
  247.         ODBoolean            fHasPropertyLooped;
  248.         ODValueIndex        fCurValueIndex;
  249.         CMValue                fCurValue;
  250.         ODValueType            fCurValueType;
  251.         ODULong                fOffset;
  252.         CMType                fCurType;
  253.         ODBoolean            fHasValueLooped;
  254.         
  255.         ODULong                fCurrentKey;
  256.         ODULong                fLockCount;
  257.         
  258.         ODULong                fCurrentSURef;
  259.         
  260.         ODMemoryHeapID        fHeap;
  261.  
  262.         PromiseResolver*    fPromiseResolver;
  263.         
  264.         SURefKeeper*        fSURefKeeper;
  265.         
  266.         SUCloneHelper*        fSUCloneHelper;
  267.  
  268.         ODULong                fModificationDate;
  269.         
  270.         ODBoolean            fDirty;
  271.     #endif
  272.     };
  273. #endif
  274. };
  275.  
  276. #endif  // _CMSU_
  277.