[Spice-devel] [PATCH 2/2] server: add subtype to SpiceCharDeviceInterface, use for vdagent

Alexander Larsson alexl at redhat.com
Thu Aug 26 06:44:21 PDT 2010


On Thu, 2010-08-26 at 04:45 -0400, Alon Levy wrote:

> diff --git a/server/spice-experimental.h b/server/spice-experimental.h
> index e40b3ec..fd8ef67 100644
> --- a/server/spice-experimental.h
> +++ b/server/spice-experimental.h
> @@ -10,6 +10,7 @@ typedef struct SpiceCharDeviceState SpiceCharDeviceState;
>  struct SpiceCharDeviceInterface {
>      SpiceBaseInterface base;
>  
> +    const char* (*subtype)(SpiceCharDeviceInstance *sin);
>      void (*state)(SpiceCharDeviceInstance *sin, int connected);
>      int (*write)(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len);
>      int (*read)(SpiceCharDeviceInstance *sin, uint8_t *buf, int len);
> @@ -21,6 +22,7 @@ struct SpiceCharDeviceInstance {
>  };

I think you should move this from a method on the interface to a const
char * on the instance.



More information about the Spice-devel mailing list