/* 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_INxtvepgPlugin_HPP
#define NMM_INxtvepgPlugin_HPP

#include "nmm/nmm_prefix.hpp"

#include "nmm/comm/Interface.hpp"
#include "nmm/comm/messaging/Event.hpp"
#include "nmm/comm/messaging/IllegalStateException.hpp"
#include <memory>

/* Network-Integrated Multimedia Middleware (NMM)
 * http://www.motama.com/nmm.html
 *
 * Copyright (C) 2006-2007
 * Motama GmbH, Saarbruecken, Germany
 * http://www.motama.com
 *
 * See file LICENCE for terms and conditions of usage
 *
 */

#include "nmm/comm/serialize/StdValue.hpp"

#include "visibility.hpp"

namespace NMM
{
  /**
   * Interface to set parameters for NxtvepgPlugin
   */

  class DLLEXPORT INxtvepgPlugin : virtual public NMM::Interface { 
  public:
    INxtvepgPlugin() : NMM::Interface(INxtvepgPlugin::INxtvepgPlugin_type, "NMM") { };

    INxtvepgPlugin(NMM::NMMObject& parent) : NMM::Interface (parent, INxtvepgPlugin::INxtvepgPlugin_type, "NMM") { };

    virtual ~INxtvepgPlugin() {};

    static const char* INxtvepgPlugin_type;

    virtual  string getInterfaceType() const { return INxtvepgPlugin_type; }

    NMM::Interface* copy() const { return new INxtvepgPlugin(*this); }
    static void used(); 
    static const char* setLocation_event;
    static const char* setPort_event;
    static const char* addProvider_event;
    static const char* getProvider_event;
    static const char* setConfigFile_event;
    static const char* getConfigFile_event;
    static const char* setDBDir_event;
    static const char* getDBDir_event;
    static const char* setLocale_event;
    static const char* getLocale_event;
    static const char* setPeriod_event;
    static const char* getPeriod_event;
    static const char* setUseTv_split_event;
    static const char* getUseTv_split_event;
    /**
     * sets the remote host where the nxtvepg-daemon if different from localhost
     *@param loc location of nxtvepg-daemon
     */

    virtual void setLocation(const string& loc)
      throw(const NMM::SerializedException&);
    /**
    * sets the remote port where the nxtvepg-daemon if different from localhost
    *@param nmm_int32 port
    */

    virtual void setPort(const nmm_int32& p)
      throw(const NMM::SerializedException&);
    /**
     * adding a provider-string for XML-Dump
     */

    virtual void addProvider(const string& p)
      throw(const NMM::SerializedException&);
    /**
     * returns the providers for XMLDump, that are selected
     */

    virtual list<string >  getProvider()
      throw(const NMM::SerializedException&);
    /**
     * sets the path and name of the plugin-Configuration-File
     */

    virtual void setConfigFile(const string& file)
      throw(const NMM::SerializedException&);
    /**
     *returns the path and name of Configuraaiton-File used
     */

    virtual string getConfigFile()
      throw(const NMM::SerializedException&);
    /**
     * seting database-directory for nxtvepg-tool
     */

    virtual void setDBDir(const string& db)
      throw(const NMM::SerializedException&);
    /**
     * get database-directory
     */

    virtual string getDBDir()
      throw(const NMM::SerializedException&);
    /**
     * if the file contains data for differnet countris, specify, wich data should be evaluated
     *@param abreviation for locale, eg de for germany
     */

    virtual void setLocale(const string& l)
      throw(const NMM::SerializedException&);
    /**
     * get the locale-string set
     *@return localstring
     */

    virtual string getLocale()
      throw(const NMM::SerializedException&);
    /**
     * set the interval when a new grabb-command should be issued. The syntax of the string must be XY, where X=d|m|s Y=0-...
     * X=d means daily, the number specifies, after what amount of days the command should be re-launched
     *@param period
     */

    virtual void setPeriod(const string& p)
      throw(const NMM::SerializedException&);
    /**
     * get the period set
     *@return period
     */

    virtual string getPeriod()
      throw(const NMM::SerializedException&);
    /**
     * enbale/disable the use of tv_split, wich is contains in xmltv-tools-distribution
     */

    virtual void setUseTv_split(const nmm_bool& b)
      throw(const NMM::SerializedException&);

    virtual nmm_bool getUseTv_split()
      throw(const NMM::SerializedException&);


  };

  typedef auto_ptr<INxtvepgPlugin> INxtvepgPlugin_var;




}

#include "nmm/nmm_suffix.hpp"

#endif
