forked from enlightenment/efl
ecore_con: remove use of list<> from Efl.Net.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11044
This commit is contained in:
parent
fc0c60ca8c
commit
81cbe8bdc8
|
@ -466,7 +466,6 @@ _ctl_agent_request_input(void *data EINA_UNUSED, const Efl_Event *event)
|
||||||
char buf[100];
|
char buf[100];
|
||||||
Eo *ctl = event->object;
|
Eo *ctl = event->object;
|
||||||
Efl_Net_Control_Agent_Request_Input *ri = event->info;
|
Efl_Net_Control_Agent_Request_Input *ri = event->info;
|
||||||
Eina_List *n;
|
|
||||||
Efl_Net_Control_Agent_Request_Input_Information *info;
|
Efl_Net_Control_Agent_Request_Input_Information *info;
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
char *username = NULL;
|
char *username = NULL;
|
||||||
|
@ -475,10 +474,11 @@ _ctl_agent_request_input(void *data EINA_UNUSED, const Efl_Event *event)
|
||||||
char *wps = NULL;
|
char *wps = NULL;
|
||||||
Eina_Slice ssid_slice = { };
|
Eina_Slice ssid_slice = { };
|
||||||
size_t len;
|
size_t len;
|
||||||
|
unsigned int n;
|
||||||
|
|
||||||
printf("INFO: Needs agent input!\n");
|
printf("INFO: Needs agent input!\n");
|
||||||
|
|
||||||
EINA_LIST_FOREACH(ri->informational, n, info)
|
EINA_ACCESSOR_FOREACH(ri->informational, n, info)
|
||||||
printf("INFO: - %s: %s\n", info->name, info->value);
|
printf("INFO: - %s: %s\n", info->name, info->value);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -212,6 +212,7 @@ _efl_net_control_agent_request_input(const Eldbus_Service_Interface *service, co
|
||||||
Efl_Net_Control_Agent_Request_Input event = { };
|
Efl_Net_Control_Agent_Request_Input event = { };
|
||||||
Efl_Net_Control_Agent_Request_Input_Information *info;
|
Efl_Net_Control_Agent_Request_Input_Information *info;
|
||||||
Eldbus_Message_Iter *array, *entry;
|
Eldbus_Message_Iter *array, *entry;
|
||||||
|
Eina_Array infos;
|
||||||
const char *path;
|
const char *path;
|
||||||
|
|
||||||
DBG("Agent %p requested input %s", o, eldbus_message_path_get(msg));
|
DBG("Agent %p requested input %s", o, eldbus_message_path_get(msg));
|
||||||
|
@ -231,6 +232,8 @@ _efl_net_control_agent_request_input(const Eldbus_Service_Interface *service, co
|
||||||
if (!eldbus_message_arguments_get(msg, "oa{sv}", &path, &array))
|
if (!eldbus_message_arguments_get(msg, "oa{sv}", &path, &array))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
eina_array_step_set(&infos, sizeof (Eina_Array), 4);
|
||||||
|
event.informational = eina_array_accessor_new(&infos);
|
||||||
event.access_point = _efl_net_control_access_point_find(pd, path);
|
event.access_point = _efl_net_control_access_point_find(pd, path);
|
||||||
|
|
||||||
while (eldbus_message_iter_get_and_next(array, 'e', &entry))
|
while (eldbus_message_iter_get_and_next(array, 'e', &entry))
|
||||||
|
@ -261,7 +264,7 @@ _efl_net_control_agent_request_input(const Eldbus_Service_Interface *service, co
|
||||||
{
|
{
|
||||||
info = _efl_net_control_agent_informational_get(name, var);
|
info = _efl_net_control_agent_informational_get(name, var);
|
||||||
if (info)
|
if (info)
|
||||||
event.informational = eina_list_append(event.informational, info);
|
eina_array_push(&infos, info);
|
||||||
else
|
else
|
||||||
WRN("Unknown field name '%s'", name);
|
WRN("Unknown field name '%s'", name);
|
||||||
}
|
}
|
||||||
|
@ -270,7 +273,9 @@ _efl_net_control_agent_request_input(const Eldbus_Service_Interface *service, co
|
||||||
pd->agent_request_input.msg = eldbus_message_ref((Eldbus_Message *)msg);
|
pd->agent_request_input.msg = eldbus_message_ref((Eldbus_Message *)msg);
|
||||||
efl_event_callback_call(o, EFL_NET_CONTROL_MANAGER_EVENT_AGENT_REQUEST_INPUT, &event);
|
efl_event_callback_call(o, EFL_NET_CONTROL_MANAGER_EVENT_AGENT_REQUEST_INPUT, &event);
|
||||||
|
|
||||||
EINA_LIST_FREE(event.informational, info) free(info);
|
eina_accessor_free(event.informational);
|
||||||
|
while ((info = eina_array_pop(&infos))) free(info);
|
||||||
|
eina_array_flush(&infos);
|
||||||
|
|
||||||
return NULL; /* reply later */
|
return NULL; /* reply later */
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ struct @beta Efl.Net.Control.Agent_Request_Input {
|
||||||
access_point: Efl.Net.Control.Access_Point; [[The access point which triggered this request.]]
|
access_point: Efl.Net.Control.Access_Point; [[The access point which triggered this request.]]
|
||||||
fields: Efl.Net.Control.Agent_Request_Input_Field; [[Bitwise OR of fields present in this request.]]
|
fields: Efl.Net.Control.Agent_Request_Input_Field; [[Bitwise OR of fields present in this request.]]
|
||||||
passphrase_type: string; [[Extra detail for the passphrase field, such as wep, psk, response (IEEE802.X GTC/OTP), string...]]
|
passphrase_type: string; [[Extra detail for the passphrase field, such as wep, psk, response (IEEE802.X GTC/OTP), string...]]
|
||||||
informational: list<Efl.Net.Control.Agent_Request_Input_Information>; [[Such as the previous passphrase, VPN host]]
|
informational: accessor<Efl.Net.Control.Agent_Request_Input_Information>; [[Such as the previous passphrase, VPN host]]
|
||||||
}
|
}
|
||||||
|
|
||||||
struct @beta Efl.Net.Control.Agent_Error {
|
struct @beta Efl.Net.Control.Agent_Error {
|
||||||
|
|
Loading…
Reference in New Issue