qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] qapi: add libqmp.c and libqmp.h


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH] qapi: add libqmp.c and libqmp.h
Date: Sun, 6 Mar 2011 19:29:51 -0600

Not for committing

diff --git a/libqmp.c b/libqmp.c
new file mode 100644
index 0000000..9d90f01
--- /dev/null
+++ b/libqmp.c
@@ -0,0 +1,69 @@
+/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT */
+
+#include "libqmp.h"
+#include "libqmp-internal.h"
+
+
+struct VersionInfo * libqmp_query_version(QmpSession *qmp__session, Error 
**qmp__err)
+{
+    QDict *qmp__args = qdict_new();
+    Error *qmp__local_err = NULL;
+    QObject *qmp__retval = NULL;
+    struct VersionInfo * qmp__native_retval = 0;
+
+    qmp__retval = qmp__session->dispatch(qmp__session, "query-version", 
qmp__args, &qmp__local_err);
+
+    QDECREF(qmp__args);
+
+    if (!qmp__local_err) {
+        qmp__native_retval = qmp_unmarshal_type_VersionInfo(qmp__retval, 
&qmp__local_err);
+        qobject_decref(qmp__retval);
+    }
+    error_propagate(qmp__err, qmp__local_err);
+    return qmp__native_retval;
+}
+
+void libqmp_quit(QmpSession *qmp__session, Error **qmp__err)
+{
+    QDict *qmp__args = qdict_new();
+    Error *qmp__local_err = NULL;
+    QObject *qmp__retval = NULL;
+
+    qmp__retval = qmp__session->dispatch(qmp__session, "quit", qmp__args, 
&qmp__local_err);
+
+    QDECREF(qmp__args);
+    qobject_decref(qmp__retval);
+    error_propagate(qmp__err, qmp__local_err);
+}
+
+void libqmp_qmp_capabilities(QmpSession *qmp__session, Error **qmp__err)
+{
+    QDict *qmp__args = qdict_new();
+    Error *qmp__local_err = NULL;
+    QObject *qmp__retval = NULL;
+
+    qmp__retval = qmp__session->dispatch(qmp__session, "qmp_capabilities", 
qmp__args, &qmp__local_err);
+
+    QDECREF(qmp__args);
+    qobject_decref(qmp__retval);
+    error_propagate(qmp__err, qmp__local_err);
+}
+
+void libqmp_put_event(QmpSession *qmp__session, int64_t tag, Error **qmp__err)
+{
+    QDict *qmp__args = qdict_new();
+    Error *qmp__local_err = NULL;
+    QObject *qmp__retval = NULL;
+
+    qdict_put_obj(qmp__args, "tag", qmp_marshal_type_int(tag));
+
+    qmp__retval = qmp__session->dispatch(qmp__session, "put-event", qmp__args, 
&qmp__local_err);
+
+    QDECREF(qmp__args);
+    qobject_decref(qmp__retval);
+    error_propagate(qmp__err, qmp__local_err);
+}
+
+void libqmp_init_events(QmpSession *sess)
+{
+}
diff --git a/libqmp.h b/libqmp.h
new file mode 100644
index 0000000..da6c5e1
--- /dev/null
+++ b/libqmp.h
@@ -0,0 +1,11 @@
+/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT */
+#ifndef LIBQMP_H
+#define LIBQMP_H
+
+#include "libqmp-core.h"
+
+struct VersionInfo * libqmp_query_version(QmpSession *qmp__session, Error 
**qmp__err);
+void libqmp_quit(QmpSession *qmp__session, Error **qmp__err);
+void libqmp_qmp_capabilities(QmpSession *qmp__session, Error **qmp__err);
+void libqmp_put_event(QmpSession *qmp__session, int64_t tag, Error **qmp__err);
+#endif
-- 
1.7.0.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]