/* 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_IProgressImpl_HPP
#define NMM_IProgressImpl_HPP

#include "nmm/nmm_prefix.hpp"

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


#include "visibility.hpp"

namespace NMM
{
  /** Interface for handling progress information.
   *
   *  A progress sender is a node which, if enabled, sends progress
   *  events downstream.  An IProgressListener interface can be
   *  implemented in order to handle these events, or used for
   *  listener notification within the application.
   */

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

    virtual ~IProgressImpl() {};

  protected:
    /** Enables or disables sending of progress information.
     *
     *  This method enables or disables sending of progress
     *  information. If enabled, this node will send progress events
     *  (IProgressListener::setProgress) at regular intervals, defined
     *  by the node.
     *
     *  @param value true, if sending of progress information is enabled; false otherwise
     */

    virtual void sendProgressInformation(const nmm_bool& value) = 0;
    /** Sets the interval for sending setProgress events.
     *
     * This method changes the interval in which setProgress events are to be sent.
     *  
     * @param buffers The number of buffers after which a setProgress event should be sent
     */

    virtual void setProgressInterval(const nmm_int32& buffers) = 0;


  private:
    void registerEvents();
  };

}

#include "nmm/nmm_suffix.hpp"

#endif
