qemu-devel
[Top][All Lists]
Advanced

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

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


From: malc
Subject: Re: [Qemu-devel] [PATCH 1/3] Introduce qobject header file
Date: Thu, 6 Aug 2009 19:54:07 +0400 (MSD)

On Thu, 6 Aug 2009, Luiz Capitulino wrote:

> 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;

Please do not use _t suffix.

> +
> +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 */
> 

-- 
mailto:address@hidden




reply via email to

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