/***************************************************************************
 *                          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 ITexturesService
 *--------------------------------------------------------------------------
 * @created: Monday, July 07, 2003 17:53:59
 */

#if !defined(ITexturesService_h_included)
#define ITexturesService_h_included
//forward declaration of this class might require
namespace services
{ class ITexturesService; };
#include <zmodeler.h>
#include <core/coreTypes.h>
#include <services/zmServices.h>
#include <services/IService.h>
#include <rend/ITextureLoader.h>
#include <rend/ITexture.h>
#include <rend/ITextureContainerLoader.h>


namespace services
{
  
  class ITexturesService : public services::IService
  {
  public:
    virtual ZRESULT addTextureLoader(rend::ITextureLoader* pLoader)=0;
    virtual ZRESULT removeTextureLoader(rend::ITextureLoader* pLoader)=0;
    virtual ZRESULT getTextureLoaders(rend::CTextureLoaderCol** ppLoaders)=0;
    virtual ZRESULT findTextureByName(ZString strName, rend::ITexture** ppTexture)=0;
    virtual ZRESULT addTextureContainer(ZString strExt, ZString strClass)=0;
    virtual ZRESULT createTextureContainer(ZString strPathName, rend::ITextureContainerLoader** ppContainer)=0;
    virtual ZRESULT addTextureGroup(rend::eTextureGroup grp, ZString strName)=0;
    virtual ZRESULT enumTextureGroups(rend::tTextureGroupSeq& seqGrp)=0;
    virtual ZRESULT getTextureGroupName(rend::eTextureGroup grp, ZString& strName)=0;
    virtual ZRESULT addTexture(rend::ITexture* pTexture)=0;
    virtual ZRESULT loadTexture(ZString strPathName, rend::ITexture** ppTexture, bool bAllowSearch=true, bool bLODTexture=true, bool bCaseSesitive=false, rend::eTextureGroup grp=rend::TG_GENERIC, LPCTSTR pszContainer=NULL, bool bAddIt=true)=0;
    virtual ZRESULT unloadTexture(rend::ITexture* pTexture)=0;
    virtual ZRESULT createBumpMap(IBaseTexture* pSrcTex, IBaseTexture** ppBumpText)=0;
    virtual ZRESULT getTextures(rend::CTextureCol** ppTextures)=0;
    virtual ZRESULT addAlternatePath(ZString strPath)=0;
    virtual ZRESULT removeAlternatePath(ZString strPath)=0;
    virtual ZRESULT getAlternatePaths(ZStringSeq& seqPaths)=0;
    /* ppSelection is in/out arg. The passed content of collection (if any)
     * is used as initial selection. On close, the content is replaced. */
    virtual ZRESULT showTexturesBrowser(bool bMultipleSel, bool bAllowManage, rend::CTextureCol** ppSelection=NULL)=0;
  
  };//class ITexturesService
};//services

#endif
