3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-01-23 12:44:09 +01:00

client: Add network_get_name

This commit is contained in:
Denis Kenzior 2018-09-14 21:44:42 -05:00
parent b64ba2ba0e
commit 7e792071d3
2 changed files with 12 additions and 0 deletions

View File

@ -66,6 +66,17 @@ const char *network_get_type(const char *path)
return network->type; return network->type;
} }
const char *network_get_name(const char *path)
{
const struct network *network;
const struct proxy_interface *proxy =
proxy_interface_find(IWD_NETWORK_INTERFACE, path);
network = proxy_interface_get_data(proxy);
return network->name;
}
void network_connect(const struct proxy_interface *proxy) void network_connect(const struct proxy_interface *proxy)
{ {
if (!proxy) if (!proxy)

View File

@ -27,6 +27,7 @@ struct network_args {
bool network_is_connected(const char *path); bool network_is_connected(const char *path);
const char *network_get_type(const char *path); const char *network_get_type(const char *path);
const char *network_get_name(const char *path);
void network_connect(const struct proxy_interface *proxy); void network_connect(const struct proxy_interface *proxy);
char *network_name_completion(const struct proxy_interface *device, char *network_name_completion(const struct proxy_interface *device,