/* 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_ITimeProgress_HPP
#define NMM_ITimeProgress_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/utils/time/Interval.hpp"

#include "visibility.hpp"

namespace NMM
{
  /** A time Progress sender.
   *
   * A node implementing this interface sends time progress information,
   * e.g. to inform the application about the current playback time
   * of an media file.
   */

  class DLLEXPORT ITimeProgress : virtual public NMM::Interface { 
  public:
    ITimeProgress() : NMM::Interface(ITimeProgress::ITimeProgress_type, "NMM") { };

    ITimeProgress(NMM::NMMObject& parent) : NMM::Interface (parent, ITimeProgress::ITimeProgress_type, "NMM") { };

    virtual ~ITimeProgress() {};

    static const char* ITimeProgress_type;

    virtual  string getInterfaceType() const { return ITimeProgress_type; }

    NMM::Interface* copy() const { return new ITimeProgress(*this); }
    static void used(); 
    static const char* setProgressUpdateInterval_event;
    static const char* setProgressUpdateEnabled_event;
    /** Sets the update interval.
     *
     * This method sets the time interval after which progress events are sent.
     * The default interval is 1 second.
     *
     * @param update_interval The update time interval
     */

    virtual void setProgressUpdateInterval(const Interval& update_interval)
      throw(const NMM::SerializedException&);
    /** Enable or disable progress updates.
     *
     * This method enables or disables sending of progress information.
     *
     * @param enable_update @c true to enable or @c false to disable progress updates
     */

    virtual void setProgressUpdateEnabled(const nmm_bool& enable_update)
      throw(const NMM::SerializedException&);


  };

  typedef auto_ptr<ITimeProgress> ITimeProgress_var;




}

#include "nmm/nmm_suffix.hpp"

#endif
