X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=bindings%2Fsamples%2FHelloWorld.c;h=134ea6207c8d540963c9225d064806a442a14056;hb=04241c8168fe8826b4fc7a80500577b50936b57a;hp=0b0d1a962ca22c5a8e92651de73a09dda297beab;hpb=b55a56d550d4a62a63e175f87c89a0a6c55e691e;p=src%2Fapp-framework-binder.git diff --git a/bindings/samples/HelloWorld.c b/bindings/samples/HelloWorld.c index 0b0d1a96..134ea620 100644 --- a/bindings/samples/HelloWorld.c +++ b/bindings/samples/HelloWorld.c @@ -428,6 +428,12 @@ static void appid (afb_req request) free(aid); } +static void uid (afb_req request) +{ + int uid = afb_req_get_uid(request); + afb_req_success_f(request, json_object_new_int(uid), "uid is %d", uid); +} + static int preinit() { AFB_NOTICE("hello binding comes to live"); @@ -468,6 +474,7 @@ static const afb_verb_v2 verbs[]= { { .verb="broadcast", .callback=broadcast }, { .verb="hasperm", .callback=hasperm }, { .verb="appid", .callback=appid }, + { .verb="uid", .callback=uid }, { .verb="exit", .callback=exitnow }, { .verb=NULL} };