/* Network-Integrated Multimedia Middleware (NMM)
 * http://www.motama.com/nmm.html
 *
 * Copyright (C) 2006-2007
 * Motama GmbH, Saarbruecken, Germany
 * http://www.motama.com
 *
 * This file is part of NMM. 
 * 
 * NMM is free software; you can redistribute it and/or modify it    
 * under the terms of the GNU General Public License as published by 
 * the Free Software Foundation; only version 2 of the License.      
 * 
 * NMM is distributed in the hope that it will be useful, but WITHOUT 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 
 * License for more details.  
 * 
 * You should have received a copy of the GNU General Public License 
 * along with NMM; if not, write to the Free Software Foundation,    
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */

#ifndef NMM_IXMLTVPluginImpl_HPP
#define NMM_IXMLTVPluginImpl_HPP

#include "nmm/nmm_prefix.hpp"

#include "nmm/comm/NMMObject.hpp"
#include "IXMLTVPlugin.hpp"


#include "visibility.hpp"

namespace NMM
{
  /**
   * Interface to set parameters of XMLTVPlugin
   */

  class DLLEXPORT IXMLTVPluginImpl  : public virtual NMM::NMMObject { 
  public:
    IXMLTVPluginImpl() { addInterface(new IXMLTVPlugin(*this)); registerEvents(); };

    virtual ~IXMLTVPluginImpl() {};

  protected:
    /**
     * Set the path and file where XMLTV stores its downloaded data
     *@param file filename of datafile
     */

    virtual void setFilename(const string& file) = 0;
    /**
     * get the filename of the temp datafile
     *@return path + datafile
     */

    virtual string getFilename() = 0;
    /**
     * Set the patch and name of the temporary config-file, where the plugin stores its current position in update
     *@param filepath and filename of configfile
     */

    virtual void setConfigFile(const string& file) = 0;
    /**
     * get the path and name of the confgifile
     *@return path and name of the confgifile
     */

    virtual string getConfigFile() = 0;
    /**
     * Select the XMLTV-Tool by setting the country-information
     *@param loc abreviation or complete tool-name of XMLTV-Tools
     */

    virtual Result setLocale(const string& loc) = 0;
    /**
     * get the currently used Locale-information
     *@return locale
     */

    virtual string getLocale() = 0;
    /**
     * set the period when a new update will start
     *@param period in form d|h|m <number>
     */

    virtual void setPeriod(const string& p) = 0;
    /**
     * get the configured period
     *@return period
     */

    virtual string getPeriod() = 0;
    /**
     * if the argument is set to true, the grabber will try to get data from the past.
     * if it is possible or not depends on the grabber used
     *@param nmm_bool if true, the plugins tries to grab data from the past
     */

    virtual void setFillHolesInDB(const nmm_bool& b) = 0;
    /**
     * 
     *@return true try to grab data from past
     *@return false only grab data from 'now' on
     */

    virtual nmm_bool getFillHolesInDB() = 0;


  private:
    void registerEvents();
  };

}

#include "nmm/nmm_suffix.hpp"

#endif
