/* 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_IAudioDevice_HPP
#define NMM_IAudioDevice_HPP

#include "nmm/nmm_prefix.hpp"

#include "nmm/comm/Interface.hpp"
#include "nmm/comm/messaging/Event.hpp"
#include "nmm/comm/messaging/IllegalStateException.hpp"
#include <memory>

#include "nmm/multimedia/IDevice.hpp"

#include "visibility.hpp"

namespace NMM
{
  /** Interface for configuring audio devices.
   */

  class DLLEXPORT IAudioDevice : virtual public IDevice { 
  public:
    IAudioDevice() : NMM::Interface(IAudioDevice::IAudioDevice_type, "NMM") { };

    IAudioDevice(NMM::NMMObject& parent) : NMM::Interface (parent, IAudioDevice::IAudioDevice_type, "NMM") { };

    virtual ~IAudioDevice() {};

    static const char* IAudioDevice_type;

    virtual  string getInterfaceType() const { return IAudioDevice_type; }

    NMM::Interface* copy() const { return new IAudioDevice(*this); }
    static void used(); 
    static const char* setMixerDevice_event;
    static const char* setMixerVolumeElement_event;
    static const char* getMixerDevice_event;
    static const char* increaseVolume_event;
    static const char* decreaseVolume_event;
    static const char* setVolume_event;
    static const char* getVolume_event;
    /** Sets mixer device.
     *
     * @param value name of device 
     */

    virtual void setMixerDevice(const string& value)
      throw(const NMM::SerializedException&, const DeviceNotFoundException&);
    /** Sets the element name of the mixer element. 
     *
     * Sets the element name of the mixer element. used by setVolume, increaseVolume and decreaseVolume.
     * The interpretation of the element name is device-specific.
     *
     * @param value Name of mixer element.
     */

    virtual void setMixerVolumeElement(const string& value)
      throw(const NMM::SerializedException&);
    /** Returns the element name of the mixer element used by setVolume, increaseVolume and decreaseVolume-
     *
     * @return Name of mixer element.
     */

    virtual string getMixerDevice() const
      throw(const NMM::SerializedException&);
    /** Increases Volume.
     */

    virtual void increaseVolume()
      throw(const NMM::SerializedException&);
    /** Decreases Volume.
     */

    virtual void decreaseVolume()
      throw(const NMM::SerializedException&);
    /** Sets volume.
     *
     * @param volume Volume to set.
     */

    virtual void setVolume(const nmm_int32& volume)
      throw(const NMM::SerializedException&);
    /** Returns current volume value.
     *
     * @return current volume value.
     */

    virtual nmm_int32 getVolume()
      throw(const NMM::SerializedException&);


  };

  typedef auto_ptr<IAudioDevice> IAudioDevice_var;




}

#include "nmm/nmm_suffix.hpp"

#endif
