/***************************************************************************
 *                          Zanoza Modeler v2.x                            *
 *      This is unpublished propietary source code of Zanoza Software.     *
 *      The copyright notice does not evidence any actual or intended      *
 *                    publication of such source code.                     *
 *                                                                         *
 *                Copyright (c) 2002-2008 Zanoza Software.                 *
 *                                                                         *
 *                        All rights reserved.                             *
 ***************************************************************************
 *--------------------------------------------------------------------------
 * @author:   Oleg Melashenko
 *--------------------------------------------------------------------------
 * @purpose:  Declaration of the class IImportExportFilter
 *   Import/Export filter
 *--------------------------------------------------------------------------
 * @created: Friday, April 09, 2004 11:50:08
 */

#if !defined(IImportExportFilter_h_included)
#define IImportExportFilter_h_included
//forward declaration of this class might require
namespace core
{ namespace io
  { class IImportExportFilter; class CImportExportFilterCol; }; };
#include <zmodeler.h>
#include <core/io/zmIOTypes.h>
#include <core/io/IStream.h>
#include <core/layout/IChildDialog.h>
#include <core/IProcParams.h>


namespace core
{
  namespace io
  {
    #define ZM_FILTER_SUPPORT_IMPORT     0x00000001
    #define ZM_FILTER_SUPPORT_EXPORT     0x00000002
    #define ZM_FILTER_SUPPORT_THUMBNAIL  0x00000004
    #define ZM_FILTER_SUPPORT_PROTECTION 0x00000008
    
    #define ZM_FILTER_SUPPORT_ANIMATION  0x00000010
    #define ZM_FILTER_SUPPORT_SKELETON   0x00000020
    class IImportExportFilter : public ZUnknown
    {
    public:
      virtual ZRESULT getExtensions(ZStringSeq& seqExt)=0;
      virtual ZRESULT getExtensionSupport(LPCTSTR pszExt, DWORD& dwSupport)=0;
      virtual ZRESULT setCurrentStream(core::io::IStream* pStream, LPCTSTR pszFileName=NULL, LPCTSTR pszPath=NULL)=0;
      /* Allows filter to read file info from current stream */
      virtual ZRESULT readFileInfo(bool& bCanImport, tBYTESeq& seqThumbnailData)=0;
      virtual ZRESULT getExportDialog(core::layout::IChildDialog** ppDlg)=0;
      virtual ZRESULT getImportDialog(core::layout::IChildDialog** ppDlg)=0;
      /* Performs export to current stream (see setCurrentStream) */
      virtual ZRESULT exportCurrentStream(core::IProcParams* pParams)=0;
      /* Performs import on current stream (see setCurrentStream) */
      virtual ZRESULT importCurrentStream(core::IProcParams* pParams)=0;
    
    };//class IImportExportFilter
    
    //
    // collection template
    //
    class CImportExportFilterCol : public ZUnknown,
        public ZIntrCollection<IImportExportFilter>
    {
    public:
      INTERFACE_FUNCTIONS_DEFAULT(CImportExportFilterCol)
    };//class CImportExportFilterCol
  };//io
};//core

#endif
