#ifndef _MexternalContentInfoTable
#define _MexternalContentInfoTable
//-
// ==========================================================================
// Copyright (C) 2012 Autodesk, Inc., and/or its licensors.  All
// rights reserved.
//
// The coded instructions, statements, computer programs, and/or related
// material (collectively the "Data") in these files contain unpublished
// information proprietary to Autodesk, Inc. ("Autodesk") and/or its
// licensors,  which is protected by U.S. and Canadian federal copyright law
// and by international treaties.
//
// The Data may not be disclosed or distributed to third parties or be
// copied or duplicated, in whole or in part, without the prior written
// consent of Autodesk.
//
// The copyright notices in the Software and this entire statement,
// including the above license grant, this restriction and the following
// disclaimer, must be included in all copies of the Software, in whole
// or in part, and all derivative works of the Software, unless such copies
// or derivative works are solely in the form of machine-executable object
// code generated by a source language processor.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
// AUTODESK DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED
// WARRANTIES INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF
// NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
// OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE. IN NO
// EVENT WILL AUTODESK AND/OR ITS LICENSORS BE LIABLE FOR ANY LOST
// REVENUES, DATA, OR PROFITS, OR SPECIAL, DIRECT, INDIRECT, OR
// CONSEQUENTIAL DAMAGES, EVEN IF AUTODESK AND/OR ITS LICENSORS HAS
// BEEN ADVISED OF THE POSSIBILITY OR PROBABILITY OF SUCH DAMAGES.
// ==========================================================================

#if defined __cplusplus

// ****************************************************************************
// INCLUDED HEADER FILES

#include <maya/MStringArray.h>
#include <maya/MTypes.h>

// ****************************************************************************
// FORWARD DECLARATIONS

class MString;
class MStatus;

// ****************************************************************************
// CLASS DECLARATION (MExternalContentInfoTable)

//! \ingroup OpenMaya
/*! \brief This is a table of all the external content for a given MPxNode.

	External content is defined as any data that is not stored with the node
	and that is needed by the node to perform its work.  It can be texture
    files, other scenes, audio files, etc.  

	Each node that references external content should report it through 
	MPxNode::getExternalContent so that a complete list of external content can
	be saved with the scene in a way that makes it easy to inspect and edit 
	offline.
*/
class OPENMAYA_EXPORT MExternalContentInfoTable
{
public:
	MExternalContentInfoTable();
	~MExternalContentInfoTable();
	
	// obsolete, use the one with contextNodeFullName param
	MStatus addResolvedEntry(
		const MString&		key,
		const MString& 		unresolvedLocation,
		const MString& 		resolvedLocation,
		const MStringArray& roles
	);
	MStatus addResolvedEntry(
		const MString&		key,
		const MString& 		unresolvedLocation,
		const MString& 		resolvedLocation,
		const MString&      contextNodeFullName,
		const MStringArray& roles
	);
	// obsolete, use the one with contextNodeFullName param
	MStatus addUnresolvedEntry(
		const MString&				  key,
		const MString&                unresolvedLocation,
		const MStringArray& roles =   MStringArray()
	);
	MStatus addUnresolvedEntry(
		const MString&				  key,
		const MString&                unresolvedLocation,
		const MString&				  contextNodeFullName,
		const MStringArray& roles =   MStringArray()
	);
	
BEGIN_NO_SCRIPT_SUPPORT:
	//! obsolete, use the one with contextNodeFullName param
	//!	NO SCRIPT SUPPORT
	MStatus getInfo(
		const MString&		key,
		MString& 			unresolvedLocation,
		MString& 			resolvedLocation,
		MStringArray& 		roles
	) const;
	//!	NO SCRIPT SUPPORT
	MStatus getInfo(
		const MString&		key,
		MString& 			unresolvedLocation,
		MString& 			resolvedLocation,
		MString&			contextNodeFullName,
		MStringArray& 		roles
	) const;
	//! obsolete, use the one with contextNodeFullName param
	//!	NO SCRIPT SUPPORT
	MStatus getEntry(
		unsigned int		index,
		MString&	   		key,
		MString& 			unresolvedLocation,
		MString& 			resolvedLocation,
		MStringArray& 		roles
	) const;
	//!	NO SCRIPT SUPPORT
	MStatus getEntry(
		unsigned int		index,
		MString&	   		key,
		MString& 			unresolvedLocation,
		MString& 			resolvedLocation,
		MString&			contextNodeFullName,
		MStringArray& 		roles
	) const;
END_NO_SCRIPT_SUPPORT:
	unsigned int length() const;
	
private:
	friend struct THdependNodeTemplateUtil;	
	friend class MPxNode;
	friend class MFnDependencyNode;
	
	void* getData() const;
	void resetCache();
	MExternalContentInfoTable( const MExternalContentInfoTable& );
	MExternalContentInfoTable& operator=( const MExternalContentInfoTable& );
	MExternalContentInfoTable( void* data );

	void* api_data;
};

#endif /* __cplusplus */
#endif /* _MexternalContentInfoTable */
