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

  1. /*
  2.  *    @(#) 2.36 src/somd/implrep.idl, somd, som3.0 9/26/96 14:01:57 [12/24/96 07:39:25]
  3.  */
  4. //
  5. //   COMPONENT_NAME: somd
  6. //
  7. //   ORIGINS: 27
  8. //
  9. //
  10. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1995,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.  
  18. #ifndef SOM_implrep_idl
  19. #define SOM_implrep_idl
  20.  
  21. #include <somdtype.idl>
  22.  
  23. #include <impldef.idl>
  24.  
  25. interface ImplRepository : SOMObject
  26. {
  27. //  CLASS SPECIFICATION FOR IMPLEMENTATION REPOSITORY
  28. //  The ImplRepository class contains methods which add/update/list/delete
  29. //  information from both the Implementation repository and the Name service.
  30.  
  31.  
  32.   typedef struct PV {
  33.     string name;
  34.     string value;
  35.   } PropertyValue;
  36.   typedef sequence<PropertyValue> PVList;
  37.   // This is a list of optional properties which are to be 
  38.   // associated with a class name when registering with the Name Server.
  39.  
  40.   ImplementationDef find_impldef(in ImplId implid);
  41.   // This method searches the Implementation Repository and returns
  42.   // an ImplementationDef object with the specified implid.
  43.   // OWNERSHIP of the return parameter is transferred to the caller.
  44.   // The following minor codes are returned in the Environment structure:
  45.   //         1. SOMDERROR_NoMemory
  46.   //         2. SOMDERROR_BadParm
  47.   //         3. SOMDERROR_NoDBInit
  48.   //         4. SOMDERROR_NoDBAvailable
  49.   //         5. SOMDERROR_AccessDenied
  50.   //         6. SOMDERROR_ClassNotFound
  51.  
  52.   ImplementationDef find_impldef_by_alias(in string alias_name);
  53.   // This method searches the Implementation Repository and returns
  54.   // an ImplementationDef object with the specified name (alias).
  55.   // OWNERSHIP of the return parameter is transferred to the caller.
  56.   // The following minor codes are returned in the Environment structure:
  57.   //         1. SOMDERROR_NoMemory
  58.   //         2. SOMDERROR_BadParm
  59.   //         3. SOMDERROR_NoDBInit
  60.   //         4. SOMDERROR_NoDBAvailable
  61.   //         5. SOMDERROR_AccessDenied
  62.   //         6. SOMDERROR_ClassNotFound
  63.  
  64.   ORBStatus find_all_aliases(out sequence<string> impl_aliases);
  65.   // This method searches the Implementation Repository and returns
  66.   // a sequence of impl_alias associated with all the impldef objects
  67.   // stored in the repository.
  68.   // The structure representing the sequence is created by the caller.
  69.   // OWNERSHIP of the _buffer field and every string in the buffer is
  70.   // transferred to the caller.
  71.   // The following minor codes are returned in the Environment structure:
  72.   //         1. SOMDERROR_NoMemory
  73.   //         2. SOMDERROR_BadParm
  74.   //         3. SOMDERROR_NoDBInit
  75.   //         4. SOMDERROR_NoDBAvailable
  76.   //         5. SOMDERROR_AccessDenied
  77.  
  78.   ORBStatus find_all_impldefs(out sequence<ImplementationDef> outimpldefs);
  79.   // This method searches the Implementation Repository and returns
  80.   // all the ImplementationDef objects in it.
  81.   // The structure representing the sequence is created by the caller.
  82.   // OWNERSHIP of the _buffer field and every ImplementationDef object in 
  83.   // the buffer is transferred to the caller.
  84.   // The following minor codes are returned in the Environment structure:
  85.   //         1. SOMDERROR_NoMemory
  86.   //         2. SOMDERROR_BadParm
  87.   //         3. SOMDERROR_NoDBInit
  88.   //         4. SOMDERROR_NoDBAvailable
  89.   //         5. SOMDERROR_AccessDenied
  90.   //         6. SOMDERROR_ClassNotFound
  91.  
  92.   ORBStatus add_impldef(in ImplementationDef impldef);
  93.   // This method inserts an ImplementationDef object into the Implementation
  94.   // Repository. Also, a default class value is associated with this impl_id
  95.   // with the Name server if it is available.
  96.   // The following minor codes are returned in the Environment structure:
  97.   //          1. SOMDERROR_NoMemory
  98.   //          2. SOMDERROR_UnknownError
  99.   //          3. SOMDERROR_BadParm
  100.   //          4. SOMDERROR_NoDBInit
  101.   //          5. SOMDERROR_NoDBAvailable
  102.   //          6. SOMDERROR_AccessDenied
  103.   //          7. SOMDERROR_DuplicateEntry
  104.   //          8. SOMDERROR_CannotCreateUUID
  105.   //          9. SOMDERROR_NullImplAlias
  106.   //         10. SOMDERROR_NamingNotActive
  107.  
  108.   ORBStatus update_impldef(in ImplementationDef impldef);
  109.   // This method replaces an ImplementationDef object in the Implementation
  110.   // Repository with the supplied object.  The "impl_id" attribute of the
  111.   // supplied object is used to find the object to replace in the Impl.
  112.   // Repository. Also, the default value associated with this impl_id
  113.   // is updated in the Name server if it is available.
  114.   // The following minor codes are returned in the Environment structure:
  115.   //          1. SOMDERROR_NoMemory
  116.   //          2. SOMDERROR_BadParm
  117.   //          3. SOMDERROR_NoDBInit
  118.   //          4. SOMDERROR_NoDBAvailable
  119.   //          5. SOMDERROR_AccessDenied
  120.   //          6. SOMDERROR_DuplicateEntry
  121.   //          7. SOMDERROR_NullImplAlias
  122.   //          8. SOMDERROR_NamingNotActive
  123.  
  124.   ORBStatus delete_impldef(in ImplId implid);
  125.   // This method deletes the ImplementationDef object with the specified
  126.   // implid from the Implementation Repository.  Also, the default entry
  127.   // associated with this impl_id is deleted from the Name server if it
  128.   // is available.
  129.   // The following minor codes are returned in the Environment structure:
  130.   //          1. SOMDERROR_NoMemory
  131.   //          2. SOMDERROR_EntryNotFound
  132.   //          3. SOMDERROR_NoDBInit
  133.   //          4. SOMDERROR_NoDBAvailable
  134.   //          5. SOMDERROR_AccessDenied
  135.   //          6. SOMDERROR_NullImplId
  136.   //          7. SOMDERROR_NamingNotActive
  137.  
  138.   sequence<ImplementationDef> find_impldef_by_class(in string classname);
  139.   // This method with the help of the information in the Implementation 
  140.   // repository and the Name service returns the sequence of
  141.   // ImplementationDef objects of servers that implement the desired class.
  142.   // OWNERSHIP for the  _buffer field of the return sequence and
  143.   // for each element in the sequence is transferred to the caller.
  144.   // The following minor codes are returned in the Environment structure:
  145.   //         1. SOMDERROR_NoMemory
  146.   //         2. SOMDERROR_BadParm
  147.   //         3. SOMDERROR_NoDBInit
  148.   //         4. SOMDERROR_NoDBAvailable
  149.   //         5. SOMDERROR_AccessDenied
  150.   //         6. SOMDERROR_NamingNotActive
  151.   //         7. SOMDERROR_ClassNotFound
  152.  
  153.   void add_class_to_impldef(in ImplId implid, in string classname);
  154.   // This method associates the "classname" with the ImplementationDef
  155.   // whose id is "implid".  This is meant to indicate that the server
  156.   // (specified by the ImplementationDef) implements the named class.
  157.   // The following minor codes are returned in the Environment structure:
  158.   //         1. SOMDERROR_NoMemory
  159.   //         2. SOMDERROR_BadParm
  160.   //         3. SOMDERROR_NoDBInit
  161.   //         4. SOMDERROR_NoDBAvailable
  162.   //         5. SOMDERROR_AccessDenied
  163.   //         6. SOMDERROR_NamingNotActive
  164.  
  165.   void remove_class_from_impldef(in ImplId implid, in string classname);
  166.   // This method removes the classname from the list of classnames
  167.   // associated with the ImplementationDef whose id is "implid".
  168.   // The following minor codes are returned in the Environment structure:
  169.   //         1. SOMDERROR_NoMemory
  170.   //         2. SOMDERROR_BadParm
  171.   //         3. SOMDERROR_NoDBInit
  172.   //         4. SOMDERROR_NoDBAvailable
  173.   //         5. SOMDERROR_AccessDenied
  174.   //         6. SOMDERROR_NamingNotActive
  175.  
  176.   void remove_class_from_all(in string classname);
  177.   // This method removes the classname from all the ImplementationDefs.
  178.   // The following minor codes are returned in the Environment structure:
  179.   //         1. SOMDERROR_NoMemory
  180.   //         2. SOMDERROR_BadParm
  181.   //         3. SOMDERROR_NoDBInit
  182.   //         4. SOMDERROR_NoDBAvailable
  183.   //         5. SOMDERROR_AccessDenied
  184.   //         6. SOMDERROR_NamingNotActive
  185.  
  186.   sequence<string> find_classes_by_impldef(in ImplId implid);
  187.   // This method queries the Name service and returns the set of
  188.   // class names supported by a server with specified "implid".
  189.   // OWNERSHIP for the _buffer field in the return sequence
  190.   // and for each element in the sequence is transferred to the caller.
  191.   // The following minor codes are returned in the Environment structure:
  192.   //         1. SOMDERROR_NoMemory
  193.   //         2. SOMDERROR_BadParm
  194.   //         3. SOMDERROR_NoDBInit
  195.   //         4. SOMDERROR_NoDBAvailable
  196.   //         5. SOMDERROR_AccessDenied
  197.   //         6. SOMDERROR_ClassNotFound
  198.   //         7. SOMDERROR_NamingNotActive
  199.  
  200.  
  201.   ORBStatus add_class_to_all(in string classname);
  202.   // This method will associate the classname with all ImplementationDef
  203.   // objects in the repository. 
  204.   // The following minor codes are returned in the Environment structure:
  205.   //         1. SOMDERROR_NoMemory
  206.   //         2. SOMDERROR_BadParm
  207.   //         3. SOMDERROR_NoDBInit
  208.   //         4. SOMDERROR_NoDBAvailable
  209.   //         5. SOMDERROR_AccessDenied
  210.   //         6. SOMDERROR_ClassNotFound
  211.   //         7. SOMDERROR_NamingNotActive
  212.  
  213.   ORBStatus add_class_with_properties(in ImplId implid, in string classname,
  214.                       in PVList pvl);
  215.   // This method associates the classname with the ImplementationDef
  216.   // whose id is "implid".  This is meant to indicate that the server
  217.   // (specified by the ImplementationDef) implements the named class.
  218.   // In addition, the optional PVList sequenece will associate the
  219.   // specified properties and values with a class.
  220.   // The following minor codes are returned in the Environment structure:
  221.   //         1. SOMDERROR_NoMemory
  222.   //         2. SOMDERROR_BadParm
  223.   //         3. SOMDERROR_NoDBInit
  224.   //         4. SOMDERROR_NoDBAvailable
  225.   //         5. SOMDERROR_AccessDenied
  226.   //         6. SOMDERROR_ClassNotFound
  227.   //         7. SOMDERROR_NamingNotActive
  228.  
  229.  
  230. #ifdef __SOMIDL__
  231.  
  232.   implementation
  233.   {
  234.     releaseorder: find_impldef, find_impldef_by_alias,
  235.                   find_impldef2, find_impldef_by_alias2,
  236.                   find_impldef_by_class, add_impldef,
  237.                   update_impldef, delete_impldef,
  238.                   add_class_to_impldef,
  239.                   remove_class_from_impldef, remove_class_from_all,
  240.                   find_classes_by_impldef,
  241.                   implr_get_impl, implr_search_impl,
  242.                   implr_search_class, implr_update_impl,
  243.                   find_all_impldefs,
  244.                   find_all_aliases,
  245.           add_class_to_all,
  246.                   add_class_with_properties;
  247.  
  248.  
  249.     //# Class Modifiers
  250.     callstyle = idl;
  251.     dllname = "somd.dll";
  252.     majorversion = 2;
  253.     minorversion = 2;
  254.     functionprefix = "ImplRep_";
  255.  
  256.  
  257.     //# Method Modifiers
  258.     override: somDefaultInit, somDestruct;
  259.  
  260.     //# Passthrus
  261.     passthru C_h_after = ""
  262.       "#include <impldef.h>"
  263.       ""
  264.         "#ifndef SOM_IMPORTEXPORT_somd"
  265.         "#if defined(_WIN32) && !defined(SOM_DLL_somd)"
  266.             "#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT"
  267.         "#else"
  268.             "#define SOM_IMPORTEXPORT_somd"
  269.         "#endif"
  270.         "#endif"
  271.       "#ifdef SOM_STRICT_IDL"
  272.       "SOMEXTERN SOM_IMPORTEXPORT_somd ImplRepository   SOMDLINK SOMD_ImplRepObject;"
  273.       "#else"
  274.       "SOMEXTERN SOM_IMPORTEXPORT_somd ImplRepository * SOMDLINK SOMD_ImplRepObject;"
  275.       "#endif /* SOM_STRICT_IDL */"
  276.       "";   
  277.  
  278.     passthru C_xh_after = ""
  279.     "class ImplRepository;"
  280.     "#include <impldef.xh>"
  281.     ""
  282.         "#ifndef SOM_IMPORTEXPORT_somd"
  283.         "#if defined(_WIN32) && !defined(SOM_DLL_somd)"
  284.             "#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT"
  285.         "#else"
  286.             "#define SOM_IMPORTEXPORT_somd"
  287.         "#endif"
  288.         "#endif"
  289.     "SOMEXTERN SOM_IMPORTEXPORT_somd ImplRepository * SOMDLINK SOMD_ImplRepObject;"
  290.     "";
  291.  
  292.   };
  293.  
  294. #endif /* __SOMIDL__ */
  295. };
  296. #endif /* SOM_implrep_idl  */
  297.  
  298.