home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / som30tk.zip / som30os2.zip / include / om.idl < prev    next >
Text File  |  1996-12-24  |  4KB  |  117 lines

  1. //
  2. //   COMPONENT_NAME: somd
  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.13 src/somd/om.idl, somd, som3.0 9/26/96 14:02:06 [12/24/96 07:39:26]
  14.  
  15.  
  16. #ifndef om_idl
  17. #define om_idl
  18.  
  19. #include <somobj.idl>
  20. #include <somdtype.idl>
  21. #include <snglicls.idl>
  22.  
  23.  
  24. interface ObjectMgr : SOMObject
  25. {
  26. //#  ObjectMgr is a PUBLIC class derived from SOMObject.
  27. //#  This class is deprecated as of DSOM 3.0.
  28. // 
  29. //   IDL interface spec for generic Object Manager.
  30. // 
  31. //   The Object Manager (abstract) class provides a uniform abstraction
  32. //   for various sorts of object managers.  Object Request Brokers, persistent
  33. //   storage managers, and OODBMSs are examples of object managers.
  34. // 
  35. //   This is an abstract base class, which defines the "core" interface for
  36. //   an object manager.  The basic groups of methods are:
  37. // 
  38. //     - object creation (basic)
  39. //     - object identification & location/activation
  40. //     - object release & destruction
  41. // 
  42. //   If a desired object cannot be mapped into the client's address space, the
  43. //   object manager is responsible for building a local "proxy" for the remote
  44. //   object.  The client invokes methods on the proxy, and the proxy should
  45. //   redispatch the requests to the remote object in an appropriate and
  46. //   transparent way.
  47. //
  48. //   NOTE: Since this is only intended to be an abstract base class, there
  49. //   is no underlying implementation, and ObjectMgr objects should not actually
  50. //   be instantiated.
  51. //
  52.  
  53.  
  54.     //# methods for creation
  55.  
  56.   SOMObject somdNewObject(in Identifier objclass, in string hints);
  57.   
  58.   // Returns a new object of the named class.  This is a "basic" creation
  59.   // method, where the decisions about where and how to create the object
  60.   // are mostly left up to the Object Manager.  However, the Object Manager
  61.   // may optionally define creation "hints" which the client may specify in 
  62.   // this call.
  63.   //
  64.   // OWNERSHIP of returned object is transferred to the caller.
  65.  
  66.     //# methods for identification & location/activation
  67.  
  68.   string somdGetIdFromObject(in SOMObject obj);
  69.   
  70.   // Returns a external id for an object managed by this Object Manager.
  71.   // The id is unambiguous -- it always refers to the same object (as long
  72.   // as the object exists).
  73.   //
  74.   // OWNERSHIP of returned id string is transferred to the caller.
  75.  
  76.   SOMObject somdGetObjectFromId(in string id);
  77.   
  78.   // Finds and/or activates an object implemented by this Object Manager,
  79.   // given its id.
  80.   //
  81.   // OWNERSHIP of returned object is transferred to the caller.
  82.  
  83.     //# methods for releasing / destroying objects
  84.  
  85.   void somdReleaseObject(in SOMObject obj);
  86.   
  87.   // Indicates that the client has finished using the object, and the
  88.   // "connection" to the object, if any, can be released.
  89.  
  90.   void somdDestroyObject(in SOMObject obj);
  91.   
  92.   // Causes the specified object to be destroyed.  (There is an implicit
  93.   // somoReleaseObject call made.)
  94.  
  95. #ifdef __SOMIDL__
  96.  
  97.   implementation
  98.   {
  99.     releaseorder: somdNewObject,
  100.           somdGetIdFromObject,somdGetObjectFromId,
  101.           somdReleaseObject,somdDestroyObject;
  102.   
  103.     //# Class Modifiers
  104.     callstyle = idl;
  105.     metaclass = SOMMSingleInstance;
  106.     dllname = "somd.dll";
  107.     majorversion = 2;
  108.     minorversion = 2;
  109.   
  110.   };
  111.  
  112. #endif /* __SOMIDL__ */
  113.  
  114. };
  115.  
  116. #endif  /* om_idl */
  117.