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

Gerd Hoffmann kraxel at redhat.com
Wed Mar 31 05:44:03 PDT 2010


> 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.

> struct SpiceQxlDevice {
>         SpiceImplementation parent;
>         int id;
> };
>
> struct SpiceQxlInterface {
>         SpiceImplementation parent;
>         ...
> };

Yea, especially for QXL the "..." is likely to change as we cleanup the 
code base, going away from global variables everythere.

cheers,
   Gerd


More information about the Spice-devel mailing list