#ifndef EFL_GENERATED_ECORE_AUDIO_OUT_PULSE_HH
#define EFL_GENERATED_ECORE_AUDIO_OUT_PULSE_HH

extern "C"
{
#include <Efl.h>
}
#include <Eo.hh>

#include <eo_cxx_interop.hh>

extern "C"
{
#include "ecore_audio_out_pulse.eo.h"
}

#include "ecore_audio_out.eo.hh"
#include <eo_base.hh>

struct ecore_audio_out_pulse
      : ecore_audio_out
{
   /// @brief Eo Constructor.
   ///
   /// Constructs the object from an Eo* pointer stealing its ownership.
   ///
   /// @param eo The Eo object pointer.
   ///
   explicit ecore_audio_out_pulse(Eo* eo)
      : ecore_audio_out(eo)
   {}

   /// @brief nullptr_t Constructor.
   ///
   /// Constructs an empty (null) object.
   ///
   explicit ecore_audio_out_pulse(std::nullptr_t)
      : ecore_audio_out(nullptr)
   {}

   /// @brief Call the object's constructor.
   /// Should not be used with #eo_do. Only use it with #eo_do_super.
   ///
   ecore_audio_out_pulse(efl::eo::parent_type _p = (efl::eo::parent = nullptr))
      : ecore_audio_out_pulse(_c0(_p))
   {}

   /// @brief Copy Constructor.
   ///
   ecore_audio_out_pulse(ecore_audio_out_pulse const& other)
      : ecore_audio_out(eo_ref(other._eo_ptr()))
   {}

   ~ecore_audio_out_pulse() {}

   /// @brief Set the volume of the object
   ///
   /// @since 1.8
   ///
   /// @param volume 
   ///
   void volume_set(double volume_) const
   {
      eo_do(_eo_ptr(), ::ecore_audio_obj_volume_set(volume_));
   }

   /// @brief Attach an input to an output
   ///
   /// @since 1.8
   ///
   /// @param input 
   ///
   bool input_attach(efl::eo::base input_) const
   {
      Eina_Bool _tmp_ret;
      eo_do(_eo_ptr(), _tmp_ret = ::ecore_audio_obj_out_input_attach(efl::eolian::to_c(input_)));
      return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
   }

   /// @brief Detach an input from an output
   ///
   /// @since 1.8
   ///
   /// @param input 
   ///
   bool input_detach(efl::eo::base input_) const
   {
      Eina_Bool _tmp_ret;
      eo_do(_eo_ptr(), _tmp_ret = ::ecore_audio_obj_out_input_detach(efl::eolian::to_c(input_)));
      return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
   }

   template <typename F>
   ::efl::eo::signal_connection
   callback_context_ready_add(F && callback_,
                        ::efl::eo::callback_priority priority_ =
                        ::efl::eo::callback_priorities::default_)
   {
      typedef typename std::remove_reference<F>::type function_type;
      ::std::unique_ptr<function_type> f ( new function_type(std::move(callback_)) );
      eo_do(_eo_ptr(),
            eo_event_callback_priority_add
            (ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, priority_,
            &efl::eo::_detail::event_callback<::ecore_audio_out_pulse, function_type>, f.get()));
      return ::efl::eo::make_signal_connection
         (f, _eo_ptr(), &efl::eo::_detail::event_callback<::ecore_audio_out_pulse, function_type>,
         ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY );
   }

   template <typename T>
   void
   callback_context_ready_call(T* info)
   {
      eo_do(_eo_ptr(), eo_event_callback_call
            (ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, info));
   }
   template <typename F>
   ::efl::eo::signal_connection
   callback_context_fail_add(F && callback_,
                        ::efl::eo::callback_priority priority_ =
                        ::efl::eo::callback_priorities::default_)
   {
      typedef typename std::remove_reference<F>::type function_type;
      ::std::unique_ptr<function_type> f ( new function_type(std::move(callback_)) );
      eo_do(_eo_ptr(),
            eo_event_callback_priority_add
            (ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, priority_,
            &efl::eo::_detail::event_callback<::ecore_audio_out_pulse, function_type>, f.get()));
      return ::efl::eo::make_signal_connection
         (f, _eo_ptr(), &efl::eo::_detail::event_callback<::ecore_audio_out_pulse, function_type>,
         ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL );
   }

   template <typename T>
   void
   callback_context_fail_call(T* info)
   {
      eo_do(_eo_ptr(), eo_event_callback_call
            (ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, info));
   }
   static Eo_Class const* _eo_class()
   {
      return(ECORE_AUDIO_OUT_PULSE_CLASS);
   }

private:
   static Eo* _c0(efl::eo::parent_type _p)
   {
      return eo_add_ref(ECORE_AUDIO_OUT_PULSE_CLASS, _p._eo_raw, eo_constructor());
   }

};
template <typename T>
void _ecore_audio_out_pulse_volume_set_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self, double volume_)
{
   static_cast<T*>(self->this_)->volume_set(volume_);
}

