qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 1/3] Introduce qobject header file


From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH 1/3] Introduce qobject header file
Date: Thu, 6 Aug 2009 10:52:14 -0300

This file contains basic definitions for the QEMU Object Model,
all object implementions must include this file and add its
type code in qtype_t enum.

Signed-off-by: Luiz Capitulino <address@hidden>
---
 qobject.h |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)
 create mode 100644 qobject.h

diff --git a/qobject.h b/qobject.h
new file mode 100644
index 0000000..b70e669
--- /dev/null
+++ b/qobject.h
@@ -0,0 +1,33 @@
+/*
+ * QEMU Object Model.
+ *
+ * Copyright (C) 2009 Red Hat Inc.
+ *
+ * Authors:
+ *  Luiz Capitulino <address@hidden>
+ *
+ * Based on ideas by Avi Kivity <address@hidden>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ */
+#ifndef QOBJECT_H
+#define QOBJECT_H
+
+typedef enum {
+    QTYPE_NONE,
+} qtype_t;
+
+struct QObject;
+
+typedef struct QType {
+    qtype_t code;
+    struct QObject *(*clone)(const struct QObject *);
+    void (*destroy)(struct QObject *);
+} QType;
+
+typedef struct QObject {
+    QType *type;
+} QObject;
+
+#endif /* QOBJECT_H */
-- 
1.6.4.rc3.12.gdf73a





reply via email to

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