[Spice-devel] [PATCH 0/3] spice interface redesign.

Alexander Larsson alexl at redhat.com
Wed Mar 31 06:11:29 PDT 2010


On Wed, 2010-03-31 at 14:44 +0200, Gerd Hoffmann wrote:
> > struct SpiceImplementation {
> >         SpiceBaseInterface *interface;
> > };
> >
> > struct SpiceKeyboard {
> >         SpiceImplementation parent;
> > };
> 
> Those two are pretty simliar to SpiceInterfaceState and SpiceKbdState.
> 
> > struct KeyboardInterface {
> >      SpiceBaseInterface base;
> >
> >      void (*push_scan_freg)(SpiceKeyboard *keyboard, uint8_t frag);
> >      uint8_t (*get_leds)(SpiceKeyboard *keyboard);
> > };
> 
> I've considered something simliar, but decided to *not* do this.
> 
> I don't want to make the SpiceKbdState struct layout part of the
> library 
> interface, so we can easily extend it as needed without breaking the
> ABI.

I don't mean that SpiceKeyboard is the same as SpiceKbdState, i mean for
it to be exactly the struct above. Its just useful to get a pointer to
the interface from the instance.

There would still be a separate spice-side state object like
SpiceKbdState. And if we want to be able to pair the two we could return
it from spice_server_add() just like in your proposal.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's a one-legged native American barbarian on a search for his missing 
sister. She's a supernatural wisecracking barmaid with the power to bend men's 
minds. They fight crime! 



More information about the Spice-devel mailing list