home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / psma.idl < prev    next >
Text File  |  1999-02-22  |  5KB  |  148 lines

  1. //
  2. //   COMPONENT_NAME: somp
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
  8. //   All Rights Reserved
  9. //   Licensed Materials - Property of IBM
  10. //   US Government Users Restricted Rights - Use, duplication or
  11. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  12. //
  13. //#  @(#) 2.9 src/somp/psma.idl, somp, som2.1 12/26/95 17:00:09 [7/30/96 14:47:03]
  14.  
  15.  
  16.  
  17. #ifndef psma_idl
  18. #define psma_idl
  19.  
  20. #include <somp.idl>
  21. #include <somobj.idl>
  22. #include <somperrd.idl>
  23. #include <snglicls.idl>
  24.  
  25. interface SOMPIOGroupMgrAbstract;
  26. interface SOMPIOGroup;
  27. interface SOMPNameSpaceMgr;
  28. interface SOMPAscii;
  29. interface SOMPKeyedSet;
  30. interface SOMPPersistentId;
  31. interface SOMPPersistentObject;
  32.  
  33. interface SOMPPersistentStorageMgr : SOMObject
  34.  
  35. // The Persistent Storage Manager is the primary interface for clients
  36. // of the Persistence Framework to read and write persistent objects
  37. // to/from storage.
  38. //
  39. // Only a single instance of this class exists in the Persistence Framework
  40. // by virtue of the metaclass SOMMSingleInstance.
  41.  
  42. {
  43.    const unsigned short SOMP_STORING_ON    = 3;
  44.    const unsigned short SOMP_STORING_OFF   = 4;
  45.    const unsigned short SOMP_RESTORING_ON  = 5;
  46.    const unsigned short SOMP_RESTORING_OFF = 6;
  47.  
  48.  
  49.    void sompStoreObject(in SOMPPersistentObject thisObject) raises(SOMPError::sompException);
  50. // Stores a persistent object and all its persistent children.
  51.  
  52.    SOMObject sompRestoreObject(in SOMPPersistentId objectID) raises(SOMPError::sompException);
  53. // Restores an object and its children.
  54. // If error, returns NULL.
  55.  
  56.    void  sompStoreObjectWithoutChildren(in SOMPPersistentObject thisObject)
  57.                        raises(SOMPError::sompException);
  58. // Stores a persistent object.
  59.  
  60.    SOMObject sompRestoreObjectWithoutChildren(in SOMPPersistentId objectID)
  61.                           raises(SOMPError::sompException);
  62. // Restores an object to a stable state.
  63. // If error, returns NULL.
  64.  
  65.    void sompDeleteObject(in SOMPPersistentId objectID) raises(SOMPError::sompException);
  66. // Delete the given persistent object.
  67. //
  68. // If the object is an in-memory object only, it is removed from the Name
  69. // Space Mgr and its in-memory IO Group object and then freed.  If the
  70. // object also previously existed in a stored IO Group, then the stored
  71. // IO Group is modified to indicate that the object has been removed.
  72.  
  73.    boolean sompObjectExists(in SOMPPersistentId objectID) raises(SOMPError::sompException);
  74. // Checks to see if object exists.  If so, returns TRUE otherwise
  75. // returns FALSE.
  76.  
  77.    void sompAddObjectToWriteSet(in SOMPPersistentObject thisObject) raises(SOMPError::sompException);
  78. // Adds the given object to the set of objects being written by
  79. // sompStoreObject. An error occurs if this method is called
  80. // before sompStoreObject is called.
  81. //
  82. // This method provides a way for an object's encoder/decoder to add
  83. // a persistent object to the set to be written. This is useful for saving
  84. // persistent child objects which were not "registered" with their
  85. // parent object.
  86.  
  87.    void sompAddIdToReadSet(in SOMPPersistentId objectID) raises(SOMPError::sompException);
  88. // This method adds the given persistent ID to the set of ID's which
  89. // represent the persistent object's to be restored by
  90. // sompRestoreObject.  If an error occurs the ID is not added to the read set.
  91. //
  92. // ID's can only be added to the read set following a call to
  93. // sompRestoreObject. It is expected that encoder/decoder
  94. // writers will make use of this method when restoring child objects.
  95. // For example:
  96. //    1) decoder reads object ID in string form
  97. //    2) decoder creates persistent ID object based on string
  98. //    3) decoder calls sompAddIdToReadSet with the persistent ID.
  99.  
  100.  
  101.  
  102.    SOMObject sompRestoreObjectFromIdString(in string idString) raises(SOMPError::sompException);
  103. // Instantiate a persistent ID from the given string and then restore
  104. // the object and its children.
  105. // If error, returns NULL.
  106.  
  107.  
  108. #ifdef __SOMIDL__
  109.  
  110. implementation
  111. {
  112.   callstyle=idl;
  113.   dllname="somp.dll";
  114.  
  115.   releaseorder: sompStoreObject, sompRestoreObject,
  116.         sompStoreObjectWithoutChildren, sompRestoreObjectWithoutChildren,
  117.         sompDeleteObject, sompObjectExists,
  118.         sompAddObjectToWriteSet, sompRestoreObjectToNameSpace,
  119.         sompAddIdToReadSet, sompRestoreStableObject,
  120.         sompAddRegisteredChildrenToReadSet,
  121.         sompPrepareWriteSet, sompStoreWriteSet,
  122.         sompAddChildIfNecessary, sompRemoveIOGroupFromSet,
  123.         sompRestoreObjectFromIdString, sompSetPSMFlags,
  124.         sompRemoveObjectFromSet,
  125.         sompNewGroupMgr,
  126.         sompPSMInitThreadData,
  127.         sompPSMUninitThreadData,
  128.         sompPSMGetThreadData ;
  129.  
  130. // Class Modifiers
  131.    majorversion = 2;
  132.    minorversion = 1;
  133.    filestem = psma;
  134.    metaclass = SOMMSingleInstance;
  135.  
  136.  
  137. // Method Modifiers
  138.    somInit: override;
  139.    somUninit: override;
  140.  
  141. };
  142. #endif /* __SOMIDL__ */
  143.  
  144. };
  145.  
  146.  
  147. #endif  /* psma_idl */
  148.