[gnome-disk-utility] export new property device-detection-time



commit 78f9ee32e22ceae27b087643a6dbf8a0cd040502
Author: David Zeuthen <davidz redhat com>
Date:   Wed Apr 15 11:17:19 2009 -0400

    export new property device-detection-time
---
 src/gdu/gdu-device.c |    9 +++++++++
 src/gdu/gdu-device.h |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/gdu/gdu-device.c b/src/gdu/gdu-device.c
index 5aa1a4a..c74cd21 100644
--- a/src/gdu/gdu-device.c
+++ b/src/gdu/gdu-device.c
@@ -46,6 +46,7 @@ typedef struct
 {
         char *native_path;
 
+        guint64  device_detection_time;
         gint64   device_major;
         gint64   device_minor;
         char    *device_file;
@@ -176,6 +177,8 @@ collect_props (const char *key, const GValue *value, DeviceProperties *props)
         if (strcmp (key, "native-path") == 0)
                 props->native_path = g_strdup (g_value_get_string (value));
 
+        else if (strcmp (key, "device-detection-time") == 0)
+                props->device_detection_time = g_value_get_uint64 (value);
         else if (strcmp (key, "device-major") == 0)
                 props->device_major = g_value_get_int64 (value);
         else if (strcmp (key, "device-minor") == 0)
@@ -736,6 +739,12 @@ gdu_device_find_parent (GduDevice *device)
         return parent;
 }
 
+guint64
+gdu_device_get_detection_time (GduDevice *device)
+{
+        return device->priv->props->device_detection_time;
+}
+
 dev_t
 gdu_device_get_dev (GduDevice *device)
 {
diff --git a/src/gdu/gdu-device.h b/src/gdu/gdu-device.h
index c7287ea..bb7d1ae 100644
--- a/src/gdu/gdu-device.h
+++ b/src/gdu/gdu-device.h
@@ -68,6 +68,7 @@ GduDevice  *gdu_device_find_parent           (GduDevice   *device);
 GduPool    *gdu_device_get_pool              (GduDevice   *device);
 
 dev_t gdu_device_get_dev (GduDevice *device);
+guint64 gdu_device_get_detection_time (GduDevice *device);
 const char *gdu_device_get_device_file (GduDevice *device);
 guint64 gdu_device_get_size (GduDevice *device);
 guint64 gdu_device_get_block_size (GduDevice *device);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]