X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-dbus.c;h=ec47f2415b974c38cc1f0831d8611a330bbbc04c;hb=5d248158cc380d0a164fa56b46a7bdede4115407;hp=161c0941fce1344e2ec20ae4d681bb22ab8a7bb7;hpb=b529ded85a3e50a1aa6529e870b2e2f43e377ca2;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-dbus.c b/src/afb-api-dbus.c index 161c0941..ec47f241 100644 --- a/src/afb-api-dbus.c +++ b/src/afb-api-dbus.c @@ -576,6 +576,11 @@ static int api_dbus_client_on_manage_event(sd_bus_message *m, void *userdata, sd return 1; } +static struct afb_api_itf dbus_api_itf = { + .call = api_dbus_client_call, + .service_start = api_dbus_service_start +}; + /* adds a afb-dbus-service client api */ int afb_api_dbus_add_client(const char *path) { @@ -614,9 +619,7 @@ int afb_api_dbus_add_client(const char *path) /* record it as an API */ afb_api.closure = api; - afb_api.call = api_dbus_client_call; - afb_api.service_start = api_dbus_service_start; - afb_api.update_hooks = NULL; + afb_api.itf = &dbus_api_itf; if (afb_apis_add(api->api, afb_api) < 0) goto error2;