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