#ifdef __PRIVATE__
//#
//#	File:		NamRslvr.idl
//#
//#	Contains:	Class definition for ODNameResolver
//#
//#	Owned by:	Nick Pilch
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		<17>	 2/13/95	eeh		1214783: TokenIsDefault
//#		<16>	  2/8/95	NP		1218542: Removed special case shell code.
//#									Default handlers do this now.
//#		<15>	 1/27/95	NP		1213948: Add forward decls to new classes.
//#		<14>	 1/27/95	NP		1213948: Fix parameter signatures to match
//#									old semantics.
//#		<13>	 1/25/95	eeh		1195186: make GetUserToken *public*;
//#									1214783: add GetSession to private
//#									interface;
//#		<12>	 1/22/95	NP		Force rebuilding of .Åh files because
//#									change to Apple event types cause changes
//#									to some function signatures.
//#		<11>	 1/16/95	eeh		1195186: GetUserToken, SetUserToken, and
//#									IsODToken; GetContextFromToken; remove
//#									CreateToken and CreateTokenCommon;
//#		<10>	  1/9/95	NP		1194880: SemtIntf name changes.
//#		 <9>	11/15/94	NP		1191053-remove getcontextinfo.
//#		 <8>	  9/9/94	NP		1185851: implement scripting. 1184039: API
//#									changes.
//#		 <7>	  8/3/94	NP		Pass thru include file to xih and not xh.
//#		 <6>	  7/1/94	NP		Tweaks. Overwrote previous checkin.
//#		 <4>	 6/29/94	NP		Emit private stuff into xh and not xih.
//#		 <3>	 6/28/94	NP		class prefix.
//#		 <2>	 6/24/94	NP		First public checkin.
//#		 <1>	  6/8/94	RR		first checked in
//#		 <1>	  6/8/94	RR		first checked in
//#		 <1>	  6/8/94	RR		first checked in
//#		 <3>	  6/7/94	RR		Privatise change log
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1993 - 1995 by Apple Computer, Inc., all rights reserved.
#endif

#ifndef _NAMRSLVR_
#define _NAMRSLVR_

#ifndef _NAMRSLVB_
#include "NamRslvB.idl"
#endif

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

interface  ODNameResolver;

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

interface  ODPart;
interface  ODMessageInterface;
interface  ODSession;
interface  ODFrame;
interface  ODSemanticInterface;
interface  AEHashTable;
interface  ODDesc;
interface  ODOSLToken;
interface  ODObjectSpec;

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

typedef somToken OSLContext;
typedef somToken AEDesc;
#endif

//==============================================================================
// ODNameResolver
//==============================================================================

#ifdef _PLATFORM_MACINTOSH_

interface ODNameResolver :  ODBaseNameResolver
{
	void GetUserToken(in ODOSLToken token, out ODDesc desc);

	void SetUserToken(in ODOSLToken token, in ODDesc desc);

	ODBoolean IsODToken(in ODOSLToken token);
	
	void GetContextFromToken(in ODOSLToken token, out ODPart part,
			out ODFrame frame);

#ifdef __PRIVATE__

	void	InitNameResolver(in	ODSession	session);

	ODSemanticInterface	GetSemtIntf(in	ODPart	part);
	
	ODSession	GetSession();
	
	ODPart	GetPartFromToken(in	ODOSLToken	token);
	
	ODPart	GetCurrentContextPart();
	
	void	SetCurrentContextPart(in	ODPart	part);
	
//	void	SetLastContainer(in	ODDescType	container);

//	void	SetLastObject(in	ODDescType	object);

//	ODDescType	GetLastContainer();

//	ODDescType	GetLastObject();

	void		ClearLastSwapFrame();

	void		GetContextForPart(in	ODPart	part, out OSLContext blah);
	
	void		CreateContext(in	ODPart	part, out OSLContext blah);
	
	ODBoolean	TokenIsDefault( in AEDesc* token );
	
#endif


#ifdef __SOMIDL__
  implementation
	{
  		functionprefix = ODNameResolver;

	override:
		somInit,
		somUninit,
		Purge,

        Resolve,
        CreateSwapToken,
        GetContainingFrame,
        CallObjectAccessor,
        DisposeToken;
		
    releaseorder:
		GetUserToken,
		SetUserToken,
		IsODToken,
		GetContextFromToken,
	#ifdef __PRIVATE__
		GetSession,
        GetSemtIntf,
        GetPartFromToken,
        GetCurrentContextPart,
        SetCurrentContextPart,
        ClearLastSwapFrame,
		InitNameResolver,
		GetContextForPart,
		CreateContext,
		TokenIsDefault;
	#else
		reserved1,
		reserved2,
		reserved3,
		reserved4,
		reserved5,
		reserved6,
		reserved7,
		reserved8,
		reserved9,
		reserved10;
	#endif

	majorversion = 1; minorversion = 0;

    #ifdef __PRIVATE__
	passthru	C_xh	=	"
	""
	"struct OSLContext;"
	"";
	passthru	C_xih	=	"
	""
	"#include	\"CntxtOSL.h\""
	"";

	OSLContext		fRootContext;
	ODBoolean		fCurrentlyResolving;
	ODPart			fCurrentContextPart;
	ODSession		fSession;
	AEHashTable		fContextTable;
	ODFrame			fLastSwapFrame;
//	ODDescType		fLastContainer;
//	ODDescType		fLastObject;
	#endif //# __PRIVATE__

	};
#endif //# __SOMIDL__
};

#endif	//# _PLATFORM_MACINTOSH_

#endif // _NAMRSLVR_
