client: Add network_get_type

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

View File

@ -55,6 +55,17 @@ bool network_is_connected(const char *path)
return network->connected;
}
const char *network_get_type(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->type;
}
void network_connect(const struct proxy_interface *proxy)
{
if (!proxy)

View File

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