mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-19 11:09:25 +01:00
client: Proxy accessors
This commit is contained in:
parent
57fed9e5d2
commit
9eccb29ef3
@ -317,6 +317,25 @@ static void proxy_interface_destroy(void *data)
|
||||
l_free(proxy);
|
||||
}
|
||||
|
||||
void *proxy_interface_get_data(const struct proxy_interface *proxy)
|
||||
{
|
||||
return proxy->data;
|
||||
}
|
||||
|
||||
const char *proxy_interface_get_interface(const struct proxy_interface *proxy)
|
||||
{
|
||||
return proxy->type->interface;
|
||||
}
|
||||
|
||||
const char *proxy_interface_get_identity_str(
|
||||
const struct proxy_interface *proxy)
|
||||
{
|
||||
if (proxy->type->ops && proxy->type->ops->identity)
|
||||
return proxy->type->ops->identity(proxy->data);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void interfaces_added_callback(struct l_dbus_message *message,
|
||||
void *user_data)
|
||||
{
|
||||
|
@ -45,6 +45,8 @@ struct proxy_interface_type_ops {
|
||||
const struct proxy_interface *dependency);
|
||||
bool (*unbind_interface)(const struct proxy_interface *proxy,
|
||||
const struct proxy_interface *dependency);
|
||||
const char *(*identity)(void *data);
|
||||
void (*display)(const char *margin, const void *data);
|
||||
};
|
||||
|
||||
struct proxy_interface_type {
|
||||
@ -56,6 +58,11 @@ struct proxy_interface_type {
|
||||
struct proxy_interface *proxy_interface_find(const char *interface,
|
||||
const char *path);
|
||||
|
||||
void *proxy_interface_get_data(const struct proxy_interface *proxy);
|
||||
const char *proxy_interface_get_interface(const struct proxy_interface *proxy);
|
||||
const char *proxy_interface_get_identity_str(
|
||||
const struct proxy_interface *proxy);
|
||||
|
||||
void proxy_interface_type_register(
|
||||
const struct proxy_interface_type *interface_type);
|
||||
void proxy_interface_type_unregister(
|
||||
|
Loading…
Reference in New Issue
Block a user