/* 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_INamedImpl_HPP
#define NMM_INamedImpl_HPP

#include "nmm/nmm_prefix.hpp"

#include "nmm/comm/NMMObject.hpp"
#include "INamed.hpp"


#include "visibility.hpp"

namespace NMM
{
  /** Interface to NamedObject.
   */

  class DLLEXPORT INamedImpl  : public virtual NMM::NMMObject { 
  public:
    INamedImpl() { addInterface(new INamed(*this)); registerEvents(); };

    virtual ~INamedImpl() {};

  protected:
    /** Assigns a name to this object.
     *
     * @param name of the object
     */

    virtual void setName(const string& name) = 0;
    /** Returns the name of this object.
     *
     * @return name of the object
     */

    virtual string getName() const = 0;
    /** Redirects the error stream to a file for a given message level.
     *
     * @param filename for error stream
     * @param error_level The message level
     */

    virtual void setErrorStream(const string& filename, const nmm_int32& error_level) = 0;
    /** Redirects the debug stream to a file for a given message level.
     *
     * @param filename for debug stream
     * @param debug_level The message level
     */

    virtual void setDebugStream(const string& filename, const nmm_int32& debug_level) = 0;
    /** Redirects the warning stream to a file for a given message level.
     *
     * @param filename for warning stream
     * @param warning_level The message level
     */

    virtual void setWarningStream(const string& filename, const nmm_int32& warning_level) = 0;
    /** Redirects the message stream to a file for a given message level.
     *
     * @param filename for message stream
     * @param message_level The message level
     */

    virtual void setMessageStream(const string& filename, const nmm_int32& message_level) = 0;


  private:
    void registerEvents();
  };

}

#include "nmm/nmm_suffix.hpp"

#endif
