/* 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_ITimeProgressImpl_HPP
#define NMM_ITimeProgressImpl_HPP

#include "nmm/nmm_prefix.hpp"

#include "nmm/comm/NMMObject.hpp"
#include "ITimeProgress.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 ITimeProgressImpl  : public virtual NMM::NMMObject { 
  public:
    ITimeProgressImpl() { addInterface(new ITimeProgress(*this)); registerEvents(); };

    virtual ~ITimeProgressImpl() {};

  protected:
    /** 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) = 0;
    /** 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) = 0;


  private:
    void registerEvents();
  };

}

#include "nmm/nmm_suffix.hpp"

#endif
