| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_DBUS_CROS_DISKS_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_CROS_DISKS_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_CROS_DISKS_CLIENT_H_ | 6 #define CHROMEOS_DBUS_CROS_DISKS_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Total size of the disk in bytes. | 104 // Total size of the disk in bytes. |
| 105 uint64 total_size_in_bytes() const { return total_size_in_bytes_; } | 105 uint64 total_size_in_bytes() const { return total_size_in_bytes_; } |
| 106 | 106 |
| 107 // Is the device read-only. | 107 // Is the device read-only. |
| 108 bool is_read_only() const { return is_read_only_; } | 108 bool is_read_only() const { return is_read_only_; } |
| 109 | 109 |
| 110 // Returns true if the device should be hidden from the file browser. | 110 // Returns true if the device should be hidden from the file browser. |
| 111 bool is_hidden() const { return is_hidden_; } | 111 bool is_hidden() const { return is_hidden_; } |
| 112 | 112 |
| 113 // Returns file system uuid. |
| 114 std::string uuid() const { return uuid_; } |
| 115 |
| 113 private: | 116 private: |
| 114 void InitializeFromResponse(dbus::Response* response); | 117 void InitializeFromResponse(dbus::Response* response); |
| 115 | 118 |
| 116 std::string device_path_; | 119 std::string device_path_; |
| 117 std::string mount_path_; | 120 std::string mount_path_; |
| 118 std::string system_path_; | 121 std::string system_path_; |
| 119 bool is_drive_; | 122 bool is_drive_; |
| 120 bool has_media_; | 123 bool has_media_; |
| 121 bool on_boot_device_; | 124 bool on_boot_device_; |
| 122 | 125 |
| 123 std::string file_path_; | 126 std::string file_path_; |
| 124 std::string label_; | 127 std::string label_; |
| 125 std::string drive_model_; | 128 std::string drive_model_; |
| 126 DeviceType device_type_; | 129 DeviceType device_type_; |
| 127 uint64 total_size_in_bytes_; | 130 uint64 total_size_in_bytes_; |
| 128 bool is_read_only_; | 131 bool is_read_only_; |
| 129 bool is_hidden_; | 132 bool is_hidden_; |
| 133 std::string uuid_; |
| 130 }; | 134 }; |
| 131 | 135 |
| 132 // A class to make the actual DBus calls for cros-disks service. | 136 // A class to make the actual DBus calls for cros-disks service. |
| 133 // This class only makes calls, result/error handling should be done | 137 // This class only makes calls, result/error handling should be done |
| 134 // by callbacks. | 138 // by callbacks. |
| 135 class CHROMEOS_EXPORT CrosDisksClient { | 139 class CHROMEOS_EXPORT CrosDisksClient { |
| 136 public: | 140 public: |
| 137 // A callback to be called when DBus method call fails. | 141 // A callback to be called when DBus method call fails. |
| 138 typedef base::Callback<void()> ErrorCallback; | 142 typedef base::Callback<void()> ErrorCallback; |
| 139 | 143 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 // Create() should be used instead. | 235 // Create() should be used instead. |
| 232 CrosDisksClient(); | 236 CrosDisksClient(); |
| 233 | 237 |
| 234 private: | 238 private: |
| 235 DISALLOW_COPY_AND_ASSIGN(CrosDisksClient); | 239 DISALLOW_COPY_AND_ASSIGN(CrosDisksClient); |
| 236 }; | 240 }; |
| 237 | 241 |
| 238 } // namespace chromeos | 242 } // namespace chromeos |
| 239 | 243 |
| 240 #endif // CHROMEOS_DBUS_CROS_DISKS_CLIENT_H_ | 244 #endif // CHROMEOS_DBUS_CROS_DISKS_CLIENT_H_ |
| OLD | NEW |