From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wx6dE-0008EH-6r for qemu-devel@nongnu.org; Tue, 17 Jun 2014 23:33:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wx6d9-0000ea-Bb for qemu-devel@nongnu.org; Tue, 17 Jun 2014 23:33:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wx6d9-0000eF-3m for qemu-devel@nongnu.org; Tue, 17 Jun 2014 23:33:47 -0400 Message-ID: <53A10894.60500@redhat.com> Date: Tue, 17 Jun 2014 21:33:40 -0600 From: Eric Blake MIME-Version: 1.0 References: <1401970944-18735-1-git-send-email-wenchaoqemu@gmail.com> <1401970944-18735-4-git-send-email-wenchaoqemu@gmail.com> In-Reply-To: <1401970944-18735-4-git-send-email-wenchaoqemu@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="E9CKQXQS1sPfeP89MLCkghBg3UMBcwW2S" Subject: Re: [Qemu-devel] [PATCH V6 03/29] qapi script: add event support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia , qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com, armbru@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --E9CKQXQS1sPfeP89MLCkghBg3UMBcwW2S Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/05/2014 06:21 AM, Wenchao Xia wrote: > qapi-event.py will parse the schema and generate qapi-event.c, then > the API in qapi-event.c can be used to handle event in qemu code. > All API have prefix "qapi_event". >=20 > The script mainly includes two parts: generate API for each event > define, generate an enum type for all defined events. >=20 > Since in some cases the real emit behavior may change, for example, > qemu-img would not send a event, a callback layer is used to > control the behavior. As a result, the stubs at compile time > can be saved, the binding of block layer code and monitor code > will become looser. >=20 > +++ b/scripts/qapi-event.py > @@ -0,0 +1,369 @@ > +# > +# QAPI event generator > +# > +# Copyright (c) 2014 Wenchao Xia > +# > +# Authors: > +# Wenchao Xia > +# > +# This work is licensed under the terms of the GNU GPL, version 2. > +# See the COPYING file in the top-level directory. Any reason this can't be GPLv2+ instead of GPLv2-only? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --E9CKQXQS1sPfeP89MLCkghBg3UMBcwW2S Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJToQiUAAoJEKeha0olJ0Nq/MkH/0uTrP2m3FSNsF23hzupraVh cgb08TU8uuZ7y/W1Ch9o/yr05lqqu28RFNy+9cRaV1BRgoVg/j2+lcx553fr64hb vGfgCvquDkm0slOyQEd5dVEqOcEsHY/7y1rZ7DaAJSh36UNDR61AdLUIkTJhciAZ MAfq9mRMBWLYkkeNQAqbLV88ZjKI76ibJy1yDXE+gcF2M4NpzXmY9kVdeUmKpPDx vAV+D/8Ne3mz7Ag1iAinJ2Md0oJHtdPBabbye4b8f1pDoxmNg4UgqPIzu3zo4SWt J8lc2jSNfUQWjz4e0YOCejm9vfHUsvod5iSa4oBfMI76LEeVoB3QgzRgzHSBh04= =vDKK -----END PGP SIGNATURE----- --E9CKQXQS1sPfeP89MLCkghBg3UMBcwW2S--