+ /* fulfill the response structure */
+ resp->jbus = jbus;
+ resp->onresp_s = onresp_s;
+ resp->onresp_j = onresp_j;
+ resp->data = data;
+
+ rc = sd_bus_call_method_async(jbus->sdbus, NULL, jbus->name, jbus->path, jbus->name, method, (void*)on_reply, resp, "s", query);
+ if (rc < 0) {
+ errno = -rc;
+ goto error2;
+ }
+
+ return 0;
+
+ error2:
+ free(resp);
+ error:
+ return -1;
+}
+
+/********************* MAIN FUNCTIONS *****************************************/
+
+/*
+ * Creates a 'jbus' bound the 'path' and it derived names and linked
+ * either to the DBUS SYSTEM when 'session' is nul or to the DBUS SESSION
+ * if 'session' is not nul.
+ *
+ * The parameter 'path' is intended to be the path of a DBUS single object.
+ * Single means that it exists only one instance of the object on the
+ * given bus. That path implies 2 derived DBUS names:
+ * 1. the destination name of the program that handles the object
+ * 2. the interface name of the object
+ * These names are derived by removing the heading slash (/) and
+ * by replacing all occurences of slashes by dots.
+ * For example, passing path = /a/b/c means that the object /a/b/c is
+ * handled by the destination a.b.c and replies to the interface a.b.c
+ *
+ * Returns the created jbus or NULL in case of error.
+ */
+struct jbus *create_jbus(struct sd_bus *sdbus, const char *path)