//
//   COMPONENT_NAME: somi
//
//   ORIGINS: 27
//
//
//   10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
//   All Rights Reserved
//   Licensed Materials - Property of IBM
//   US Government Users Restricted Rights - Use, duplication or
//   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
//
//#  @(#) 2.12 src/somi/ir/somir/repostry.idl, somi, som2.1, somwarp_ga 9/1/94 18:24:26 [9/21/94 17:47:51]
//  Repository: CORBA Interface for access to repository objects
//  See CORBA 7.5.2, pp.132-133
#ifndef repostry_idl
#define repostry_idl
#include <containr.idl>
#include <somcls.idl>
#define RepositoryId string
#define InterfaceName string
// CORBA 7.5.2, p.133
//
// The Repository interface provides global access to the SOM
// CORBA-compliant Interface Repository (IR).  To obtain an object
// reference to an instance of Repository, use the RepositoryNew
// function.
//
interface Repository : Container
{
    struct RepositoryDescription {
	Identifier   name;
	RepositoryId id;
	RepositoryId defined_in;
    };
    // The inherited describe_contents method returns an instance
    // of this (RepositoryDescription) structure in the value
    // member of the Description structure defined in the Container
    // interface.
    enum irOpenErrorCodes {
        NOACCESS, BADMAGICNUMBER, MISSINGVERSIONINFO, 
	IOERROR, VERSIONMISMATCH
    };	
    exception irOpenError {
	irOpenErrorCodes errorCode;
	string fileName;
    };
    // The irOpenError and associated irOpenErrorCodes are a
    // SOM-unique extension to the Interface Repository.  These
    // errors may be raised by the somNew when instantiating the
    // Repository object and can be found in the SOM global
    // Environment.
    Contained lookup_id(in RepositoryId search_id);
    // Returns the object with a RepositoryId given by search_id.
    string lookup_modifier(in RepositoryId name, in string modifier);
    // [SOM-unique extension]
    //
    // Returns the value string associated with the given SOM modifier
    // for the object whose id is specified.  If the object does not 
    // exist or does not possess the modifier, NULL (or zero) is returned.  
    // If the modifier exists but does not have a value, a zero-length
    // value string is returned.
    //
    // You must free the returned string when finished with it (using
    // SOMFree).
    void release_cache();
    // [SOM-unique extension]
    //
    // This method releases all currently unreferenced Interface Repository
    // objects from the internal object cache.  This may release some storage
    // at the cost of slowing down (slightly) the next few lookup operations.
    // The internal cache will replenish itself (over time) with each
    // subsequent lookup operation.
#ifdef __SOMIDL__
  implementation {
      releaseorder: lookup_id, lookup_modifier, release_cache
		    ;
      //# Class Modifiers
      callstyle = idl;
      majorversion = 2;
      minorversion = 1;
      filestem = repostry;
      dllname = "somir.dll";
      passthru C_h =
	""
	"    #include <stdio.h>"
	"    #include <somtcnst.h>"
	"    #include <somir.h>"
	"    #include <containd.h>"
	"";
      passthru C_xh =
	""
	"    #include <stdio.h>"
	"    #include <somtcnst.xh>"
	"    #include <somir.xh>"
	"    #include <containd.xh>"
	"";
      //# Method Modifiers
      describe_contents: override;
      somFree: override;
      somDumpSelf: override;
      somDumpSelfInt: override;
  };
#endif /* __SOMIDL__ */
};
#endif	/* repostry_idl */










































































































