/****************************************************************************************************

		I3DExRemoteCommand.h
		Copyright: (c) 2001 Eovia Corp. All rights reserved.

		Author:	Charles
		Date:	11/17/2003

****************************************************************************************************/

#ifndef __I3DExRemoteCommand__
#define __I3DExRemoteCommand__

#if CP_PRAGMA_ONCE
#pragma once
#endif


#include "InterfaceIDs.h"

//****** Globally Unique Ids *************************************************

MCDEFINE_GUID_H(IID_I3DExRemoteCommand);

/// \addtogroup ExternalInterface
/// \{

// ****************************************************************************
//								I3DExRemoteCommand
// 
/// This interface can be used to perform an action associated with a scene
/// command but implemented in a different dll
///
/// <P>One reason to use it is that dlls containing scene commands are always
/// loaded into memory when a document is opened. To avoid loading a big dll
/// when you do not need it, you can implement the action performed by the
/// scene command in another dll that will be loaded when the scene command
/// instantiate the object actually implementing the action of the scene command.</P>
///
struct I3DExRemoteCommand : public IMCUnknown
{
	// ****************************************************************************
	//								Init
	// 
	/// Called when the scene command is activated.
	///
	/// Use sceneDocument to get the selection or any other Scene data you would need
	/// to perform your action
	///
	/// \param sceneDocument	The current scene document.
	/// \param privateData		A pointer to the scene command
	///
	virtual void MCCOMAPI Init(ISceneDocument* sceneDocument,void* privateData) = 0;

	// ****************************************************************************
	//								Do
	// 
	/// Performs the action associated with the scene command the first time the scene
	/// command is called.
	///
	/// \return Returns true if your actually changed something in the Scene
	///
	virtual boolean  MCCOMAPI Do() = 0;

	// ****************************************************************************
	//								Undo
	// 
	/// Undo the action performed by Do or Redo.
	///
	/// \return Returns true if your actually changed something in the Scene
	///
	virtual boolean  MCCOMAPI Undo() = 0;

	// ****************************************************************************
	//						Redo		
	// 
	/// Performs the action associated with the scene command when redo is called
	///
	/// \return True if your actually changed something in the Scene
	///
	virtual boolean  MCCOMAPI Redo() = 0;
};

/// \}


#endif