template <typename T>
bool _ecore_audio_out_pulse_input_attach_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self, Eo * input_)
{
   return static_cast<T*>(self->this_)->input_attach(efl::eolian::to_cxx<efl::eo::base>(input_, std::tuple<std::false_type>()));
}

template <typename T>
bool _ecore_audio_out_pulse_input_detach_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self, Eo * input_)
{
   return static_cast<T*>(self->this_)->input_detach(efl::eolian::to_cxx<efl::eo::base>(input_, std::tuple<std::false_type>()));
}

namespace efl { namespace eo { namespace detail {

template<>
struct operations< ::ecore_audio_out_pulse >
{
   template <typename T>
   struct type
   {
      virtual void volume_set(double volume_)
      {
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               ::ecore_audio_obj_volume_set(volume_));
      }

      virtual bool input_attach(efl::eo::base input_)
      {
         Eina_Bool _tmp_ret = {};
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               _tmp_ret = ::ecore_audio_obj_out_input_attach(efl::eolian::to_c(input_)));
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

      virtual bool input_detach(efl::eo::base input_)
      {
         Eina_Bool _tmp_ret = {};
         eo_do_super(static_cast<T*>(this)->_eo_ptr(),
               static_cast<T*>(this)->_eo_class(),
               _tmp_ret = ::ecore_audio_obj_out_input_detach(efl::eolian::to_c(input_)));
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

   };
};


template<>
struct operation_description_class_size< ::ecore_audio_out_pulse >
{
   static const int value = 3;
};

template <typename T>
int initialize_operation_description(efl::eo::detail::tag<::ecore_audio_out_pulse>
                                 , Eo_Op_Description* ops)
{
   (void)ops;
   ops[0].func = reinterpret_cast<void*>(& ::_ecore_audio_out_pulse_volume_set_wrapper<T>);
   ops[0].api_func = reinterpret_cast<void*>(& ::ecore_audio_obj_volume_set);
   ops[0].op = EO_OP_OVERRIDE;
   ops[0].op_type = EO_OP_TYPE_REGULAR;
   ops[0].doc = NULL;

   ops[1].func = reinterpret_cast<void*>(& ::_ecore_audio_out_pulse_input_attach_wrapper<T>);
   ops[1].api_func = reinterpret_cast<void*>(& ::ecore_audio_obj_out_input_attach);
   ops[1].op = EO_OP_OVERRIDE;
   ops[1].op_type = EO_OP_TYPE_REGULAR;
   ops[1].doc = NULL;

   ops[2].func = reinterpret_cast<void*>(& ::_ecore_audio_out_pulse_input_detach_wrapper<T>);
   ops[2].api_func = reinterpret_cast<void*>(& ::ecore_audio_obj_out_input_detach);
   ops[2].op = EO_OP_OVERRIDE;
   ops[2].op_type = EO_OP_TYPE_REGULAR;
   ops[2].doc = NULL;

   return 0;
}
inline void
call_constructor(tag< ::ecore_audio_out_pulse >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               args_class<::ecore_audio_out_pulse, ::std::tuple<> > const& args)
{
   (void)args;
   eo_do_super(eo, cls, ::eo_constructor());
}

inline void
call_constructor(tag< ::ecore_audio_out_pulse >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               args_class<::ecore_audio_out_pulse, ::std::tuple<efl::eo::parent_type> > const& args)
{
   eo_do_super(eo, cls, ::eo_constructor());
   eo_do(eo, ::eo_parent_set(args.get<0>()._eo_raw));
}

template<>
struct extension_inheritance< ::ecore_audio_out_pulse>
{
   template <typename U>
   struct type
   {
      operator ::ecore_audio_out_pulse() const
      {
         return ::ecore_audio_out_pulse(eo_ref(static_cast<U const*>(this)->_eo_ptr()));
      }

