//
//   COMPONENT_NAME: somd
//
//   ORIGINS: 27
//
//
//    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
//   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.10.1.10 src/somd/somdom.idl, somd, som3.0 9/26/96 14:02:20 [12/22/96 21:11:56]

//#  SOMDObjectMgr is a PUBLIC class derived from ObjectMgr.
//#  This class is deprecated as of DSOM 3.0.
//
//   IDL interface spec for DSOM Distributed Object Manager.
// 
//   This is a subclass of the abstract ObjectMgr class.
//   All ObjectMgr methods are implemented with DSOM calls.


#ifndef somdom_idl
#define somdom_idl

#include <om.idl>

interface SOMDServer;

interface SOMDObjectMgr : ObjectMgr
{

  // In addition to the basic ObjectMgr interface, the DSOM ObjectMgr
  // defines the following methods to find remote server objects:

  SOMDServer somdFindServer(in ImplId serverid);
  
  // Finds and returns a proxy to the Server object which is identified by the 
  // ImplId.  (ImplId is defined at server registration time, and can be 
  // obtained from the ImplDef.)
  //
  // OWNERSHIP of returned SOMDServer object is transferred to the caller.

  SOMDServer somdFindServerByName(in string servername);
  
  // Finds and returns a proxy to the Server object with the specified name.
  // (The name is defined at server registration time, and can be obtained
  // from the ImplDef.)
  //
  // OWNERSHIP of returned SOMDServer object is transferred to the caller.

  sequence<SOMDServer>  somdFindServersByClass(in Identifier objclass);
  
  // Finds all Server objects which can create an object of the named class.
  //
  // OWNERSHIP of returned SOMDServer objects is transferred to the caller.

  SOMDServer somdFindAnyServerByClass(in Identifier objclass);
  
  // Finds (any) Server object which can create an object of the named class.
  // (This is a specialization of the somdFindServerByClass method.)
  //
  // OWNERSHIP of returned SOMDServer object is transferred to the caller.

  attribute boolean somd21somFree;

#ifdef __SOMIDL__

  implementation
  {
    releaseorder: somdFindServer, somdFindServerByName, 
                  somdFindServersByClass, somdFindAnyServerByClass,
		  _get_somd21somFree, _set_somd21somFree;

    //# Class Modifiers
    callstyle = idl;
    dllname = "somd.dll";
    majorversion = 2;
    minorversion = 2;
  
    //# Method Modifiers
    somInit: override;
    somdNewObject: override;
    somdGetIdFromObject: override;
    somdGetObjectFromId: override;
    somdReleaseObject: override;
    somdDestroyObject: override;
  
    //# Passthrus
    passthru C_h_after =  ""
        "#ifndef SOM_IMPORTEXPORT_somd"
        "#if defined(_WIN32) && !defined(SOM_DLL_somd)"
        	"#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT"
        "#else"
        	"#define SOM_IMPORTEXPORT_somd"
        "#endif"
        "#endif"
      "#ifdef SOM_STRICT_IDL"
      "SOMEXTERN SOM_IMPORTEXPORT_somd SOMDObjectMgr   SOMDLINK SOMD_ObjectMgr;"
      "#else"
      "SOMEXTERN SOM_IMPORTEXPORT_somd SOMDObjectMgr *  SOMDLINK SOMD_ObjectMgr;"
      "#endif /* SOM_STRICT_IDL */"
      ""
      "#include <somdserv.h>"
      "";

    passthru C_xh_after =  ""
      "class SOMDObjectMgr;"
        "#ifndef SOM_IMPORTEXPORT_somd"
        "#if defined(_WIN32) && !defined(SOM_DLL_somd)"
        	"#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT"
        "#else"
        	"#define SOM_IMPORTEXPORT_somd"
        "#endif"
        "#endif"
      "SOMEXTERN SOM_IMPORTEXPORT_somd SOMDObjectMgr * SOMDLINK SOMD_ObjectMgr;"
      ""
      "#include <somdserv.xh>"
      "";

  };

#endif /* __SOMIDL__ */

};

#endif  /* somdom_idl */
