/* 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_ISetValueStream_HPP
#define NMM_ISetValueStream_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>


#include "visibility.hpp"

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

  class DLLEXPORT ISetValueStream : virtual public NMM::Interface { 
  public:
    ISetValueStream() : NMM::Interface(ISetValueStream::ISetValueStream_type, "NMM") { };

    ISetValueStream(NMM::NMMObject& parent) : NMM::Interface (parent, ISetValueStream::ISetValueStream_type, "NMM") { };

    virtual ~ISetValueStream() {};

    static const char* ISetValueStream_type;

    virtual  string getInterfaceType() const { return ISetValueStream_type; }

    NMM::Interface* copy() const { return new ISetValueStream(*this); }
    static void used(); 
    static const char* setOValueStreamStack_event;
    static const char* setIValueStreamStack_event;
    static const char* setOValueStream_event;
    static const char* setIValueStream_event;
    /** 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)
      throw(const NMM::SerializedException&);
    /** 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)
      throw(const NMM::SerializedException&);
    /** 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 NMM::SerializedException&, const BindingException&);
    /** 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 NMM::SerializedException&, const BindingException&);


  };

  typedef auto_ptr<ISetValueStream> ISetValueStream_var;




}

#include "nmm/nmm_suffix.hpp"

#endif
