- obj = json_object_get(obj);
- obj = embed(method, obj);
+ free(memo);
+}
+
+static void embed_call_void(struct afb_req request, const char *method)
+{
+ struct memo *memo = make_memo(request, method);
+ if (memo == NULL)
+ afb_req_fail(request, "failed", "out of memory");
+ else if (jbus_call_sj(jbus, method, "true", (void*)embed_call_void_callback, memo) < 0) {
+ afb_req_fail(request, "failed", "dbus failure");
+ free(memo);
+ }
+}
+
+static void call_appid_callback(int status, struct json_object *obj, struct memo *memo)
+{
+ if (interface->verbosity)
+ fprintf(stderr, "(afm-main-plugin) %s -> %s\n", memo->method,
+ obj ? json_object_to_json_string(obj) : "NULL");