      void volume_set(double volume_)
      {
         eo_do(static_cast<U*>(this)->_eo_ptr(), ::ecore_audio_obj_volume_set(volume_));
      }

      bool input_attach(efl::eo::base input_)
      {
         Eina_Bool _tmp_ret = {};
         eo_do(static_cast<U*>(this)->_eo_ptr(), _tmp_ret = ::ecore_audio_obj_out_input_attach(efl::eolian::to_c(input_)));
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

      bool input_detach(efl::eo::base input_)
      {
         Eina_Bool _tmp_ret = {};
         eo_do(static_cast<U*>(this)->_eo_ptr(), _tmp_ret = ::ecore_audio_obj_out_input_detach(efl::eolian::to_c(input_)));
            return efl::eolian::to_cxx<bool>(_tmp_ret, std::tuple<std::false_type>());
      }

   template <typename F>
   ::efl::eo::signal_connection
   callback_context_ready_add(F && callback_,
                        ::efl::eo::callback_priority priority_ =
                        ::efl::eo::callback_priorities::default_)
   {
      typedef typename std::remove_reference<F>::type function_type;
      ::std::unique_ptr<function_type> f ( new function_type(std::move(callback_)) );
      eo_do(static_cast<U*>(this)->_eo_ptr(),
            eo_event_callback_priority_add
            (ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, priority_,
            &efl::eo::_detail::event_callback<::ecore_audio_out_pulse, function_type>, f.get()));
      return ::efl::eo::make_signal_connection
         (f, static_cast<U*>(this)->_eo_ptr(), &efl::eo::_detail::event_callback<::ecore_audio_out_pulse, function_type>,
         ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY );
   }

   template <typename T>
   void
   callback_context_ready_call(T* info)
   {
      eo_do(static_cast<U*>(this)->_eo_ptr(), eo_event_callback_call
            (ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, info));
   }
   template <typename F>
   ::efl::eo::signal_connection
   callback_context_fail_add(F && callback_,
                        ::efl::eo::callback_priority priority_ =
                        ::efl::eo::callback_priorities::default_)
   {
      typedef typename std::remove_reference<F>::type function_type;
      ::std::unique_ptr<function_type> f ( new function_type(std::move(callback_)) );
      eo_do(static_cast<U*>(this)->_eo_ptr(),
            eo_event_callback_priority_add
            (ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, priority_,
            &efl::eo::_detail::event_callback<::ecore_audio_out_pulse, function_type>, f.get()));
      return ::efl::eo::make_signal_connection
         (f, static_cast<U*>(this)->_eo_ptr(), &efl::eo::_detail::event_callback<::ecore_audio_out_pulse, function_type>,
         ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL );
   }

   template <typename T>
   void
   callback_context_fail_call(T* info)
   {
      eo_do(static_cast<U*>(this)->_eo_ptr(), eo_event_callback_call
            (ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, info));
   }
   };
};

inline Eo_Class const* get_eo_class(tag<::ecore_audio_out_pulse>)
{
   return (ECORE_AUDIO_OUT_PULSE_CLASS);
}

} } }
#endif // EFL_GENERATED_ECORE_AUDIO_OUT_PULSE_HH

