static void embed_call_void(struct afb_req request, const char *method)
{
struct json_object *obj = jbus_call_sj_sync(jbus, method, "true");
- if (interface->verbose)
+ if (interface->verbosity)
fprintf(stderr, "(afm-main-plugin) %s(true) -> %s\n", method, obj ? json_object_to_json_string(obj) : "NULL");
if (obj == NULL) {
afb_req_fail(request, "failed", "framework daemon failure");
{
struct json_object *obj;
char *sid;
- const char *id = afb_req_argument(request, _id_);
+ const char *id = afb_req_value(request, _id_);
if (id == NULL) {
afb_req_fail(request, "bad-request", "missing 'id'");
return;
return;
}
obj = jbus_call_sj_sync(jbus, method, sid);
- if (interface->verbose)
+ if (interface->verbosity)
fprintf(stderr, "(afm-main-plugin) %s(%s) -> %s\n", method, sid, obj ? json_object_to_json_string(obj) : "NULL");
free(sid);
if (obj == NULL) {
static void call_runid(struct afb_req request, const char *method)
{
struct json_object *obj;
- const char *id = afb_req_argument(request, _runid_);
+ const char *id = afb_req_value(request, _runid_);
if (id == NULL) {
afb_req_fail(request, "bad-request", "missing 'runid'");
return;
}
obj = jbus_call_sj_sync(jbus, method, id);
- if (interface->verbose)
+ if (interface->verbosity)
fprintf(stderr, "(afm-main-plugin) %s(%s) -> %s\n", method, id,
obj ? json_object_to_json_string(obj) : "NULL");
if (obj == NULL) {
int rc;
/* get the id */
- id = afb_req_argument(request, _id_);
+ id = afb_req_value(request, _id_);
if (id == NULL) {
afb_req_fail(request, "bad-request", "missing 'id'");
return;
}
/* get the mode */
- mode = afb_req_argument(request, _mode_);
+ mode = afb_req_value(request, _mode_);
if (mode == NULL || !strcmp(mode, _auto_)) {
mode = interface->mode == AFB_MODE_REMOTE ? _remote_ : _local_;
}
/* calls the service */
obj = jbus_call_sj_sync(jbus, _start_, query);
- if (interface->verbose)
+ if (interface->verbosity)
fprintf(stderr, "(afm-main-plugin) start(%s) -> %s\n", query, obj ? json_object_to_json_string(obj) : "NULL");
free(query);
/* get the argument */
arg = afb_req_get(request, "widget");
- filename = arg.value;
- if (filename == NULL || !arg.is_file) {
+ filename = arg.path;
+ if (filename == NULL) {
afb_req_fail(request, "bad-request", "missing 'widget' file");
return;
}
}
obj = jbus_call_sj_sync(jbus, _install_, query);
- if (interface->verbose)
+ if (interface->verbosity)
fprintf(stderr, "(afm-main-plugin) install(%s) -> %s\n", query, obj ? json_object_to_json_string(obj) : "NULL");
free(query);