ECORE_CON_API ECORE_CON_API_WEAK const Efl_Event_Description _EFL_NET_SERVER_EVENT_CLIENT_ADD =
   EFL_EVENT_DESCRIPTION_HOT("client,add");
ECORE_CON_API ECORE_CON_API_WEAK const Efl_Event_Description _EFL_NET_SERVER_EVENT_CLIENT_REJECTED =
   EFL_EVENT_DESCRIPTION("client,rejected");
ECORE_CON_API ECORE_CON_API_WEAK const Efl_Event_Description _EFL_NET_SERVER_EVENT_SERVER_ERROR =
   EFL_EVENT_DESCRIPTION("server,error");
ECORE_CON_API ECORE_CON_API_WEAK const Efl_Event_Description _EFL_NET_SERVER_EVENT_SERVING =
   EFL_EVENT_DESCRIPTION("serving");
ECORE_CON_API ECORE_CON_API_WEAK EFL_FUNC_BODYV(efl_net_server_serve, Eina_Error, 0, EFL_FUNC_CALL(address), const char *address);

static Eina_Error
__eolian_efl_net_server_address_set_reflect(Eo *obj, Eina_Value val)
{
   Eina_Error r = 0;   const char *cval;
   if (!eina_value_string_convert(&val, &cval))
      {
         r = EINA_ERROR_VALUE_FAILED;
         goto end;
      }
   efl_net_server_address_set(obj, cval);
 end:
   eina_value_flush(&val);
   return r;
}

ECORE_CON_API ECORE_CON_API_WEAK EFL_VOID_FUNC_BODYV(efl_net_server_address_set, EFL_FUNC_CALL(address), const char *address);

static Eina_Value
__eolian_efl_net_server_address_get_reflect(const Eo *obj)
{
   const char *val = efl_net_server_address_get(obj);
   return eina_value_string_init(val);
}

ECORE_CON_API ECORE_CON_API_WEAK EFL_FUNC_BODY_CONST(efl_net_server_address_get, const char *, NULL);

static Eina_Error
__eolian_efl_net_server_clients_count_set_reflect(Eo *obj, Eina_Value val)
{
   Eina_Error r = 0;   unsigned int cval;
   if (!eina_value_uint_convert(&val, &cval))
      {
         r = EINA_ERROR_VALUE_FAILED;
         goto end;
      }
   efl_net_server_clients_count_set(obj, cval);
 end:
   eina_value_flush(&val);
   return r;
}

ECORE_CON_API ECORE_CON_API_WEAK EFL_VOID_FUNC_BODYV(efl_net_server_clients_count_set, EFL_FUNC_CALL(count), unsigned int count);

static Eina_Value
__eolian_efl_net_server_clients_count_get_reflect(const Eo *obj)
{
   unsigned int val = efl_net_server_clients_count_get(obj);
   return eina_value_uint_init(val);
}

ECORE_CON_API ECORE_CON_API_WEAK EFL_FUNC_BODY_CONST(efl_net_server_clients_count_get, unsigned int, 0);
ECORE_CON_API ECORE_CON_API_WEAK EFL_VOID_FUNC_BODYV(efl_net_server_clients_limit_set, EFL_FUNC_CALL(limit, reject_excess), unsigned int limit, Eina_Bool reject_excess);
ECORE_CON_API ECORE_CON_API_WEAK EFL_VOID_FUNC_BODYV_CONST(efl_net_server_clients_limit_get, EFL_FUNC_CALL(limit, reject_excess), unsigned int *limit, Eina_Bool *reject_excess);
ECORE_CON_API ECORE_CON_API_WEAK EFL_FUNC_BODYV(efl_net_server_client_announce, Eina_Bool, EINA_FALSE /* false */, EFL_FUNC_CALL(client), Efl_Net_Socket *client);

static Eina_Error
__eolian_efl_net_server_serving_set_reflect(Eo *obj, Eina_Value val)
{
   Eina_Error r = 0;   Eina_Bool cval;
   if (!eina_value_bool_convert(&val, &cval))
      {
         r = EINA_ERROR_VALUE_FAILED;
         goto end;
      }
   efl_net_server_serving_set(obj, cval);
 end:
   eina_value_flush(&val);
   return r;
}

ECORE_CON_API ECORE_CON_API_WEAK EFL_VOID_FUNC_BODYV(efl_net_server_serving_set, EFL_FUNC_CALL(serving), Eina_Bool serving);

static Eina_Value
__eolian_efl_net_server_serving_get_reflect(const Eo *obj)
{
   Eina_Bool val = efl_net_server_serving_get(obj);
   return eina_value_bool_init(val);
}

ECORE_CON_API ECORE_CON_API_WEAK EFL_FUNC_BODY_CONST(efl_net_server_serving_get, Eina_Bool, 0);

static Eina_Bool
_efl_net_server_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef EFL_NET_SERVER_EXTRA_OPS
#define EFL_NET_SERVER_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(efl_net_server_serve, NULL),
      EFL_OBJECT_OP_FUNC(efl_net_server_address_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_net_server_address_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_net_server_clients_count_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_net_server_clients_count_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_net_server_clients_limit_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_net_server_clients_limit_get, NULL),
      EFL_OBJECT_OP_FUNC(efl_net_server_client_announce, NULL),
      EFL_OBJECT_OP_FUNC(efl_net_server_serving_set, NULL),
      EFL_OBJECT_OP_FUNC(efl_net_server_serving_get, NULL),
      EFL_NET_SERVER_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"address", __eolian_efl_net_server_address_set_reflect, __eolian_efl_net_server_address_get_reflect},
      {"clients_count", __eolian_efl_net_server_clients_count_set_reflect, __eolian_efl_net_server_clients_count_get_reflect},
      {"serving", __eolian_efl_net_server_serving_set_reflect, __eolian_efl_net_server_serving_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}

static const Efl_Class_Description _efl_net_server_class_desc = {
   EO_VERSION,
   "Efl.Net.Server",
   EFL_CLASS_TYPE_INTERFACE,
   0,
   _efl_net_server_class_initializer,
   NULL,
   NULL
};

EFL_DEFINE_CLASS(efl_net_server_interface_get, &_efl_net_server_class_desc, NULL, NULL);
