X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Fafb%2Fafb-binding.hpp;h=6e7d4c2e271c63f8892b5a86c07eaf307b67fd82;hb=refs%2Ftags%2F4.99.4;hp=1fc8b497fbe13c49ed1aaa6e61e70224ad76fd86;hpb=70fe993324e901254c3e42225f9e5f5d111b1b14;p=src%2Fapp-framework-binder.git diff --git a/include/afb/afb-binding.hpp b/include/afb/afb-binding.hpp index 1fc8b497..6e7d4c2e 100644 --- a/include/afb/afb-binding.hpp +++ b/include/afb/afb-binding.hpp @@ -110,7 +110,8 @@ public: int broadcast(json_object *object) const; int push(json_object *object) const; - void drop(); + void unref(); + void addref(); const char *name() const; }; @@ -219,6 +220,8 @@ public: bool has_permission(const char *permission) const; char *get_application_id() const; + + int get_uid() const; }; /*************************************************************************/ @@ -261,7 +264,8 @@ inline void event::invalidate() { event_.itf = NULL; event_.closure = NULL; } inline int event::broadcast(json_object *object) const { return afb_event_broadcast(event_, object); } inline int event::push(json_object *object) const { return afb_event_push(event_, object); } -inline void event::drop() { afb_event_drop(event_); invalidate(); } +inline void event::unref() { afb_event_unref(event_); invalidate(); } +inline void event::addref() { afb_event_addref(event_); } inline const char *event::name() const { return afb_event_name(event_); } /* args */ @@ -401,6 +405,11 @@ inline char *req::get_application_id() 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(); }