/* 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_ISetValueStreamImpl_HPP
#define NMM_ISetValueStreamImpl_HPP

#include "nmm/nmm_prefix.hpp"

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


#include "visibility.hpp"

namespace NMM
{
  /** Interface for setting the value streams of a transport strategy.
   */

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

    virtual ~ISetValueStreamImpl() {};

  protected:
    /** Sets the input value stream stack.
     *
     * Set the %ValueStream that should be used for serializing
     * outgoing data.
     *
     * This method should be used for setting the complete value
     * stream stack, including all configuration parameters of all
     * stream objects.
     *
     * @param value_stream The value stream object
     */

    virtual void setOValueStreamStack(const OValueStream* value_stream) = 0;
    /** Sets the output value stream stack.
     *
     * Set the %ValueStream that should be used for deserializing
     * incoming data.
     *
     * This method should be used for setting the complete value
     * stream stack, including all configuration parameters of all
     * stream objects.
     *
     * @param value_stream The value stream object
     */

    virtual void setIValueStreamStack(const IValueStream* value_stream) = 0;
    /** Sets the output value stream by type.
     *
     * Set the %ValueStream that should be used for serializing
     * outgoing data.
     *
     * This method only sets the top-level value stream, which is
     * created by the factory from the value stream type.
     *
     * @param value_stream_type Type name of the %ValueStream
     * @exception BindingException if a %ValueStream of the specified type isn't available
     */

    virtual void setOValueStream(const string& value_stream_type) 
      throw(const BindingException&) = 0;
    /** Sets the input value stream by type.
     *
     * Set the %ValueStream that should be used for deserializing
     * incoming data.
     *
     * This method only sets the top-level value stream, which is
     * created by the factory from the value stream type.
     *
     * @param value_stream_type Type name of the %ValueStream
     * @exception BindingException if a %ValueStream of the specified type isn't available
     */

    virtual void setIValueStream(const string& value_stream_type) 
      throw(const BindingException&) = 0;


  private:
    void registerEvents();
  };

}

#include "nmm/nmm_suffix.hpp"

#endif
