#ifndef EFL_GENERATED_ECORE_POLLER_HH
#define EFL_GENERATED_ECORE_POLLER_HH

#include <Eo.h>
#include <Eo.hh>

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


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

   ecore_poller(efl::eo::parent_type _p = (efl::eo::parent = nullptr))
      : ecore_poller(_c0(_p))
   {}

   /// @param type 
   /// @param interval 
   /// @param func 
   /// @param data 
   ///
   ecore_poller(Ecore_Poller_Type type, int interval, Ecore_Task_Cb func, const void * data, efl::eo::parent_type _p = (efl::eo::parent = nullptr))
      : ecore_poller(_c1(type, interval, func, data, _p))
   {}

   /// @brief Copy Constructor.
   ///
   ecore_poller(ecore_poller const& other)
      : efl::eo::base(eo_ref(other._eo_ptr()))
   {}

   ~ecore_poller() {}

   /// @brief @brief Gets the polling interval rate of @p poller.
   /// @return Returns the interval, in ticks, that @p poller polls at.
   ///
   /// This returns a poller's polling interval, or 0 on error.
   ///
   /// @param interval The tick interval to set; must be a power of 2 and <= 32768.
   ///
   int interval_get() const
   {
      int _tmp_ret;
      eo_do(_eo_ptr(), _tmp_ret = ::ecore_poller_interval_get());
      return _tmp_ret;
   }

   /// @brief @brief Changes the polling interval rate of @p poller.
   /// @return Returns true on success, false on failure.
   ///
   /// This allows the changing of a poller's polling interval. It is useful when
   /// you want to alter a poll rate without deleting and re-creating a poller.
   ///
   /// @param interval The tick interval to set; must be a power of 2 and <= 32768.
   ///
   Eina_Bool interval_set(int interval) const
   {
      Eina_Bool _tmp_ret;
      eo_do(_eo_ptr(), _tmp_ret = ::ecore_poller_interval_set(interval));
      return _tmp_ret;
   }

   static Eo_Class const* _eo_class()
   {
      return(ECORE_POLLER_CLASS);
   }

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

   static Eo* _c1(Ecore_Poller_Type type, int interval, Ecore_Task_Cb func, const void * data, efl::eo::parent_type _p)
   {
      return eo_add_custom(ECORE_POLLER_CLASS, _p._eo_raw, ecore_poller_constructor(type, interval, func, data));
   }

};
template <typename T>
int ecore_poller_interval_get_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self)
{
   return static_cast<T*>(self->this_)->interval_get();
}

template <typename T>
Eina_Bool ecore_poller_interval_set_wrapper(Eo* objid EINA_UNUSED, efl::eo::detail::Inherit_Private_Data* self, int interval)
{
   return static_cast<T*>(self->this_)->interval_set(interval);
}

namespace efl { namespace eo { namespace detail {

template<>
struct operations< ::ecore_poller >
{
   template <typename T>
   struct type
   {
      virtual int interval_get()
      {
         int _tmp_ret = {};
         eo_do_super(static_cast<T*>(this)->_eo_ptr()
            , static_cast<T*>(this)->_eo_class()
            , _tmp_ret = ::ecore_poller_interval_get());
         return _tmp_ret;
      }

      virtual Eina_Bool interval_set(int interval)
      {
         Eina_Bool _tmp_ret = {};
         eo_do_super(static_cast<T*>(this)->_eo_ptr()
            , static_cast<T*>(this)->_eo_class()
            , _tmp_ret = ::ecore_poller_interval_set(interval));
         return _tmp_ret;
      }

   };
};


template<>
struct operation_description_class_size< ::ecore_poller >
{
   static const int value = 2;
};

template <typename T>
int initialize_operation_description(efl::eo::detail::tag<::ecore_poller>
                                 , Eo_Op_Description* ops)
{
   (void)ops;
   ops[0].func = reinterpret_cast<void*>(& ::ecore_poller_interval_get_wrapper<T>);
   ops[0].api_func = reinterpret_cast<void*>(& ::ecore_poller_interval_get);
   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_poller_interval_set_wrapper<T>);
   ops[1].api_func = reinterpret_cast<void*>(& ::ecore_poller_interval_set);
   ops[1].op = EO_OP_OVERRIDE;
   ops[1].op_type = EO_OP_TYPE_REGULAR;
   ops[1].doc = NULL;

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

inline void
call_constructor(tag< ::ecore_poller >
               , Eo* eo, Eo_Class const* cls EINA_UNUSED,
               args_class<::ecore_poller, ::std::tuple<Ecore_Poller_Type, int, Ecore_Task_Cb, const void *> > const& args)
{
   (void)args;
   eo_do_super(eo, cls, ::ecore_poller_constructor(args.get<0>(), args.get<1>(), args.get<2>(), args.get<3>()));
}

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

      int interval_get()
      {
         int _tmp_ret = {};
         eo_do(static_cast<T*>(this)->_eo_ptr(), _tmp_ret = ::ecore_poller_interval_get());
         return _tmp_ret;
      }

      Eina_Bool interval_set(int interval)
      {
         Eina_Bool _tmp_ret = {};
         eo_do(static_cast<T*>(this)->_eo_ptr(), _tmp_ret = ::ecore_poller_interval_set(interval));
         return _tmp_ret;
      }

   };
};

inline Eo_Class const* get_eo_class(tag<::ecore_poller>)
{
   return (ECORE_POLLER_CLASS);
}

} } }
#endif // EFL_GENERATED_ECORE_POLLER_HH

