home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / repostry.idl < prev    next >
Encoding:
Text File  |  1996-02-21  |  3.6 KB  |  128 lines

  1. //
  2. //   COMPONENT_NAME: somi
  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.  
  14. //  Repository: CORBA Interface for access to repository objects
  15. //  See CORBA 7.5.2, pp.132-133
  16.  
  17. #ifndef repostry_idl
  18. #define repostry_idl
  19.  
  20. #include <containr.idl>
  21. #include <somcls.idl>
  22.  
  23. #define RepositoryId string
  24. #define InterfaceName string
  25.  
  26. // CORBA 7.5.2, p.133
  27. //
  28. // The Repository interface provides global access to the SOM
  29. // CORBA-compliant Interface Repository (IR).  To obtain an object
  30. // reference to an instance of Repository, use the RepositoryNew
  31. // function.
  32. //
  33. interface Repository : Container
  34. {
  35.     struct RepositoryDescription {
  36.     Identifier   name;
  37.     RepositoryId id;
  38.     RepositoryId defined_in;
  39.     };
  40.     // The inherited describe_contents method returns an instance
  41.     // of this (RepositoryDescription) structure in the value
  42.     // member of the Description structure defined in the Container
  43.     // interface.
  44.  
  45.     enum irOpenErrorCodes {
  46.         NOACCESS, BADMAGICNUMBER, MISSINGVERSIONINFO, 
  47.     IOERROR, VERSIONMISMATCH
  48.     };    
  49.  
  50.     exception irOpenError {
  51.     irOpenErrorCodes errorCode;
  52.     string fileName;
  53.     };
  54.     // The irOpenError and associated irOpenErrorCodes are a
  55.     // SOM-unique extension to the Interface Repository.  These
  56.     // errors may be raised by the somNew when instantiating the
  57.     // Repository object and can be found in the SOM global
  58.     // Environment.
  59.  
  60.     Contained lookup_id(in RepositoryId search_id);
  61.     // Returns the object with a RepositoryId given by search_id.
  62.  
  63.     string lookup_modifier(in RepositoryId name, in string modifier);
  64.     // [SOM-unique extension]
  65.     //
  66.     // Returns the value string associated with the given SOM modifier
  67.     // for the object whose id is specified.  If the object does not 
  68.     // exist or does not possess the modifier, NULL (or zero) is returned.  
  69.     // If the modifier exists but does not have a value, a zero-length
  70.     // value string is returned.
  71.     //
  72.     // You must free the returned string when finished with it (using
  73.     // SOMFree).
  74.  
  75.     void release_cache();
  76.     // [SOM-unique extension]
  77.     //
  78.     // This method releases all currently unreferenced Interface Repository
  79.     // objects from the internal object cache.  This may release some storage
  80.     // at the cost of slowing down (slightly) the next few lookup operations.
  81.     // The internal cache will replenish itself (over time) with each
  82.     // subsequent lookup operation.
  83.  
  84. #ifdef __SOMIDL__
  85.   implementation {
  86.       releaseorder: lookup_id, lookup_modifier, release_cache
  87.             ;
  88.  
  89.       callstyle = idl;
  90.       majorversion = 2;
  91.       minorversion = 1;
  92.       filestem = repostry;
  93.       dllname = "somir.dll";
  94.  
  95.       passthru C_h =
  96.     ""
  97.     "    #include <stdio.h>"
  98.     "    #include <somtcnst.h>"
  99.     "    #include <somir.h>"
  100.     "    #include <containd.h>"
  101.     "";
  102.       passthru C_xh =
  103.     ""
  104.     "    #include <stdio.h>"
  105.     "    #include <somtcnst.xh>"
  106.     "    #include <somir.xh>"
  107.     "    #include <containd.xh>"
  108.     "";
  109.       passthru C_hh =
  110.     ""
  111.     "    #include <stdio.h>"
  112.     "    #include <somtcnst.hh>"
  113.     "    #include <somir.hh>"
  114.     "    #include <containd.hh>"
  115.     "";
  116.  
  117.       describe_contents: override;
  118.       somFree: override;
  119.       somDumpSelf: override;
  120.       somDumpSelfInt: override;
  121.  
  122.   };
  123. #endif /* __SOMIDL__ */
  124. };
  125.  
  126.  
  127. #endif    /* repostry_idl */
  128.