Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
sig-monitor: Handle signals in exit
[src/app-framework-binder.git]
/
bindings
/
samples
/
HelloWorld.c
diff --git
a/bindings/samples/HelloWorld.c
b/bindings/samples/HelloWorld.c
index
0b0d1a9
..
134ea62
100644
(file)
--- a/
bindings/samples/HelloWorld.c
+++ b/
bindings/samples/HelloWorld.c
@@
-428,6
+428,12
@@
static void appid (afb_req request)
free(aid);
}
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");
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="broadcast", .callback=broadcast },
{ .verb="hasperm", .callback=hasperm },
{ .verb="appid", .callback=appid },
+ { .verb="uid", .callback=uid },
{ .verb="exit", .callback=exitnow },
{ .verb=NULL}
};
{ .verb="exit", .callback=exitnow },
{ .verb=NULL}
};