From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuBjm-0003lm-Gr for qemu-devel@nongnu.org; Tue, 02 Jul 2013 21:20:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuBjl-0003VV-En for qemu-devel@nongnu.org; Tue, 02 Jul 2013 21:20:02 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39930 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuBjl-0003Um-5y for qemu-devel@nongnu.org; Tue, 02 Jul 2013 21:20:01 -0400 Message-ID: <51D37C39.8090801@suse.de> Date: Wed, 03 Jul 2013 03:19:53 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 01/26] sysbus: document SysBusDeviceClass about @init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao Cc: qemu-devel Am 01.07.2013 12:18, schrieb Hu Tao: > Signed-off-by: Hu Tao > --- > include/hw/sysbus.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) >=20 > diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h > index 7c2e316..9614758 100644 > --- a/include/hw/sysbus.h > +++ b/include/hw/sysbus.h > @@ -23,6 +23,16 @@ typedef struct SysBusDevice SysBusDevice; > #define SYS_BUS_DEVICE_GET_CLASS(obj) \ > OBJECT_GET_CLASS(SysBusDeviceClass, (obj), TYPE_SYS_BUS_DEVICE) > =20 > +/* > + * SysBusDeviceClass: > + * @parent_class: This is private Because it is private, the usual way is to suppress its documentation below via private/public markers. > + * @init: Callback function invoked when the #DeviceState::realized pr= operty > + * is changed to %true. Deprecated, new types inheriting directly from > + * TYPE_SYS_BUS_DEVICE should use #DeviceClass::realize instead, new l= eaf > + * types should consult their respective parent type. SysBusDeviceClas= s is > + * not implementing #DeviceClass::realize, so deriving classes can sim= ply > + * ignore it. > + */ > typedef struct SysBusDeviceClass { > DeviceClass parent_class; > =20 Thanks for documenting this. I'm queuing it with the following gtk-doc syntax and contential modifications, please let me know if you wish for any wording changes. Andreas diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index 9614758..8c17165 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -23,18 +23,20 @@ typedef struct SysBusDevice SysBusDevice; #define SYS_BUS_DEVICE_GET_CLASS(obj) \ OBJECT_GET_CLASS(SysBusDeviceClass, (obj), TYPE_SYS_BUS_DEVICE) -/* +/** * SysBusDeviceClass: - * @parent_class: This is private - * @init: Callback function invoked when the #DeviceState::realized property + * @init: Callback function invoked when the #DeviceState.realized prope= rty * is changed to %true. Deprecated, new types inheriting directly from - * TYPE_SYS_BUS_DEVICE should use #DeviceClass::realize instead, new lea= f - * types should consult their respective parent type. SysBusDeviceClass = is - * not implementing #DeviceClass::realize, so deriving classes can simpl= y - * ignore it. + * TYPE_SYS_BUS_DEVICE should use #DeviceClass.realize instead, new leaf + * types should consult their respective parent type. + * + * SysBusDeviceClass is not overriding #DeviceClass.realize, so derived + * classes overriding it are not required to invoke its implementation. */ typedef struct SysBusDeviceClass { + /*< private >*/ DeviceClass parent_class; + /*< public >*/ int (*init)(SysBusDevice *dev); } SysBusDeviceClass; --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg