/* 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_EVENT_SENDER_HPP
#define NMM_I_TS_ONE_WAY_EVENT_SENDER_HPP NMM_I_TS_ONE_WAY_EVENT_SENDER_HPP

#include "nmm/nmm_prefix.hpp"

#include "visibility.hpp"

namespace NMM {
  
  class ITSOneWayEventReceiver;
  
  /** One-way event sender transport strategy interface.
   *
   * Interface for a %TransportStrategy which sends events one-way to
   * a one-way %Event receiver.
   */
  class DLLEXPORT ITSOneWayEventSender {
  public:
    /** Default constructor.
     *
     * No receiver is set.
     */
    ITSOneWayEventSender() throw();
    
    /** Virtual destructor (needed for dynamic cast).
     */
    virtual ~ITSOneWayEventSender();
    
    /** Set one-way %Event receiver.
     *
     * This method sets the object which receives Events one-way from
     * this %TransportStrategy.
     *
     * @param receiver Pointer to the one-way %Event receiver
     */
    void setOneWayEventReceiver(ITSOneWayEventReceiver* receiver);

    /** Get one-way %Event receiver.
     *
     * This method returns the object which receives Events one-way
     * from this %TransportStrategy.
     *
     * @return Pointer to the one-way %Event receiver
     */
    ITSOneWayEventReceiver* getOneWayEventReceiver() const;
    
  private:
    ITSOneWayEventReceiver* __one_way_event_receiver; ///< Receiver.
  };
  
  
  /** Set one-way Event receiver.
   *
   * @param receiver pointer to ITSOneWayEventReceiver
   */
  inline void ITSOneWayEventSender::setOneWayEventReceiver(ITSOneWayEventReceiver* receiver) {
   __one_way_event_receiver = receiver;
  }  
  
  /** Get one-way Event receiver.
   *
   * @return pointer to ITSOneWayEventReceiver
   */
  inline ITSOneWayEventReceiver* ITSOneWayEventSender::getOneWayEventReceiver() const {
    return __one_way_event_receiver;
  }
  
}

#include "nmm/nmm_suffix.hpp"

#endif
