mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-29 22:19:23 +01:00
network: Add network_register
This commit is contained in:
parent
d1948c0233
commit
d0ae833edb
@ -331,6 +331,21 @@ void network_emit_removed(struct network *network)
|
|||||||
l_dbus_send(dbus, signal);
|
l_dbus_send(dbus, signal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool network_register(struct network *network, const char *path)
|
||||||
|
{
|
||||||
|
if (!l_dbus_object_add_interface(dbus_get_bus(), path,
|
||||||
|
IWD_NETWORK_INTERFACE, network)) {
|
||||||
|
l_info("Unable to register %s interface",
|
||||||
|
IWD_NETWORK_INTERFACE);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
network->object_path = strdup(path);
|
||||||
|
network_emit_added(network);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void network_init()
|
void network_init()
|
||||||
{
|
{
|
||||||
networks = l_queue_new();
|
networks = l_queue_new();
|
||||||
|
@ -60,5 +60,7 @@ void network_sync_psk(struct network *network);
|
|||||||
void network_emit_added(struct network *network);
|
void network_emit_added(struct network *network);
|
||||||
void network_emit_removed(struct network *network);
|
void network_emit_removed(struct network *network);
|
||||||
|
|
||||||
|
bool network_register(struct network *network, const char *path);
|
||||||
|
|
||||||
void network_init();
|
void network_init();
|
||||||
void network_exit();
|
void network_exit();
|
||||||
|
Loading…
Reference in New Issue
Block a user