/* 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_REQUEST_REPLY_EVENT_SENDER_HPP
#define NMM_I_TS_REQUEST_REPLY_EVENT_SENDER_HPP NMM_I_TS_REQUEST_REPLY_EVENT_SENDER_HPP

#include "nmm/nmm_prefix.hpp"

#include "visibility.hpp"

namespace NMM {
  
  class ITSRequestReplyEventReceiver;
  
  /** Request-reply event receiver transport strategy interface.
   *
   * Interface for a leaf %TransportStrategy which sends request-reply
   * Events to an %Event receiver.
   */
  class DLLEXPORT ITSRequestReplyEventSender {
  public:
    /** Default constructor.
     *
     * No receiver is set.
     */
    ITSRequestReplyEventSender() throw();
    
    /** Virtual destructor (needed for dynamic cast).
     */
    virtual ~ITSRequestReplyEventSender();
    
    /** Set request-reply %Event receiver.
     *
     * This method sets the object which receives request-reply Events
     * from this %TransportStrategy.
     *
     * @param receiver Pointer to the request-reply %Event receiver
     */
    void setRequestReplyEventReceiver(ITSRequestReplyEventReceiver* receiver);
    
    /** Get request-reply %Event receiver.
     *
     * This method returns the object which receives request-reply
     * Events from this %TransportStrategy.
     *
     * @return Pointer to the request-reply %Event receiver
     */
    ITSRequestReplyEventReceiver* getRequestReplyEventReceiver() const;
    
  private:
    ITSRequestReplyEventReceiver* __request_reply_event_receiver; ///< Receiver.
  };
  
  
  /** Set ITSRequestReplyEventReceiver.
   *
   * @param receiver pointer to ITSRequestReplyEventReceiver
   */
  inline void ITSRequestReplyEventSender::setRequestReplyEventReceiver(ITSRequestReplyEventReceiver* receiver) {
    __request_reply_event_receiver = receiver;
  }
  
  /** Get ITSRequestReplyEventReceiver.
   *
   * @return pointer to ITSRequestReplyEventReceiver
   */
  inline ITSRequestReplyEventReceiver* ITSRequestReplyEventSender::getRequestReplyEventReceiver() const {
    return __request_reply_event_receiver;
  }
  
}

#include "nmm/nmm_suffix.hpp"

#endif
