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

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

		Author:	Pierre-Sylvain
		Date:	7/7/2006

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

#ifndef __I3DExClip__
#define __I3DExClip__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "ComTypes.h"
#include "TransformsFwd.h"
#include "AttributePath.h"


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

MCDEFINE_GUID_H(IID_I3DExClip);


struct I3DShParamInfo;
struct I3DShParamTimeLine;
struct I3DShTimeBasedData;
struct I3DShAttributesSet;
class  TParamHolder;
class  TMCOffscreen;

/// \addtogroup ExternalInterface
/// \{

// ****************************************************************************
//								I3DExClip
// 
/// <P>There are two interfaces to access a component: The shell interface (I3DShClip) and
/// the external interface (I3DExClip). You can get one from the other using QueryInterface.</P>
///
/// \see I3DShClip
///
struct I3DExClip : public IMCUnknown
{
	// ****************************************************************************
	//								GetDuration
	// 
	/// Returns the duration of the clip in micro tick.
	/// 
	virtual MicroTick			MCCOMAPI GetDuration() = 0;

	// ****************************************************************************
	//								GetAttributesCount
	// 
	/// Returns the number of attributes stored in this clip.
	/// 
	virtual int32				MCCOMAPI GetAttributesCount() = 0;

	// ****************************************************************************
	//								GetAttribute
	// 
	/// Returns an attribute of this clip.
	///
	/// \param attributeSet		Attributes set to be used.
	/// \param index			Index of the parameter in this clip.
	/// \param lastParam		The last valid param that 
	/// 
	virtual I3DShParamInfo*		MCCOMAPI GetAttribute(I3DShAttributesSet* attributeSet, int32 index, I3DShParamInfo* lastParam) = 0;

	// ****************************************************************************
	//								GetAttributeType
	// 
	/// Get the type of a specified attribute.
	///
	/// \param paramIndex		The index of the attribute in the clip.				
	///
	virtual IDType				MCCOMAPI GetAttributeType(int32 paramIndex) = 0;

	// ****************************************************************************
	//								GetAttributeValue
	// 
	/// Get the value of one of the attribute.
	///
	/// \param paramIndex		The index of the attribute in the clip.
	/// \param outValue			Returned value.
	///
	virtual void				MCCOMAPI GetAttributeValue(int32 paramIndex, TParamHolder& outValue) = 0;

	// ****************************************************************************
	//								GetLoopOffset
	// 
	/// Get the transform offset that need to be added to the attributes set transform
	/// in the case of tree attributes set.
	///
	/// \param outOffset		The offset.
	/// 
	virtual MCCOMErr			MCCOMAPI GetLoopOffset(TTransform3D& outOffset) = 0;

	// ****************************************************************************
	//								GetAttributeTimeLineData
	// 
	/// Copy the param time line data into the given dstTimeLine.
	///
	/// \param paramIndex		The index of the attribute in the clip.
	/// \param dstTimeLine		The time line.
	///
	virtual void				MCCOMAPI GetAttributeTimeLineData(int32 paramIndex, I3DShParamTimeLine* dstTimeLine) = 0;

	// ****************************************************************************
	//								GetClipIcon
	// 
	/// Returns the image to be used as the icon for the clip.
	///
	/// \param outOffscreen		The offscreen to fill.
	///
	virtual void				MCCOMAPI GetClipIcon(TMCOffscreen* outOffscreen) = 0;

	// ****************************************************************************
	//								GetAttributePath
	// 
	/// Returns the attribute path for specified attribute
	///
	/// \param paramIndex		Index of a parameter.
	/// \param attributesSet		Attributes set (needed only for converting path to the new version).
	///
	virtual const TAttributePath&	MCCOMAPI GetAttributePath(int32 paramIndex, I3DShAttributesSet * attributesSet) = 0;
};

/// \}


#endif
