[banshee/gio-hardware] [Gio Hardware] Allow access to the parent udev device
- From: Alan McGovern <alanmc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/gio-hardware] [Gio Hardware] Allow access to the parent udev device
- Date: Sat, 24 Jul 2010 15:12:35 +0000 (UTC)
commit df1814793968deb7c06ddd999ebe6aaaa484940c
Author: Alan McGovern <alan mcgovern gmail com>
Date: Sat Jul 24 15:00:37 2010 +0100
[Gio Hardware] Allow access to the parent udev device
Expose a property in UdevMetadataSource so we can access the parent
device simply. This is useful for when we have a usb harddrive and need
to find the udev device which contains all the USB properties.
.../LowLevel/UdevMetadataSource.cs | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/UdevMetadataSource.cs b/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/UdevMetadataSource.cs
index 2cc597f..04cb12b 100644
--- a/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/UdevMetadataSource.cs
+++ b/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/UdevMetadataSource.cs
@@ -45,6 +45,10 @@ namespace Banshee.Hardware.Gio
get { return Device.Name; }
}
+ public UdevMetadataSource Parent {
+ get { return Device.Parent == null ? null : new UdevMetadataSource (Device.Parent); }
+ }
+
public string Product {
get { return Device.GetProperty ("PRODUCT"); }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]