bool has_permission(const char *permission) const;
char *get_application_id() const;
+
+ int get_uid() const;
};
/*************************************************************************/
return req_.itf->get_application_id(req_.closure);
}
+inline int req::get_uid() const
+{
+ return req_.itf->get_uid(req_.closure);
+}
+
/* commons */
inline struct sd_event *get_event_loop()
{ return afb_daemon_get_event_loop_v2(); }
return r;
}
-const afb_binding_v2 binding(const char *name, const struct afb_verb_v2 *verbs, const char *info = nullptr, int (*init)() = nullptr, const char *specification = nullptr, void (*onevent)(const char*, struct json_object*) = nullptr, bool noconcurrency = false, int (*preinit)() = nullptr)
+constexpr afb_binding_v2 binding(const char *name, const struct afb_verb_v2 *verbs, const char *info = nullptr, int (*init)() = nullptr, const char *specification = nullptr, void (*onevent)(const char*, struct json_object*) = nullptr, bool noconcurrency = false, int (*preinit)() = nullptr)
{
afb_binding_v2 r = { 0, 0, 0, 0, 0, 0, 0, 0 };
r.api = name;