mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 14:22:36 +01:00
dbus: Switch to using org.freedesktop.DBus.Properties
Use the org.freedesktop.DBus.Properties interfaces on objects with properties and drop the old style GetProperty/SetProperty methods on individual interfaces. Agent and KnownNetworks have no properties at this time so don't add org.freedesktop.DBus.Properties interfaces.
This commit is contained in:
parent
c6e38dacac
commit
0ffec2e481
@ -457,7 +457,7 @@ bool agent_init(struct l_dbus *dbus)
|
|||||||
{
|
{
|
||||||
if (!l_dbus_register_interface(dbus, IWD_AGENT_MANAGER_INTERFACE,
|
if (!l_dbus_register_interface(dbus, IWD_AGENT_MANAGER_INTERFACE,
|
||||||
setup_agent_interface,
|
setup_agent_interface,
|
||||||
NULL, true)) {
|
NULL, false)) {
|
||||||
l_info("Unable to register %s interface",
|
l_info("Unable to register %s interface",
|
||||||
IWD_AGENT_MANAGER_INTERFACE);
|
IWD_AGENT_MANAGER_INTERFACE);
|
||||||
return false;
|
return false;
|
||||||
|
@ -1156,6 +1156,11 @@ struct device *device_create(struct wiphy *wiphy, struct netdev *netdev)
|
|||||||
IWD_DEVICE_INTERFACE, device))
|
IWD_DEVICE_INTERFACE, device))
|
||||||
l_info("Unable to register %s interface", IWD_DEVICE_INTERFACE);
|
l_info("Unable to register %s interface", IWD_DEVICE_INTERFACE);
|
||||||
|
|
||||||
|
if (!l_dbus_object_add_interface(dbus, device_get_path(device),
|
||||||
|
L_DBUS_INTERFACE_PROPERTIES, device))
|
||||||
|
l_info("Unable to register %s interface",
|
||||||
|
L_DBUS_INTERFACE_PROPERTIES);
|
||||||
|
|
||||||
scan_ifindex_add(device->index);
|
scan_ifindex_add(device->index);
|
||||||
|
|
||||||
device_netdev_notify(netdev, netdev_get_is_up(netdev) ?
|
device_netdev_notify(netdev, netdev_get_is_up(netdev) ?
|
||||||
@ -1218,7 +1223,7 @@ bool device_init(void)
|
|||||||
if (!l_dbus_register_interface(dbus_get_bus(),
|
if (!l_dbus_register_interface(dbus_get_bus(),
|
||||||
IWD_DEVICE_INTERFACE,
|
IWD_DEVICE_INTERFACE,
|
||||||
setup_device_interface,
|
setup_device_interface,
|
||||||
NULL, true))
|
NULL, false))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
watchlist_init(&device_watches);
|
watchlist_init(&device_watches);
|
||||||
|
@ -142,7 +142,7 @@ bool known_networks_init(void)
|
|||||||
|
|
||||||
if (!l_dbus_register_interface(dbus, IWD_KNOWN_NETWORKS_INTERFACE,
|
if (!l_dbus_register_interface(dbus, IWD_KNOWN_NETWORKS_INTERFACE,
|
||||||
setup_known_networks_interface,
|
setup_known_networks_interface,
|
||||||
NULL, true)) {
|
NULL, false)) {
|
||||||
l_info("Unable to register %s interface",
|
l_info("Unable to register %s interface",
|
||||||
IWD_KNOWN_NETWORKS_INTERFACE);
|
IWD_KNOWN_NETWORKS_INTERFACE);
|
||||||
return false;
|
return false;
|
||||||
|
@ -684,6 +684,11 @@ bool network_register(struct network *network, const char *path)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!l_dbus_object_add_interface(dbus_get_bus(), path,
|
||||||
|
L_DBUS_INTERFACE_PROPERTIES, network))
|
||||||
|
l_info("Unable to register %s interface",
|
||||||
|
L_DBUS_INTERFACE_PROPERTIES);
|
||||||
|
|
||||||
network->object_path = strdup(path);
|
network->object_path = strdup(path);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -718,7 +723,7 @@ void network_remove(struct network *network, int reason)
|
|||||||
void network_init()
|
void network_init()
|
||||||
{
|
{
|
||||||
if (!l_dbus_register_interface(dbus_get_bus(), IWD_NETWORK_INTERFACE,
|
if (!l_dbus_register_interface(dbus_get_bus(), IWD_NETWORK_INTERFACE,
|
||||||
setup_network_interface, NULL, true))
|
setup_network_interface, NULL, false))
|
||||||
l_error("Unable to register %s interface",
|
l_error("Unable to register %s interface",
|
||||||
IWD_NETWORK_INTERFACE);
|
IWD_NETWORK_INTERFACE);
|
||||||
|
|
||||||
|
@ -395,6 +395,12 @@ static void wiphy_register(struct wiphy *wiphy)
|
|||||||
IWD_WIPHY_INTERFACE, wiphy))
|
IWD_WIPHY_INTERFACE, wiphy))
|
||||||
l_info("Unable to add the %s interface to %s",
|
l_info("Unable to add the %s interface to %s",
|
||||||
IWD_WIPHY_INTERFACE, wiphy_get_path(wiphy));
|
IWD_WIPHY_INTERFACE, wiphy_get_path(wiphy));
|
||||||
|
|
||||||
|
if (!l_dbus_object_add_interface(dbus, wiphy_get_path(wiphy),
|
||||||
|
L_DBUS_INTERFACE_PROPERTIES, NULL))
|
||||||
|
l_info("Unable to add the %s interface to %s",
|
||||||
|
L_DBUS_INTERFACE_PROPERTIES,
|
||||||
|
wiphy_get_path(wiphy));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wiphy_dump_done(void *user)
|
static void wiphy_dump_done(void *user)
|
||||||
@ -724,7 +730,7 @@ bool wiphy_init(struct l_genl_family *in)
|
|||||||
if (!l_dbus_register_interface(dbus_get_bus(),
|
if (!l_dbus_register_interface(dbus_get_bus(),
|
||||||
IWD_WIPHY_INTERFACE,
|
IWD_WIPHY_INTERFACE,
|
||||||
setup_wiphy_interface,
|
setup_wiphy_interface,
|
||||||
NULL, true))
|
NULL, false))
|
||||||
l_error("Unable to register the %s interface",
|
l_error("Unable to register the %s interface",
|
||||||
IWD_WIPHY_INTERFACE);
|
IWD_WIPHY_INTERFACE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user