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

  1. //
  2. //  @(#) 2.44 src/somd/orb.idl, somd, som3.0 9/26/96 14:02:08 [12/24/96 07:39:29]
  3. //
  4. //
  5. //   COMPONENT_NAME: somd
  6. //
  7. //   ORIGINS: 27
  8. //
  9. //
  10. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996 
  11. //   All Rights Reserved
  12. //   Licensed Materials - Property of IBM
  13. //   US Government Users Restricted Rights - Use, duplication or
  14. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  15. //
  16.  
  17. //#  ORB is a PUBLIC class derived from SOMObject.
  18. //
  19. //  The ORB class implements the CORBA ORB object.  The ORB class defines
  20. //  operations for:
  21. //    - converting between object references and strings
  22. //    - creating NVLists and determining the default context (support for DII)
  23. //    - obtaining initial references to basic object services
  24.  
  25.  
  26. #ifndef orb_idl
  27. #define orb_idl
  28.  
  29. #include <somobj.idl>
  30. #include <somdtype.idl>
  31. #include <snglicls.idl>
  32. #include <unotypes.idl>
  33.  
  34.  
  35. interface OperationDef;
  36. interface SOMDObject;
  37. interface NVList;
  38. interface Context;
  39.  
  40. interface ORB : SOMObject
  41. {
  42.   string object_to_string(in SOMObject obj);
  43.  
  44.   // Converts an object reference to its external form.  The external
  45.   // form of an object reference is defined by CORBA 2.0.  One
  46.   // exception is the external form of a local object in a client-only
  47.   // process, which will have a different form.
  48.   // OWNERSHIP of allocated memory is transferred to the caller.
  49.  
  50.   SOMObject string_to_object(in string str);
  51.  
  52.   // Converts externalized form back to an object reference.  If the
  53.   // input string represents a local object in a client-only process,
  54.   // and the object is no longer valid, another instance of the class
  55.   // will be created.
  56.   // OWNERSHIP of allocated memory is transferred to the caller.
  57.  
  58.   ORBStatus create_list(in long count, out NVList new_list);
  59.  
  60.   // Creates an NVList of the specified size.
  61.   // OWNERSHIP of allocated "new_list" is transferred to the caller.
  62.  
  63.   ORBStatus create_operation_list(in OperationDef oper, out NVList new_list);
  64.  
  65.   // Creates a NamedValue list for the specified operation,
  66.   // for use in Requests invoking that operation.
  67.   // OWNERSHIP of allocated "new_list" is transferred to the caller.
  68.  
  69.   ORBStatus get_default_context(out Context ctx);
  70.  
  71.   // Returns the default process Context object.
  72.   // OWNERSHIP of allocated Context object is transferred to the caller.
  73.  
  74.   typedef string ObjectId;
  75.   typedef sequence <ObjectId> ObjectIdList;
  76.   exception InvalidName{};
  77.  
  78.   ObjectIdList list_initial_services ();
  79.  
  80.   // Lists which objects have references available by calling
  81.   // resolve_initial_references.  This list is returned as a sequence
  82.   // of well-known strings.  Each well-known string specifies a basic
  83.   // object service and is referred to as an ObjectId.
  84.   // OWNERSHIP of returned strings is transferred to the caller.
  85.  
  86.   SOMObject resolve_initial_references (in ObjectId identifier)
  87.     raises (InvalidName);
  88.  
  89.   // Takes a single ObjectId and returns an appropriate object reference
  90.   // for the requested object service.  Since resolve_initial_references
  91.   // returns different types of objects, it is prototyped to simply return
  92.   // a SOMObject.  The caller may need to cast the return value to the
  93.   // actual object class.
  94.  
  95.  
  96.   attribute boolean stringToObject30;
  97.   // If TRUE, indicates string_to_object should return SOMObject.
  98.   // If FALSE, a SOMDObject will be returned (as in previous releases).
  99.  
  100.  
  101. #ifdef __SOMIDL__
  102.  
  103.   implementation
  104.   {
  105.     releaseorder: object_to_string, string_to_object,
  106.                   create_list, create_operation_list, get_default_context,
  107.                   private1, private2, private3, private4,
  108.                   list_initial_services, resolve_initial_references,
  109.                   _get_stringToObject30, _set_stringToObject30,
  110.                   private5, private6, private7, private8;
  111.  
  112.     //# Class Modifiers
  113.     callstyle = idl;
  114.     metaclass = SOMMSingleInstance;
  115.     dllname = "somd.dll";
  116.     majorversion = 2;
  117.     minorversion = 2;
  118.  
  119.     //# Method Modifiers
  120.     somDefaultInit: override, init;
  121.     somDestruct: override;
  122.  
  123.  
  124.     //# Passthrus
  125.     passthru C_h_after = ""
  126.         "#ifndef SOM_IMPORTEXPORT_somd"
  127.         "#if defined(_WIN32) && !defined(SOM_DLL_somd)"
  128.             "#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT"
  129.         "#else"
  130.             "#define SOM_IMPORTEXPORT_somd"
  131.         "#endif"
  132.         "#endif"
  133.       "#ifdef SOM_STRICT_IDL"
  134.       "SOMEXTERN SOM_IMPORTEXPORT_somd ORB   SOMDLINK SOMD_ORBObject;"
  135.       "#else"
  136.       "SOMEXTERN SOM_IMPORTEXPORT_somd ORB * SOMDLINK SOMD_ORBObject;"
  137.       "#endif /* SOM_STRICT_IDL */"
  138.       ""
  139.       "#include <somdobj.h>"
  140.       "";
  141.  
  142.     passthru C_xh_after = ""
  143.       "class ORB;"
  144.         "#ifndef SOM_IMPORTEXPORT_somd"
  145.         "#if defined(_WIN32) && !defined(SOM_DLL_somd)"
  146.             "#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT"
  147.         "#else"
  148.             "#define SOM_IMPORTEXPORT_somd"
  149.         "#endif"
  150.         "#endif"
  151.       "SOMEXTERN SOM_IMPORTEXPORT_somd ORB * SOMDLINK SOMD_ORBObject;"
  152.       ""
  153.       "#include <somdobj.xh>"
  154.       "";
  155.  
  156.  
  157.   };
  158.  
  159. #endif /* __SOMIDL__ */
  160.  
  161. };
  162.  
  163. #endif  /* orb_idl */
  164.