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

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

		Author:	Charles
		Date:	1/24/2005

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

#ifndef __IShRemoteComponent__
#define __IShRemoteComponent__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCCompObj.h"

class TMCNetStream;

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

MCDEFINE_GUID_H(IID_IShRemoteComponent);

/// \addtogroup BasicCOM
/// \{

// ****************************************************************************
//								IShRemoteComponent
// 
/// Remote Component interface
///
/// This interface is used for components that can be instantiated through the
/// network. These components should belong to the remote component family ('rcom').
/// This can be used to transfer data from a plugin through the network for network
/// rendering.
///
struct IShRemoteComponent : public IMCUnknown
{
	// ****************************************************************************
	//								RemoteConnection
	// 
	/// Called by the shell with a an established network connection.
	/// 
	/// \param stream  
	/// 
	virtual void MCCOMAPI RemoteConnection(TMCNetStream& stream) = 0;
};

// ****************************************************************************
//								IShNetworkComponent
// 
/// This interface is the pendant of IShRemoteComponent. It is used on the rendering
/// node to access a remotve component in the main application through the network.
///
/// Call I3DShUtilities::CreateNetworkComponent() to create one.
///
struct IShNetworkComponent : public IMCUnknown
{
	// ****************************************************************************
	//								GetNetworkStream
	// 
	/// Returns a stream with an established connection with the main application.
	/// 
	virtual TMCNetStream& MCCOMAPI GetNetworkStream() = 0;
};

/// \}

#endif
