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

  1. //#
  2. //#  COMPONENT_NAME: somi
  3. //#
  4. //#  ORIGINS: 27
  5. //#
  6. //#
  7. //#    25H7912  (C)   COPYRIGHT International Business Machines Corp. 1992,1996,1996,1996  
  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.13.2.8 src/somi/ir/somir/repostry.idl, somi.corba, som3.0 3/28/96 11:57:13 [12/24/96 07:40:12]
  14.  
  15.  
  16. //#  Repository: CORBA Interface for access to repository objects
  17. //#  See CORBA 1.1, 7.5.2, pp.132-133
  18. //#
  19. //#                        DEFECT HISTORY
  20. //#                        --------------
  21. //#  20692  03/28/96   Partha      Specify SOMClass as explicit parent for M_Repository interface
  22. //#
  23.  
  24. #ifndef repostry_idl
  25. #define repostry_idl
  26.  
  27. #include <containr.idl>
  28. #include <somcls.idl>
  29.  
  30. #define RepositoryId string
  31. #define InterfaceName string
  32.  
  33. interface Repository : Container
  34. // The Repository interface provides global access to the SOM
  35. // CORBA-compliant Interface Repository (IR).  To obtain an object
  36. // reference to an instance of Repository, use the RepositoryNew
  37. // function.
  38. //
  39. // See CORBA 1.1, 7.5.2, p.133
  40. {
  41.     struct RepositoryDescription {
  42.     Identifier   name;
  43.     RepositoryId id;
  44.     RepositoryId defined_in;
  45.     };
  46.     // The inherited describe_contents method returns an instance
  47.     // of this (RepositoryDescription) structure in the value
  48.     // member of the Description structure defined in the Container
  49.     // interface.
  50.  
  51.     enum irOpenErrorCodes {
  52.     NOACCESS, BADMAGICNUMBER, MISSINGVERSIONINFO,
  53.     IOERROR, VERSIONMISMATCH, NOWRITEACCESS,
  54.     INDEXINCONSISTENT, INDEXNOTPRESENT           /* @dcr13033 */
  55.     };
  56.  
  57.     exception irOpenError {
  58.     irOpenErrorCodes errorCode;
  59.     string fileName;
  60.     };
  61.     // The irOpenError and associated irOpenErrorCodes are a
  62.     // SOM-unique extension to the Interface Repository.  These
  63.     // errors may be raised by the somNew when instantiating the
  64.     // Repository object and can be found in the SOM global
  65.     // Environment if the returned Repository object is NULL (meaning
  66.     // no Repository object could be created). When the Repository
  67.     // object is not NULL, use the queryException method to place any
  68.     // exception info into a user-supplied Environment
  69.     // (see queryException below).
  70.  
  71.     Contained lookup_id(in RepositoryId search_id);
  72.     // Returns the object with a RepositoryId given by search_id.
  73.  
  74.     string lookup_modifier(in RepositoryId name, in string modifier);
  75.     // [SOM-unique extension]
  76.     //
  77.     // Returns the value string associated with the given SOM modifier
  78.     // for the object whose id is specified.  If the object does not
  79.     // exist or does not possess the modifier, NULL (or zero) is returned.
  80.     // If the modifier exists but does not have a value, a zero-length
  81.     // value string is returned.
  82.     //
  83.     // You must free the returned string when finished with it (using
  84.     // SOMFree).
  85.  
  86.     void release_cache();
  87.     // [SOM-unique extension]
  88.     //
  89.     // This method releases all currently unreferenced Interface Repository
  90.     // objects from the internal object cache.    This may release some storage
  91.     // at the cost of slowing down (slightly) the next few lookup operations.
  92.     // The internal cache will replenish itself (over time) with each
  93.     // subsequent lookup operation.
  94.  
  95.     boolean queryException();
  96.     // [SOM-unique extension]
  97.     //
  98.     // This method returns TRUE if an exception condition was
  99.     // raised during the creation of the Repository object, otherwise
  100.     // it returns FALSE.  When the result is TRUE, the actual
  101.     // exception info may be found in the Environment passed in to
  102.     // the queryException operation.
  103.  
  104. #ifdef __SOMIDL__
  105.   implementation {
  106.       releaseorder: lookup_id, lookup_modifier, release_cache
  107.           , reserved1, reserved2, reserved3
  108.           , queryException
  109.             ;
  110.  
  111.       //# Class Modifiers
  112.       callstyle = idl;
  113.       majorversion = 2;
  114.       minorversion = 3;
  115.       filestem = repostry;
  116.       dllname = "somir.dll";
  117.  
  118.       passthru C_h =
  119.     ""
  120.     "    #include <stdio.h>"
  121.     "    #include <somtcnst.h>"
  122.     "    #include <somir.h>"
  123.     "    #include <containd.h>"
  124.     "";
  125.       passthru C_xh =
  126.     ""
  127.     "    #include <stdio.h>"
  128.     "    #include <somtcnst.xh>"
  129.     "    #include <somir.xh>"
  130.     "    #include <containd.xh>"
  131.     "";
  132.  
  133.       //# Method Modifiers
  134.       describe_contents: override;
  135.       somFree: override;
  136.       somDumpSelf: override;
  137.       somDumpSelfInt: override;
  138.       somDefaultCopyInit: override, init;
  139.  
  140.   };
  141. #endif /* __SOMIDL__ */
  142. };
  143.  
  144.  
  145. #endif    /* repostry_idl */
  146.