/* 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_I_TS_ONE_WAY_CEVENT_SENDER_HPP
#define NMM_I_TS_ONE_WAY_CEVENT_SENDER_HPP NMM_I_TS_ONE_WAY_CEVENT_SENDER_HPP

#include "nmm/nmm_prefix.hpp"

#include "ISignalReceiver.hpp"

#include "visibility.hpp"

namespace NMM {
  
  class ITSOneWayCEventReceiver;
  
  /** One-way composite event sender transport strategy interface.
   *
   * Interface for a %TransportStrategy which sends CEvents one-way to
   * a one-way %CEvent receiver.  The %TransportStrategy also handles
   * signals from its receiver that control the flow of messages.
   */
  class DLLEXPORT ITSOneWayCEventSender 
    : virtual public ISignalReceiver
  {
  public:
    /** Default constructor.
     *
     * No receiver is set.
     */
    ITSOneWayCEventSender() throw();
    
    /** Set one-way %CEvent receiver.
     *
     * This method sets the object which receives CEvents one-way from
     * this %TransportStrategy.
     *
     * @param receiver Pointer to the one-way %CEvent receiver
     */
    void setOneWayCEventReceiver(ITSOneWayCEventReceiver* receiver);
    
    /** Get one-way %CEvent receiver.
     *
     * This method returns the object which receives CEvents one-way
     * from this %TransportStrategy.
     *
     * @return Pointer to the one-way %CEvent receiver
     */
    ITSOneWayCEventReceiver* getOneWayCEventReceiver() const;
    
  private:
    ITSOneWayCEventReceiver* __one_way_cevent_receiver; ///< Receiver.
  };
  
  
  /** Set one-way CEvent receiver.
   *
   * @param receiver pointer to ITSOneWayCEventReceiver
   */
  inline void ITSOneWayCEventSender::setOneWayCEventReceiver(ITSOneWayCEventReceiver* receiver) {
    __one_way_cevent_receiver = receiver;
  }
  
  /** Get one-way CEvent receiver.
   *
   * @return pointer to ITSOneWayCEventReceiver
   */
  inline ITSOneWayCEventReceiver* ITSOneWayCEventSender::getOneWayCEventReceiver() const {
    return __one_way_cevent_receiver;
  }
  
}

#include "nmm/nmm_suffix.hpp"

#endif
