Great :) Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx> On Sun, Mar 10, 2019 at 04:46:12PM +0200, Yuri Benditovich wrote: > Remove unused code related to GUdevDevice. > > Signed-off-by: Yuri Benditovich <yuri.benditovich@xxxxxxxxxx> > --- > src/win-usb-dev.c | 74 ----------------------------------------------- > src/win-usb-dev.h | 27 ----------------- > 2 files changed, 101 deletions(-) > > diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c > index f42ab86..f80f377 100644 > --- a/src/win-usb-dev.c > +++ b/src/win-usb-dev.c > @@ -49,31 +49,6 @@ G_DEFINE_TYPE_WITH_CODE(GUdevClient, g_udev_client, G_TYPE_OBJECT, > G_ADD_PRIVATE(GUdevClient) > G_IMPLEMENT_INTERFACE(G_TYPE_INITABLE, g_udev_client_initable_iface_init)) > > - > -typedef struct _GUdevDeviceInfo GUdevDeviceInfo; > - > -struct _GUdevDeviceInfo { > - guint16 bus; > - guint16 addr; > - guint16 vid; > - guint16 pid; > - guint16 class; > - gchar sclass[4]; > - gchar sbus[4]; > - gchar saddr[4]; > - gchar svid[8]; > - gchar spid[8]; > -}; > - > -struct _GUdevDevicePrivate > -{ > - /* FixMe: move above fields to this structure and access them directly */ > - GUdevDeviceInfo *udevinfo; > -}; > - > -G_DEFINE_TYPE_WITH_PRIVATE(GUdevDevice, g_udev_device, G_TYPE_OBJECT) > - > - > enum > { > UEVENT_SIGNAL, > @@ -452,55 +427,6 @@ static LRESULT CALLBACK wnd_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM > return DefWindowProc(hwnd, message, wparam, lparam); > } > > -/*** GUdevDevice ***/ > - > -static void g_udev_device_finalize(GObject *object) > -{ > - GUdevDevice *device = G_UDEV_DEVICE(object); > - > - g_free(device->priv->udevinfo); > - if (G_OBJECT_CLASS(g_udev_device_parent_class)->finalize != NULL) > - (* G_OBJECT_CLASS(g_udev_device_parent_class)->finalize)(object); > -} > - > -static void g_udev_device_class_init(GUdevDeviceClass *klass) > -{ > - GObjectClass *gobject_class = (GObjectClass *) klass; > - > - gobject_class->finalize = g_udev_device_finalize; > -} > - > -static void g_udev_device_init(GUdevDevice *device) > -{ > - device->priv = g_udev_device_get_instance_private(device); > -} > - > -const gchar *g_udev_device_get_property(GUdevDevice *udev, const gchar *property) > -{ > - GUdevDeviceInfo* udevinfo; > - > - g_return_val_if_fail(G_UDEV_DEVICE(udev), NULL); > - g_return_val_if_fail(property != NULL, NULL); > - > - udevinfo = udev->priv->udevinfo; > - g_return_val_if_fail(udevinfo != NULL, NULL); > - > - if (g_strcmp0(property, "BUSNUM") == 0) { > - return udevinfo->sbus; > - } else if (g_strcmp0(property, "DEVNUM") == 0) { > - return udevinfo->saddr; > - } else if (g_strcmp0(property, "DEVTYPE") == 0) { > - return "usb_device"; > - } else if (g_strcmp0(property, "VID") == 0) { > - return udevinfo->svid; > - } else if (g_strcmp0(property, "PID") == 0) { > - return udevinfo->spid; > - } > - > - g_warn_if_reached(); > - return NULL; > -} > - > #ifdef DEBUG_GUDEV_DEVICE_LISTS > static void g_udev_device_print_list(GList *l, const gchar *msg) > { > diff --git a/src/win-usb-dev.h b/src/win-usb-dev.h > index 2f899e0..c04f200 100644 > --- a/src/win-usb-dev.h > +++ b/src/win-usb-dev.h > @@ -26,30 +26,6 @@ > > G_BEGIN_DECLS > > -/* GUdevDevice */ > - > -#define G_UDEV_TYPE_DEVICE (g_udev_device_get_type()) > -#define G_UDEV_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), G_UDEV_TYPE_DEVICE, GUdevDevice)) > -#define G_UDEV_DEVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_UDEV_TYPE_DEVICE, GUdevDeviceClass)) > -#define G_UDEV_IS_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_UDEV_TYPE_DEVICE)) > -#define G_UDEV_IS_DEVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), G_UDEV_TYPE_DEVICE)) > -#define G_UDEV_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), G_UDEV_TYPE_DEVICE, GUdevDeviceClass)) > - > -typedef struct _GUdevDevice GUdevDevice; > -typedef struct _GUdevDeviceClass GUdevDeviceClass; > -typedef struct _GUdevDevicePrivate GUdevDevicePrivate; > - > -struct _GUdevDevice > -{ > - GObject parent; > - GUdevDevicePrivate *priv; > -}; > - > -struct _GUdevDeviceClass > -{ > - GObjectClass parent_class; > -}; > - > /* GUdevClient */ > > #define G_UDEV_TYPE_CLIENT (g_udev_client_get_type()) > @@ -83,9 +59,6 @@ GUdevClient *g_udev_client_new(void); > libusb_context *g_udev_client_get_context(GUdevClient *client); > void g_udev_client_report_devices(GUdevClient *client); > > -GType g_udev_device_get_type(void) G_GNUC_CONST; > -const gchar *g_udev_device_get_property(GUdevDevice *udev, const gchar *property); > - > GQuark g_udev_client_error_quark(void); > #define G_UDEV_CLIENT_ERROR g_udev_client_error_quark() > > -- > 2.17.1 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/spice-devel
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel