[banshee] [Hardware.Gio] Allow access to the parent udev device



commit c5721315c7c73340f403743ab7ac188dbbc9c047
Author: Alan McGovern <alan mcgovern gmail com>
Date:   Sat Jul 24 15:00:37 2010 +0100

    [Hardware.Gio] 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]