From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39431 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pzv7f-0006ny-BF for qemu-devel@nongnu.org; Wed, 16 Mar 2011 14:07:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pzv7c-0008Va-Ei for qemu-devel@nongnu.org; Wed, 16 Mar 2011 14:07:03 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:64825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pzv7c-0008VJ-CS for qemu-devel@nongnu.org; Wed, 16 Mar 2011 14:07:00 -0400 Received: by yxk8 with SMTP id 8so926583yxk.4 for ; Wed, 16 Mar 2011 11:06:59 -0700 (PDT) Message-ID: <4D80FC3E.7040606@codemonkey.ws> Date: Wed, 16 Mar 2011 13:06:54 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 00/15] QAPI Round 1 (core code generator) (v2) References: <1299884745-521-1-git-send-email-aliguori@us.ibm.com> <20110316113428.21c599a3@doriath> <4D80CE17.7010005@redhat.com> <4D80DF60.1000703@codemonkey.ws> <4D80E5F0.3020302@redhat.com> In-Reply-To: <4D80E5F0.3020302@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Luiz Capitulino , Avi Kivity , Adam Litke , Markus Armbruster , qemu-devel@nongnu.org On 03/16/2011 11:31 AM, Paolo Bonzini wrote: > On 03/16/2011 05:03 PM, Anthony Liguori wrote: >> So for an event, you just need to do: >> >> { 'signal': 'vnc-connected', 'data': { 'client': 'VncClientInfo' } } >> >> And you can add new fields to the VncClientInfo structure as much as >> you'd like without worrying about breaking the C ABI. > > So why couldn't you automatically wrap the events data field in a > structure (e.g. vnc-connected events receive a VncConnectedEventData*)? You could, but is it really necessary or even useful? I don't see signals as being any different than function calls. You could do the same thing for function calls. A good example is the vnc-connected event. I didn't post the full event, it's reall: { ' signal': 'vnc-connected', 'data': { 'client': 'VncClientInfo', 'server': 'VncServerInfo' } } You could add an automatic structure around these two members but that makes the C interface quite a bit more awkward for no obvious gain. Regards, Anthony Liguori > Paolo >