home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / implrep.idl < prev    next >
Text File  |  1999-02-22  |  5KB  |  156 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.14.1.1 src/somd/implrep.idl, somd, som2.1 4/1/95 14:52:36 [7/30/96 14:45:27]
  14.  
  15.  
  16. //  CLASS SPECIFICATION FOR IMPLEMENTATION REPOSITORY
  17.  
  18.  
  19. #ifndef implrep_idl
  20. #define implrep_idl
  21.  
  22. #include <somobj.idl>
  23. #include <somdtype.idl>
  24. #include <snglicls.idl>
  25.  
  26.  
  27.  
  28. interface ImplementationDef;
  29.  
  30.  
  31. interface ImplRepository : SOMObject
  32. {
  33.   ImplementationDef find_impldef(in ImplId implid);
  34.  
  35.   // This method searches the Implementation Repository and returns
  36.   // an ImplementationDef object with the specified implid.
  37.  
  38.   ImplementationDef find_impldef_by_alias(in string alias_name);
  39.  
  40.   // This method searches the Implementation Repository and returns
  41.   // an ImplementationDef object with the specified name (alias).
  42.  
  43.   ORBStatus find_all_impldefs(out sequence<ImplementationDef> outimpldefs);
  44.  
  45.    // This method searches the Implementation Repository and returns
  46.    // all the ImplementationDef objects in it.
  47.  
  48.   sequence<ImplementationDef> find_impldef_by_class(in string classname);
  49.  
  50.   // This method searches the class index and returns the sequence of
  51.   // ImplementationDef objects for servers which implement that class.
  52.  
  53.   void add_impldef(in ImplementationDef impldef);
  54.  
  55.   // This method inserts an ImplementationDef object into the Implementation
  56.   // Repository.
  57.  
  58.   void update_impldef(in ImplementationDef impldef);
  59.  
  60.   // This method replaces an ImplementationDef object in the Implementation
  61.   // Repository with the supplied object.  The "impl_id" attribute of the
  62.   // supplied object is used to find the object to replace in the Impl.
  63.   // Repository.
  64.  
  65.   void delete_impldef(in ImplId implid);
  66.  
  67.   // This method deletes the ImplementationDef object with the specified
  68.   // implid from the Implementation Repository.
  69.  
  70.   void add_class_to_impldef(in ImplId implid, in string classname);
  71.  
  72.   // This method associates the classname with the ImplementationDef
  73.   // whose id is "implid".  This is meant to indicate that the server
  74.   // (specified by the ImplementationDef) implements the named class.
  75.  
  76.   void remove_class_from_impldef(in ImplId implid, in string classname);
  77.  
  78.   // This method removes the classname from the list of classnames
  79.   // associated with the ImplementationDef whose id is "implid".
  80.  
  81.   void remove_class_from_all(in string classname);
  82.  
  83.   // This method removes the classname from all the ImplementationDefs.
  84.  
  85.   sequence<string> find_classes_by_impldef(in ImplId implid);
  86.  
  87.   // This method searches the class index and returns the sequence of
  88.   // class names supported by a server with specified "implid".
  89.  
  90.  
  91. #ifdef __SOMIDL__
  92.  
  93.   implementation
  94.   {
  95.     releaseorder: find_impldef, find_impldef_by_alias,
  96.                   find_impldef2, find_impldef_by_alias2,
  97.                   find_impldef_by_class, add_impldef,
  98.                   update_impldef, delete_impldef,
  99.                   add_class_to_impldef,
  100.                   remove_class_from_impldef, remove_class_from_all,
  101.                   find_classes_by_impldef,
  102.                   implr_get_impl, implr_search_impl,
  103.                   implr_search_class, implr_update_impl,
  104.                   find_all_impldefs;
  105.  
  106.     //# Class Modifiers
  107.     callstyle = idl;
  108.     metaclass = SOMMSingleInstance;
  109.     dllname = "somd.dll";
  110.     majorversion = 2;
  111.     minorversion = 1;
  112.  
  113.     //# Method Modifiers
  114.     somInit: override;
  115.     somUninit: override;
  116.  
  117.     //# Passthrus
  118.     passthru C_h_after = ""
  119.       "#include <impldef.h>"
  120.       ""
  121.       "#ifdef SOM_STRICT_IDL"
  122. #ifdef _WIN16
  123.       "#define SOMD_ImplRepObject (*SOMD_ImplRepObjectResolve())"
  124.       "SOMEXTERN ImplRepository * SOMLINK SOMD_ImplRepObjectResolve(void);"
  125. #else
  126.       "SOMEXTERN ImplRepository   SOMDLINK SOMD_ImplRepObject;"
  127. #endif
  128.       "#else"
  129. #ifdef _WIN16
  130.       "#define SOMD_ImplRepObject (*SOMD_ImplRepObjectResolve())"
  131.       "SOMEXTERN ImplRepository ** SOMLINK SOMD_ImplRepObjectResolve(void);"
  132. #else
  133.       "SOMEXTERN ImplRepository * SOMDLINK SOMD_ImplRepObject;"
  134. #endif
  135.       "#endif /* SOM_STRICT_IDL */"
  136.       "";
  137.  
  138.     passthru C_xh_after = ""
  139.       "class ImplRepository;"
  140.       "#include <impldef.xh>"
  141.       ""
  142. #ifdef _WIN16
  143.       "#define SOMD_ImplRepObject (*SOMD_ImplRepObjectResolve())"
  144.       "SOMEXTERN ImplRepository ** SOMLINK SOMD_ImplRepObjectResolve(void);"
  145. #else
  146.       "SOMEXTERN ImplRepository * SOMDLINK SOMD_ImplRepObject;"
  147. #endif
  148.       "";
  149.  
  150.   };
  151.  
  152. #endif /* __SOMIDL__ */
  153. };
  154.  
  155. #endif  /* implrep_idl */
  156.