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

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

		Author:	charles
		Date:	9/21/2005

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

#ifndef __I2DShImportExportMananger__
#define __I2DShImportExportMananger__

#if CP_PRAGMA_ONCE
#pragma once
#endif

struct ImageExportCapabilities;
struct I2DShExportFilter;
struct I2DShImportFilter;
struct TPSOptions;

// ****************************************************************************
//								I2DShImportExportMananger
// 
/// API to access the Image import/export manager in the application. 
///
/// 
struct I2DShImportExportMananger
{
	// ****************************************************************************
	//								GetExportCapabilities
	// 
	/// Returns the export capabilities for a given file format (DEPRECATED).
	/// 
	/// \param format          The ID of the file format.
	/// \param capabitilities  The buffers that this format can save.
	/// 
	/// \return True if the format is supported.
	///
	virtual boolean MCCOMAPI GetExportCapabilities(IDType format,ImageExportCapabilities& capabitilities) = 0;

	// ****************************************************************************
	//								GetFileTypeListForSave
	// 
	/// Returns the list of the image file types that are supported by the application.
	/// 
	/// \param typeList					The list of image file types that is returned.
	/// \param onlyReadableFormats		True if the only formats we want are the ones we can also read
	/// 
	virtual void MCCOMAPI GetFileTypeListForSave(TMCFileTypeList& typeList,boolean onlyReadableFormats) = 0;
	
	// ****************************************************************************
	//								GetFileTypeListForOpen
	// 
	/// Returns the list of the image file types that are supported by the application.
	/// 
	/// \param typeList  The list of image file types that is returned.
	/// 
	virtual void MCCOMAPI GetFileTypeListForOpen(TMCFileTypeList& typeList) = 0;

	// ****************************************************************************
	//								GetImporter
	// 
	/// Returns the import plugin that can import a given image format.
	/// 
	/// \param imageImporter  The importer that is returned (NULL if no importer is found)
	/// \param format         The id of the file format.
	/// 
	virtual void GetImporter(I2DShImportFilter** imageImporter,MCFileTypeID format) = 0;
	
	// ****************************************************************************
	//								GetExporter
	// 
	/// Returns the export plugin that can export a given image format.
	/// 
	/// \param imageExporter  The exporter that is returned (NULL if no importer is found)
	/// \param format         The id of the file format.
	/// 
	virtual void GetExporter(I2DShExportFilter** imageExporter,MCFileTypeID format) = 0;

	// ****************************************************************************
	//								GetExportCapabilities
	// 
	/// Returns the export capabilities for a given file format.
	/// 
	/// \param format          The ID of the file format.
	/// \param capabitilities  The buffers that this format can save.
	/// \param psPluginOptions The plugin options.
	/// 
	/// \return True if the format is supported.
	///
	virtual boolean MCCOMAPI GetExportCapabilities(IDType format, ImageExportCapabilities& capabitilities, const TPSOptions* psPluginOptions) = 0;
};



#endif
