[Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-01-02 Thread Wenchao Xia
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", all types have prefix "QAPIEvent". Examples can be found in following patches. The script mainly include three parts: generate API

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-01-06 Thread Luiz Capitulino
[Pressed enter too soon, forgot two things] On Mon, 6 Jan 2014 18:10:04 -0500 Luiz Capitulino wrote: > On Fri, 3 Jan 2014 07:10:32 +0800 > 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 q

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-01-06 Thread Luiz Capitulino
On Fri, 3 Jan 2014 07:10:32 +0800 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", all types have prefix "QAPIEvent". > Examples can be found in followi

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-01-06 Thread Wenchao Xia
diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py new file mode 100644 index 000..7526366 --- /dev/null +++ b/scripts/qapi-event.py @@ -0,0 +1,432 @@ +# +# QAPI event generator +# +# Copyright IBM, Corp. 2014 +# +# Authors: +# Wenchao Xia +# +# This work is licensed under the terms

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-01-06 Thread Wenchao Xia
+ + +# Following are the functions that generate event behavior control functions. +# Those functions are put here in the qapi-event.c, since it need to include +# qapi-event.h for the event enum type declaration, put them in other file +# requiring other file include qapi-event.h, causing a cross

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-02-13 Thread Wenchao Xia
于 2014/1/7 11:24, Wenchao Xia 写道: + + +# Following are the functions that generate event behavior control functions. +# Those functions are put here in the qapi-event.c, since it need to include +# qapi-event.h for the event enum type declaration, put them in other file +# requiring other file in

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-03-18 Thread Wenchao Xia
于 2014/3/7 2:49, Eric Blake 写道: On 01/02/2014 04:10 PM, 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", all types have prefix "QAPIEvent". Examples can be fo

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-03-20 Thread Eric Blake
On 03/18/2014 08:38 PM, Wenchao Xia wrote: > 于 2014/3/7 2:49, Eric Blake 写道: >> On 01/02/2014 04:10 PM, 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_even

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-03-23 Thread Wenchao Xia
于 2014/3/21 6:29, Eric Blake 写道: On 03/18/2014 08:38 PM, Wenchao Xia wrote: 于 2014/3/7 2:49, Eric Blake 写道: On 01/02/2014 04:10 PM, 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 h

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-03-26 Thread Markus Armbruster
Wenchao Xia writes: > 于 2014/3/21 6:29, Eric Blake 写道: >> On 03/18/2014 08:38 PM, Wenchao Xia wrote: >>> 于 2014/3/7 2:49, Eric Blake 写道: On 01/02/2014 04:10 PM, Wenchao Xia wrote: > qapi-event.py will parse the schema and generate qapi-event.c, then > the API in qapi-event.c can be u

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-03-26 Thread Benoît Canet
The Wednesday 26 Mar 2014 à 13:42:38 (+0100), Markus Armbruster wrote : > Wenchao Xia writes: > > > 于 2014/3/21 6:29, Eric Blake 写道: > >> On 03/18/2014 08:38 PM, Wenchao Xia wrote: > >>> 于 2014/3/7 2:49, Eric Blake 写道: > On 01/02/2014 04:10 PM, Wenchao Xia wrote: > > qapi-event.py will p

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-03-27 Thread Wenchao Xia
You may need to rebase this on top of other patches that refactor the qapi generators to track the input file, for improved error messages. It seems qapi-visit.py and qapi-types.py remains the same as above in upstream, which kind of change are your referring to? Lluís' patch to use an exp

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-03-06 Thread Eric Blake
On 01/02/2014 04:10 PM, 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", all types have prefix "QAPIEvent". > Examples can be found in following patches. >