X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Fafb%2Fafb-daemon-v1.h;h=8f5ed2f9fc32923f1a7e079d017bdeac859772ba;hb=773f7a7c16ade0617e59ab1f519ec145a7a9eed5;hp=6390dd1614020a131fca47a44a3a69cc90158b32;hpb=524ce4c40da3b25630dffdd80c5aca99364a3569;p=src%2Fapp-framework-binder.git diff --git a/include/afb/afb-daemon-v1.h b/include/afb/afb-daemon-v1.h index 6390dd16..8f5ed2f9 100644 --- a/include/afb/afb-daemon-v1.h +++ b/include/afb/afb-daemon-v1.h @@ -17,7 +17,7 @@ #pragma once -#include +#include "afb-daemon-common.h" /* * Retrieves the common systemd's event loop of AFB @@ -163,3 +163,13 @@ static inline int afb_daemon_queue_job_v1(struct afb_daemon daemon, void (*callb { return daemon.itf->queue_job(daemon.closure, callback, argument, group, timeout); } + +/* + * Tells that it requires the API of "name" to exist + * and if 'initialized' is not null to be initialized. + * Returns 0 in case of success or -1 in case of error. + */ +static inline int afb_daemon_require_api_v1(struct afb_daemon daemon, const char *name, int initialized) +{ + return daemon.itf->require_api(daemon.closure, name, initialized); +}