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

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