From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZ3OW-0008B0-LG for qemu-devel@nongnu.org; Thu, 06 Aug 2009 09:52:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZ3OS-00085f-3n for qemu-devel@nongnu.org; Thu, 06 Aug 2009 09:52:36 -0400 Received: from [199.232.76.173] (port=42898 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZ3OS-00085b-0E for qemu-devel@nongnu.org; Thu, 06 Aug 2009 09:52:32 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50403) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MZ3OR-0003rm-Gl for qemu-devel@nongnu.org; Thu, 06 Aug 2009 09:52:31 -0400 From: Luiz Capitulino Date: Thu, 6 Aug 2009 10:52:14 -0300 Message-Id: <1249566736-5020-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1249566736-5020-1-git-send-email-lcapitulino@redhat.com> References: <1249566736-5020-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 1/3] Introduce qobject header file List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, filip.navara@gmail.com, avi@redhat.com 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 --- 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 + * + * Based on ideas by Avi Kivity + * + * 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