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;
|
||||
}
|
||||
|
||||
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;
|
||||
const char *value;
|
||||
@ -60,7 +60,7 @@ static void set_name(void *data, struct l_dbus_message_iter *variant)
|
||||
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;
|
||||
const char *value;
|
||||
@ -76,7 +76,7 @@ static void set_vendor(void *data, struct l_dbus_message_iter *variant)
|
||||
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;
|
||||
const char *value;
|
||||
@ -99,7 +99,7 @@ static const char *get_powered_tostr(const void *data)
|
||||
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;
|
||||
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[] = {
|
||||
{ "Name", "s", set_name, get_name },
|
||||
{ "Powered", "b", set_powered, get_powered_tostr, true },
|
||||
{ "Vendor", "s", set_vendor },
|
||||
{ "Model", "s", set_model },
|
||||
{ "Name", "s", update_name, get_name },
|
||||
{ "Powered", "b", update_powered, get_powered_tostr, true },
|
||||
{ "Vendor", "s", update_vendor },
|
||||
{ "Model", "s", update_model },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
@ -80,7 +80,7 @@ static const char *get_name(const void *data)
|
||||
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;
|
||||
const char *value;
|
||||
@ -103,7 +103,7 @@ static const char *get_mode(const void *data)
|
||||
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;
|
||||
const char *value;
|
||||
@ -126,7 +126,7 @@ static const char *get_address(const void *data)
|
||||
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;
|
||||
const char *value;
|
||||
@ -149,7 +149,7 @@ static const char *get_state(const void *data)
|
||||
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;
|
||||
const char *value;
|
||||
@ -165,7 +165,7 @@ static void set_state(void *data, struct l_dbus_message_iter *variant)
|
||||
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 device *device = data;
|
||||
@ -188,7 +188,7 @@ static const char *get_powered_tostr(const void *data)
|
||||
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;
|
||||
bool value;
|
||||
@ -209,7 +209,7 @@ static const char *get_wds_tostr(const void *data)
|
||||
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;
|
||||
bool value;
|
||||
@ -230,7 +230,7 @@ static const char *get_scanning_tostr(const void *data)
|
||||
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;
|
||||
bool value;
|
||||
@ -244,7 +244,7 @@ static void set_scanning(void *data, struct l_dbus_message_iter *variant)
|
||||
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;
|
||||
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[] = {
|
||||
{ "Name", "s", set_name, get_name },
|
||||
{ "Mode", "s", set_mode, get_mode, true },
|
||||
{ "Powered", "b", set_powered, get_powered_tostr, true },
|
||||
{ "Adapter", "o", set_adapter },
|
||||
{ "Address", "s", set_address, get_address },
|
||||
{ "WDS", "b", set_wds, get_wds_tostr, true },
|
||||
{ "Scanning", "b", set_scanning, get_scanning_tostr },
|
||||
{ "State", "s", set_state, get_state },
|
||||
{ "Name", "s", update_name, get_name },
|
||||
{ "Mode", "s", update_mode, get_mode, true },
|
||||
{ "Powered", "b", update_powered, get_powered_tostr, true },
|
||||
{ "Adapter", "o", update_adapter },
|
||||
{ "Address", "s", update_address, get_address },
|
||||
{ "WDS", "b", update_wds, get_wds_tostr, true },
|
||||
{ "Scanning", "b", update_scanning, get_scanning_tostr },
|
||||
{ "State", "s", update_state, get_state },
|
||||
{ "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();
|
||||
}
|
||||
|
||||
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;
|
||||
const char *value;
|
||||
@ -121,7 +121,7 @@ static void set_name(void *data, struct l_dbus_message_iter *variant)
|
||||
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;
|
||||
const char *value;
|
||||
@ -135,7 +135,7 @@ static void set_type(void *data, struct l_dbus_message_iter *variant)
|
||||
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;
|
||||
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);
|
||||
}
|
||||
|
||||
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;
|
||||
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[] = {
|
||||
{ "Name", "s", set_name },
|
||||
{ "Type", "s", set_type },
|
||||
{ "LastConnectedTime", "s", set_last_connected },
|
||||
{ "LastSeenTime", "s", set_last_seen },
|
||||
{ "Name", "s", update_name },
|
||||
{ "Type", "s", update_type },
|
||||
{ "LastConnectedTime", "s", update_last_connected },
|
||||
{ "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))
|
||||
continue;
|
||||
|
||||
if (!known_network_properties[i].set)
|
||||
if (!known_network_properties[i].update)
|
||||
break;
|
||||
|
||||
known_network_properties[i].set(network, &variant);
|
||||
known_network_properties[i].update(network, &variant);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ static const char *get_name(const void *data)
|
||||
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;
|
||||
const char *value;
|
||||
@ -168,7 +168,7 @@ static void set_name(void *data, struct l_dbus_message_iter *variant)
|
||||
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;
|
||||
bool value;
|
||||
@ -182,7 +182,7 @@ static void set_connected(void *data, struct l_dbus_message_iter *variant)
|
||||
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;
|
||||
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);
|
||||
}
|
||||
|
||||
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;
|
||||
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[] = {
|
||||
{ "Name", "s", set_name, get_name },
|
||||
{ "Connected", "b", set_connected},
|
||||
{ "Device", "o", set_device},
|
||||
{ "Type", "s", set_type},
|
||||
{ "Name", "s", update_name, get_name },
|
||||
{ "Connected", "b", update_connected},
|
||||
{ "Device", "o", update_device},
|
||||
{ "Type", "s", update_type},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user