mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
client: rename all local setters to follow nomenclature
This commit is contained in:
parent
46a188eb39
commit
2df7f76393
@ -44,7 +44,7 @@ static const char *get_name(const void *data)
|
|||||||
return adapter->name;
|
return adapter->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_name(void *data, struct l_dbus_message_iter *variant)
|
static void update_name(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct adapter *adapter = data;
|
struct adapter *adapter = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -60,7 +60,7 @@ static void set_name(void *data, struct l_dbus_message_iter *variant)
|
|||||||
adapter->name = l_strdup(value);
|
adapter->name = l_strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_vendor(void *data, struct l_dbus_message_iter *variant)
|
static void update_vendor(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct adapter *adapter = data;
|
struct adapter *adapter = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -76,7 +76,7 @@ static void set_vendor(void *data, struct l_dbus_message_iter *variant)
|
|||||||
adapter->vendor = l_strdup(value);
|
adapter->vendor = l_strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_model(void *data, struct l_dbus_message_iter *variant)
|
static void update_model(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct adapter *adapter = data;
|
struct adapter *adapter = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -99,7 +99,7 @@ static const char *get_powered_tostr(const void *data)
|
|||||||
return adapter->powered ? "on" : "off";
|
return adapter->powered ? "on" : "off";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_powered(void *data, struct l_dbus_message_iter *variant)
|
static void update_powered(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct adapter *adapter = data;
|
struct adapter *adapter = data;
|
||||||
bool value;
|
bool value;
|
||||||
@ -114,10 +114,10 @@ static void set_powered(void *data, struct l_dbus_message_iter *variant)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct proxy_interface_property adapter_properties[] = {
|
static const struct proxy_interface_property adapter_properties[] = {
|
||||||
{ "Name", "s", set_name, get_name },
|
{ "Name", "s", update_name, get_name },
|
||||||
{ "Powered", "b", set_powered, get_powered_tostr, true },
|
{ "Powered", "b", update_powered, get_powered_tostr, true },
|
||||||
{ "Vendor", "s", set_vendor },
|
{ "Vendor", "s", update_vendor },
|
||||||
{ "Model", "s", set_model },
|
{ "Model", "s", update_model },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ static const char *get_name(const void *data)
|
|||||||
return device->name;
|
return device->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_name(void *data, struct l_dbus_message_iter *variant)
|
static void update_name(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct device *device = data;
|
struct device *device = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -103,7 +103,7 @@ static const char *get_mode(const void *data)
|
|||||||
return device->mode;
|
return device->mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_mode(void *data, struct l_dbus_message_iter *variant)
|
static void update_mode(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct device *device = data;
|
struct device *device = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -126,7 +126,7 @@ static const char *get_address(const void *data)
|
|||||||
return device->address;
|
return device->address;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_address(void *data, struct l_dbus_message_iter *variant)
|
static void update_address(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct device *device = data;
|
struct device *device = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -149,7 +149,7 @@ static const char *get_state(const void *data)
|
|||||||
return device->state;
|
return device->state;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_state(void *data, struct l_dbus_message_iter *variant)
|
static void update_state(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct device *device = data;
|
struct device *device = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -165,7 +165,7 @@ static void set_state(void *data, struct l_dbus_message_iter *variant)
|
|||||||
device->state = l_strdup(value);
|
device->state = l_strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_connected_network(void *data,
|
static void update_connected_network(void *data,
|
||||||
struct l_dbus_message_iter *variant)
|
struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct device *device = data;
|
struct device *device = data;
|
||||||
@ -188,7 +188,7 @@ static const char *get_powered_tostr(const void *data)
|
|||||||
return device->powered ? "on" : "off";
|
return device->powered ? "on" : "off";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_powered(void *data, struct l_dbus_message_iter *variant)
|
static void update_powered(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct device *device = data;
|
struct device *device = data;
|
||||||
bool value;
|
bool value;
|
||||||
@ -209,7 +209,7 @@ static const char *get_wds_tostr(const void *data)
|
|||||||
return device->wds ? "on" : "off";
|
return device->wds ? "on" : "off";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_wds(void *data, struct l_dbus_message_iter *variant)
|
static void update_wds(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct device *device = data;
|
struct device *device = data;
|
||||||
bool value;
|
bool value;
|
||||||
@ -230,7 +230,7 @@ static const char *get_scanning_tostr(const void *data)
|
|||||||
return device->scanning ? "yes" : "no";
|
return device->scanning ? "yes" : "no";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_scanning(void *data, struct l_dbus_message_iter *variant)
|
static void update_scanning(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct device *device = data;
|
struct device *device = data;
|
||||||
bool value;
|
bool value;
|
||||||
@ -244,7 +244,7 @@ static void set_scanning(void *data, struct l_dbus_message_iter *variant)
|
|||||||
device->scanning = value;
|
device->scanning = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_adapter(void *data, struct l_dbus_message_iter *variant)
|
static void update_adapter(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct device *device = data;
|
struct device *device = data;
|
||||||
const char *path;
|
const char *path;
|
||||||
@ -259,16 +259,16 @@ static void set_adapter(void *data, struct l_dbus_message_iter *variant)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct proxy_interface_property device_properties[] = {
|
static const struct proxy_interface_property device_properties[] = {
|
||||||
{ "Name", "s", set_name, get_name },
|
{ "Name", "s", update_name, get_name },
|
||||||
{ "Mode", "s", set_mode, get_mode, true },
|
{ "Mode", "s", update_mode, get_mode, true },
|
||||||
{ "Powered", "b", set_powered, get_powered_tostr, true },
|
{ "Powered", "b", update_powered, get_powered_tostr, true },
|
||||||
{ "Adapter", "o", set_adapter },
|
{ "Adapter", "o", update_adapter },
|
||||||
{ "Address", "s", set_address, get_address },
|
{ "Address", "s", update_address, get_address },
|
||||||
{ "WDS", "b", set_wds, get_wds_tostr, true },
|
{ "WDS", "b", update_wds, get_wds_tostr, true },
|
||||||
{ "Scanning", "b", set_scanning, get_scanning_tostr },
|
{ "Scanning", "b", update_scanning, get_scanning_tostr },
|
||||||
{ "State", "s", set_state, get_state },
|
{ "State", "s", update_state, get_state },
|
||||||
{ "ConnectedNetwork",
|
{ "ConnectedNetwork",
|
||||||
"o", set_connected_network },
|
"o", update_connected_network },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ static void known_networks_display(struct l_queue *known_networks)
|
|||||||
display_table_footer();
|
display_table_footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_name(void *data, struct l_dbus_message_iter *variant)
|
static void update_name(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct known_network *network = data;
|
struct known_network *network = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -121,7 +121,7 @@ static void set_name(void *data, struct l_dbus_message_iter *variant)
|
|||||||
network->name = l_strdup(value);
|
network->name = l_strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_type(void *data, struct l_dbus_message_iter *variant)
|
static void update_type(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct known_network *network = data;
|
struct known_network *network = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -135,7 +135,7 @@ static void set_type(void *data, struct l_dbus_message_iter *variant)
|
|||||||
network->type = l_strdup(value);
|
network->type = l_strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_last_connected(void *data, struct l_dbus_message_iter *variant)
|
static void update_last_connected(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct known_network *network = data;
|
struct known_network *network = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -149,7 +149,7 @@ static void set_last_connected(void *data, struct l_dbus_message_iter *variant)
|
|||||||
network->last_connected = l_strdup(value);
|
network->last_connected = l_strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_last_seen(void *data, struct l_dbus_message_iter *variant)
|
static void update_last_seen(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct known_network *network = data;
|
struct known_network *network = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -164,10 +164,10 @@ static void set_last_seen(void *data, struct l_dbus_message_iter *variant)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct proxy_interface_property known_network_properties[] = {
|
static const struct proxy_interface_property known_network_properties[] = {
|
||||||
{ "Name", "s", set_name },
|
{ "Name", "s", update_name },
|
||||||
{ "Type", "s", set_type },
|
{ "Type", "s", update_type },
|
||||||
{ "LastConnectedTime", "s", set_last_connected },
|
{ "LastConnectedTime", "s", update_last_connected },
|
||||||
{ "LastSeenTime", "s", set_last_seen },
|
{ "LastSeenTime", "s", update_last_seen },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -183,10 +183,10 @@ static void populate_known_network(struct known_network *network,
|
|||||||
if (strcmp(known_network_properties[i].name, name))
|
if (strcmp(known_network_properties[i].name, name))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!known_network_properties[i].set)
|
if (!known_network_properties[i].update)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
known_network_properties[i].set(network, &variant);
|
known_network_properties[i].update(network, &variant);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ static const char *get_name(const void *data)
|
|||||||
return network->name;
|
return network->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_name(void *data, struct l_dbus_message_iter *variant)
|
static void update_name(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct network *network = data;
|
struct network *network = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -168,7 +168,7 @@ static void set_name(void *data, struct l_dbus_message_iter *variant)
|
|||||||
network->name = l_strdup(value);
|
network->name = l_strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_connected(void *data, struct l_dbus_message_iter *variant)
|
static void update_connected(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct network *network = data;
|
struct network *network = data;
|
||||||
bool value;
|
bool value;
|
||||||
@ -182,7 +182,7 @@ static void set_connected(void *data, struct l_dbus_message_iter *variant)
|
|||||||
network->connected = value;
|
network->connected = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_device(void *data, struct l_dbus_message_iter *variant)
|
static void update_device(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct network *network = data;
|
struct network *network = data;
|
||||||
const char *path;
|
const char *path;
|
||||||
@ -196,7 +196,7 @@ static void set_device(void *data, struct l_dbus_message_iter *variant)
|
|||||||
network->device = proxy_interface_find(IWD_DEVICE_INTERFACE, path);
|
network->device = proxy_interface_find(IWD_DEVICE_INTERFACE, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_type(void *data, struct l_dbus_message_iter *variant)
|
static void update_type(void *data, struct l_dbus_message_iter *variant)
|
||||||
{
|
{
|
||||||
struct network *network = data;
|
struct network *network = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
@ -213,10 +213,10 @@ static void set_type(void *data, struct l_dbus_message_iter *variant)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct proxy_interface_property network_properties[] = {
|
static const struct proxy_interface_property network_properties[] = {
|
||||||
{ "Name", "s", set_name, get_name },
|
{ "Name", "s", update_name, get_name },
|
||||||
{ "Connected", "b", set_connected},
|
{ "Connected", "b", update_connected},
|
||||||
{ "Device", "o", set_device},
|
{ "Device", "o", update_device},
|
||||||
{ "Type", "s", set_type},
|
{ "Type", "s", update_type},
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user