3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

client: Proxy method call

This commit is contained in:
Tim Kourt 2017-04-18 14:42:45 -07:00 committed by Denis Kenzior
parent 0ada918031
commit 702be02527
2 changed files with 26 additions and 0 deletions

View File

@ -346,6 +346,28 @@ static void proxy_interface_destroy(void *data)
l_free(proxy); l_free(proxy);
} }
bool proxy_interface_method_call(const struct proxy_interface *proxy,
const char *name, const char *signature,
l_dbus_message_func_t callback, ...)
{
struct l_dbus_message *call;
va_list args;
if (!proxy || !name)
return false;
call = l_dbus_message_new_method_call(dbus, IWD_SERVICE, proxy->path,
proxy->type->interface, name);
va_start(args, callback);
l_dbus_message_set_arguments_valist(call, signature, args);
va_end(args);
l_dbus_send_with_reply(dbus, call, callback, (void *) proxy, NULL);
return true;
}
void *proxy_interface_get_data(const struct proxy_interface *proxy) void *proxy_interface_get_data(const struct proxy_interface *proxy)
{ {
return proxy->data; return proxy->data;

View File

@ -64,6 +64,10 @@ struct l_queue *proxy_interface_find_all(const char *interface,
proxy_property_match_func_t function, proxy_property_match_func_t function,
const void *value); const void *value);
bool proxy_interface_method_call(const struct proxy_interface *proxy,
const char *name, const char *signature,
l_dbus_message_func_t callback, ...);
void *proxy_interface_get_data(const struct proxy_interface *proxy); 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_interface(const struct proxy_interface *proxy);
const char *proxy_interface_get_identity_str( const char *proxy_interface_get_identity_str(