#ifdef __PRIVATE__
//#
//#	File:		NamSpac.idl
//#
//#	Contains:	Interface for ODNameSpace class
//#
//#	Owned by:	Nick Pilch, Caia Grisar
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		 <2>	 8/24/94	CG		#1181622: Updated file ownership.
//#		 <1>	 7/29/94	CG		first checked in
//#		 <3>	 6/24/94	CG		Added functionprefix.
//#		 <2>	 6/14/94	CG		Removed fHeap and GetHeap().
//#		 <1>	  6/8/94	CG		first checked in
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1993-1994 by Apple Computer, Inc., all rights reserved.
#endif

#ifndef _NAMSPAC_
#define _NAMSPAC_

#ifndef _ODOBJECT_
#include "ODObject.idl"
#endif

//==============================================================================
// Scalar Types
//==============================================================================

//==============================================================================
// Classes defined in this interface
//==============================================================================

interface  ODNameSpace;

//==============================================================================
// Classes used by this interface
//==============================================================================

interface  ODNameSpaceManager;
interface  ODSession;
interface  ODStorageUnitView;
interface  PlatformFile;

#ifdef __PRIVATE__
//=====================================================================================
// Implementation Types
//=====================================================================================

typedef somToken StringHashTable;
#endif

//==============================================================================
// ODNameSpace
//==============================================================================

interface ODNameSpace :  ODObject
{
   ODISOStr GetName();

   ODNSTypeSpec GetType();
   
   ODNameSpace GetParent();
   
   void SetType( in ODNSTypeSpec type );

   void Unregister(in ODISOStr key);

   ODBoolean Exists(in ODISOStr key);
   
   void WriteToFile(in PlatformFile file);

   void ReadFromFile(in PlatformFile file);

   void WriteToStorage(in ODStorageUnitView view);

   void ReadFromStorage(in ODStorageUnitView view);

#ifdef __PRIVATE__
  void InitNameSpace(in ODNameSpaceManager mgr,
  					 in ODNameSpace parent,
					 in ODULong numExpectedEntries,
					 in ODISOStr name);
  

  StringHashTable* GetHashTable();

  ODULong		GetNumEntries();
  void NotifyDying(in ODNameSpace space);
#endif 
  
#ifdef __SOMIDL__
	implementation
  	{
	functionprefix = ODNameSpace;
	override:
    	somInit,
    	somUninit,

        Purge;

    releaseorder:
        GetName,
		GetType,
		GetParent,
		SetType,
        Unregister,
        Exists,
        WriteToFile,
        ReadFromFile,
        WriteToStorage,
        ReadFromStorage,
	#ifdef __PRIVATE__
		InitNameSpace,
		GetHashTable,
		GetNumEntries,
		NotifyDying;
	#else
		reserved1,
		reserved2,
		reserved3,
		reserved4;
	#endif

	majorversion = 1; minorversion = 0;
	
    #ifdef __PRIVATE__
      StringHashTable*   	fStringHashTable;
      ODNameSpaceManager 	fNameSpaceManager;
      ODNameSpace       	fParent;
      ODULong        		fNumInitialEntries;
      ODISOStr			  	fName;
      ODNSTypeSpec			fType;

	  passthru C_xh = "
	  	""
	  	"class StringHashTable;"
		"";

	  passthru C_xih = "
	  	""
	  	"class StringHashTable;"
		"";
    #endif
  };
#endif
};

#endif //# _NAMSPAC_
