diff options
author | Richard Hughes <richard@hughsie.com> | 2015-11-10 11:53:39 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-11-10 11:53:42 +0000 |
commit | 7561b53eed51776b393e0b5e270cb07d637835a9 (patch) | |
tree | ec5fd864c56b89c7b933f503957d6cec8b54fe66 | |
parent | 6cdb5bd7fd82d3ec3b5ef06b7f849d1269a95069 (diff) | |
download | gusb-7561b53eed51776b393e0b5e270cb07d637835a9.tar.gz |
Allow getting the GUsbContext from the GUsbDevice
This semi-private feature allows us to deal with resetting GUsbDevices that
come back with different VID:PID values.
-rw-r--r-- | gusb/gusb-device.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c index a13e092..ca8ec59 100644 --- a/gusb/gusb-device.c +++ b/gusb/gusb-device.c @@ -116,6 +116,9 @@ g_usb_device_get_property (GObject *object, case PROP_LIBUSB_DEVICE: g_value_set_pointer (value, priv->device); break; + case PROP_CONTEXT: + g_value_set_object (value, priv->context); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -195,7 +198,7 @@ g_usb_device_class_init (GUsbDeviceClass *klass) g_param_spec_object ("context", NULL, NULL, G_USB_TYPE_CONTEXT, G_PARAM_CONSTRUCT_ONLY| - G_PARAM_WRITABLE); + G_PARAM_READWRITE); /** * GUsbDevice:platform-id: |