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