home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / odtlktv4.zip / ODTLKT / TOOLKIT / IDL / STORAGEU.IDL < prev    next >
Text File  |  1995-12-13  |  6KB  |  223 lines

  1. /********************************************************************/
  2. /*  Licensed Materials - Property of IBM                            */
  3. /*                                                                  */
  4. /*                                                                  */
  5. /* Copyright (C) International Business Machines Corp., 1994.       */
  6. /* Copyright (C) Apple Computer, Inc., 1994                         */
  7. /*                                                                  */
  8. /*  US Government Users Restricted Rights -                         */
  9. /*  Use, duplication, or disclosure restricted                      */
  10. /*  by GSA ADP Schedule Contract with IBM Corp.                     */
  11. /*                                                                  */
  12. /*                                                                  */
  13. /********************************************************************/
  14.  
  15.  
  16. #ifndef _STORAGEU_
  17. #define _STORAGEU_
  18.  
  19. #ifndef _REFCTOBJ_
  20. #include "RefCtObj.idl"
  21. #endif
  22.  
  23. //==============================================================================
  24. // Classes defined in this interface
  25. //==============================================================================
  26. interface   ODStorageUnit;
  27.  
  28. //==============================================================================
  29. // Classes used by this interface
  30. //==============================================================================
  31. interface   ODDraft;
  32. interface   ODSession;
  33. interface   ODPart;
  34. interface   ODStorageUnitCursor;
  35. interface   ODStorageUnitView;
  36. interface   ODStorageUnitRefIterator;
  37.  
  38. //==============================================================================
  39. // ODStorageUnit
  40. //==============================================================================
  41.  
  42. interface ODStorageUnit :  ODRefCntObject 
  43. {
  44.   ODDraft    GetDraft();
  45.  
  46.   ODSession  GetSession();
  47.  
  48.   ODBoolean  Exists(in ODPropertyName propertyName,
  49.           in ODValueType valueType, 
  50.           in ODValueIndex valueIndex);
  51.  
  52.   ODBoolean  ExistsWithCursor(in ODStorageUnitCursor cursor);
  53.  
  54.   ODULong  CountProperties();
  55.  
  56.   ODULong  CountValues();
  57.  
  58.   ODStorageUnit   Focus(in ODPropertyName propertyName,
  59.               in ODPositionCode propertyPosCode,
  60.               in ODValueType valueType,
  61.               in ODValueIndex valueIndex,
  62.               in ODPositionCode  valuePosCode);
  63.  
  64.   ODStorageUnit   FocusWithCursor(in ODStorageUnitCursor cursor);
  65.  
  66.   ODStorageUnit   Externalize();
  67.  
  68.   ODStorageUnit   Internalize();
  69.  
  70.   ODID      GetID();
  71.  
  72.   ODStorageUnitName GetName();
  73.  
  74.   void SetName(in ODStorageUnitName name);
  75.  
  76.   ODStorageUnit   AddProperty(in ODPropertyName propertyName);
  77.  
  78.   ODStorageUnit  AddValue(in ODValueType type);
  79.  
  80.   ODStorageUnit   Remove();
  81.  
  82.   void      CloneInto(in ODDraftKey key,
  83.             in ODStorageUnit destStorageUnit,
  84.             in ODID scopeID);
  85.  
  86.   ODStorageUnitView   CreateView();
  87.  
  88.   ODStorageUnitCursor  CreateCursorWithFocus();
  89.  
  90.   ODStorageUnitCursor CreateCursor(in ODPropertyName propertyName,
  91.                   in ODValueType valueType,
  92.                   in ODValueIndex valueIndex);
  93.  
  94.   ODPropertyName  GetProperty();
  95.  
  96.   ODValueType  GetType();
  97.  
  98.   void      SetType(in ODValueType valueType);
  99.  
  100.   void      SetOffset(in ODULong offset);
  101.  
  102.   ODULong    GetOffset();
  103.  
  104.   ODULong    GetValue(in ODULong length, out ODByteArray value);
  105.  
  106.   void      SetValue(in ODByteArray value);
  107.  
  108.   void      InsertValue(in ODByteArray value);
  109.  
  110.   void      DeleteValue(in ODULong length);
  111.  
  112.   ODULong    GetSize();
  113.  
  114.   ODBoolean    IsValidStorageUnitRef(in ODStorageUnitRef aRef);
  115.  
  116.   void GetStrongStorageUnitRef(in ODStorageUnitID embeddedSUID, out ODStorageUnitRef strongRef);
  117.  
  118.   void GetWeakStorageUnitRef(in ODStorageUnitID embeddedSUID, out ODStorageUnitRef weakRef);
  119.  
  120.   ODBoolean    IsStrongStorageUnitRef(in ODStorageUnitRef ref);
  121.  
  122.   ODBoolean    IsWeakStorageUnitRef(in ODStorageUnitRef ref);
  123.  
  124.   ODStorageUnit   RemoveStorageUnitRef(in ODStorageUnitRef aRef);
  125.  
  126.   ODStorageUnitID  GetIDFromStorageUnitRef(in ODStorageUnitRef aRef);
  127.  
  128.   ODStorageUnitRefIterator  CreateStorageUnitRefIterator();
  129.  
  130.   void   SetStorageUnitRef(in ODStorageUnitID embeddedSUID,
  131.                       in ODStorageUnitRef ref);
  132.  
  133.   ODULong      GetGenerationNumber();
  134.  
  135.   ODULong      IncrementGenerationNumber();
  136.  
  137.   ODBoolean  IsPromiseValue();
  138.  
  139.   void    SetPromiseValue(in ODValueType valueType, 
  140.               in ODULong offset,
  141.               in ODByteArray value, 
  142.                 in ODPart sourcePart);
  143.  
  144.   ODULong  GetPromiseValue(in ODValueType valueType,
  145.               in ODULong offset,
  146.               in ODULong length,
  147.               out ODByteArray value,
  148.               out ODPart sourcePart);
  149.  
  150.   void    ClearAllPromises();
  151.  
  152.   void  ResolveAllPromises();
  153.  
  154.   ODStorageUnitKey  Lock(in ODStorageUnitKey key);
  155.  
  156.   void        Unlock(in ODStorageUnitKey key);
  157. #ifdef __SOMIDL__
  158.   implementation
  159.   {
  160.     functionprefix = ODStorageUnit;
  161.     override:
  162.     somInit,
  163.     somUninit,
  164.     Acquire,
  165.         Release,
  166.         Purge;
  167.     releaseorder:
  168.     reserved1,
  169.         GetDraft,
  170.         GetSession,
  171.         Exists,
  172.         ExistsWithCursor,
  173.         CountProperties,
  174.         CountValues,
  175.         Focus,
  176.         FocusWithCursor,
  177.         Externalize,
  178.         Internalize,
  179.         GetID,
  180.         GetName,
  181.         SetName,
  182.         AddProperty,
  183.         AddValue,
  184.         Remove,
  185.         CloneInto,
  186.         CreateView,
  187.         CreateCursor,
  188.     CreateCursorWithFocus,
  189.     GetProperty,
  190.         GetType,
  191.         SetType,
  192.         SetOffset,
  193.         GetOffset,
  194.         GetValue,
  195.         SetValue,
  196.         InsertValue,
  197.         DeleteValue,
  198.         GetSize,
  199.         IsValidStorageUnitRef,
  200.         GetStrongStorageUnitRef,
  201.         GetWeakStorageUnitRef,
  202.         IsStrongStorageUnitRef,
  203.         IsWeakStorageUnitRef,
  204.         RemoveStorageUnitRef,
  205.         GetIDFromStorageUnitRef,
  206.         CreateStorageUnitRefIterator,
  207.      SetStorageUnitRef,
  208.     GetGenerationNumber,
  209.         IncrementGenerationNumber,
  210.         IsPromiseValue,
  211.         SetPromiseValue,
  212.         GetPromiseValue,
  213.         ClearAllPromises,
  214.         ResolveAllPromises,
  215.         Lock,
  216.         Unlock;
  217.   };
  218. #endif
  219. };
  220.  
  221. #endif  // _STORAGEU_
  222.  
  223.