/* 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_UNBINDING_EXCEPTION_HPP
#define NMM_UNBINDING_EXCEPTION_HPP NMM_UNBINDING_EXCEPTION_HPP

#include "nmm/nmm_prefix.hpp"

#include "nmm/comm/serialize/SerializedException.hpp"

#include "visibility.hpp"

namespace NMM {
  
  class IInputJack;
  class IOutputJack;
  
  /** Exception thrown whenever a problem occurs on disconnection.
   */
  class DLLEXPORT UnbindingException : public SerializedException {
  public:
    /** Default Contructor.
     */
    UnbindingException();

    /** Constructor with extra comment.
     *
     * @param s extra comment specifying cause of exception
     */
    UnbindingException(const string& s);

    /** Constructor with extra comment and specification of used jacks.
     *
     * @param i_jack input jack used
     * @param o_jack output jack used
     * @param s extra comment specifying cause of exception
     */
    UnbindingException(const IInputJack* i_jack, const IOutputJack* o_jack, const std::string& s = std::string());
    
    /** Copies this UnbindingException.
     *
     * @return copy of this UnbindingException.
     */
    UnbindingException* copy() const;
    
    /** Returns input jack.
     *
     * @return IInputJack interface specifying input jack
     */
    inline const IInputJack* getInputJack()    const { return __input_jack;}
    
    /** Returns output jack.
     *
     * @return IOutputJack interface specifying output jack
     */
    inline const IOutputJack* getOutputJack()  const { return __output_jack;}
    
  private:
    const IInputJack*  __input_jack;  ///< input jack involved in disconnection
    const IOutputJack* __output_jack; ///< output jack involved in disconnection
  };
  
}

#include "nmm/nmm_suffix.hpp"

#endif
