#include "utils-sbus.h"
#include "utils-jbus.h"
+static const char _added_[] = "added";
static const char _auto_[] = "auto";
static const char _continue_[] = "continue";
static const char _changed_[] = "changed";
afb_req_fail(request, "failed", "framework daemon failure");
return;
}
+ obj = json_object_get(obj);
obj = embed(method, obj);
if (obj == NULL) {
afb_req_fail(request, "failed", "framework daemon failure");
afb_req_fail(request, "failed", "framework daemon failure");
return;
}
+ obj = json_object_get(obj);
afb_req_success(request, obj, NULL);
}
afb_req_fail(request, "failed", "framework daemon failure");
return;
}
+ obj = json_object_get(obj);
afb_req_success(request, obj, NULL);
}
free(query);
/* check status */
+ obj = json_object_get(obj);
if (obj == NULL) {
afb_req_fail(request, "failed", "framework daemon failure");
return;
static void install(struct afb_req request)
{
- struct json_object *obj;
+ struct json_object *obj, *added;
char *query;
const char *filename;
struct afb_arg arg;
obj = jbus_call_sj_sync(jbus, _install_, query);
if (interface->verbosity)
+;
fprintf(stderr, "(afm-main-plugin) install(%s) -> %s\n", query,
obj ? json_object_to_json_string(obj) : "NULL");
free(query);
}
/* embed if needed */
+ if (json_object_object_get_ex(obj, _added_, &added))
+ obj = added;
+ obj = json_object_get(obj);
obj = embed(_id_, obj);
afb_req_success(request, obj, NULL);
}