afb_req_fail_f(request, "not-granted", "permission %s NOT granted", perm?:"(null)");
}
+static void appid (afb_req request)
+{
+ char *aid = afb_req_get_application_id(request);
+ afb_req_success_f(request, aid ? json_object_new_string(aid) : NULL, "application is %s", aid?:"?");
+ free(aid);
+}
+
static int preinit()
{
AFB_NOTICE("hello binding comes to live");
{ .verb="verbose", .callback=verbose },
{ .verb="broadcast", .callback=broadcast },
{ .verb="hasperm", .callback=hasperm },
+ { .verb="appid", .callback=appid },
{ .verb="exit", .callback=exitnow },
{ .verb=NULL}
};