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_DISKS_DISK_MOUNT_MANAGER_H_ | 5 #ifndef CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
6 #define CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 6 #define CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 | 11 |
10 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
11 #include "chromeos/chromeos_export.h" | 13 #include "chromeos/chromeos_export.h" |
12 #include "chromeos/dbus/cros_disks_client.h" | 14 #include "chromeos/dbus/cros_disks_client.h" |
13 | 15 |
14 namespace chromeos { | 16 namespace chromeos { |
15 namespace disks { | 17 namespace disks { |
16 | 18 |
17 // Condition of mounted filesystem. | 19 // Condition of mounted filesystem. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 const std::string& file_path, | 59 const std::string& file_path, |
58 const std::string& device_label, | 60 const std::string& device_label, |
59 const std::string& drive_label, | 61 const std::string& drive_label, |
60 const std::string& vendor_id, | 62 const std::string& vendor_id, |
61 const std::string& vendor_name, | 63 const std::string& vendor_name, |
62 const std::string& product_id, | 64 const std::string& product_id, |
63 const std::string& product_name, | 65 const std::string& product_name, |
64 const std::string& fs_uuid, | 66 const std::string& fs_uuid, |
65 const std::string& system_path_prefix, | 67 const std::string& system_path_prefix, |
66 DeviceType device_type, | 68 DeviceType device_type, |
67 uint64 total_size_in_bytes, | 69 uint64_t total_size_in_bytes, |
68 bool is_parent, | 70 bool is_parent, |
69 bool is_read_only, | 71 bool is_read_only, |
70 bool has_media, | 72 bool has_media, |
71 bool on_boot_device, | 73 bool on_boot_device, |
72 bool on_removable_device, | 74 bool on_removable_device, |
73 bool is_hidden); | 75 bool is_hidden); |
74 ~Disk(); | 76 ~Disk(); |
75 | 77 |
76 // The path of the device, used by devicekit-disks. | 78 // The path of the device, used by devicekit-disks. |
77 // (e.g. /sys/devices/pci0000:00/.../8:0:0:0/block/sdb/sdb1) | 79 // (e.g. /sys/devices/pci0000:00/.../8:0:0:0/block/sdb/sdb1) |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // Path of the system device this device's block is a part of. | 116 // Path of the system device this device's block is a part of. |
115 // (e.g. /sys/devices/pci0000:00/.../8:0:0:0/) | 117 // (e.g. /sys/devices/pci0000:00/.../8:0:0:0/) |
116 const std::string& system_path_prefix() const { | 118 const std::string& system_path_prefix() const { |
117 return system_path_prefix_; | 119 return system_path_prefix_; |
118 } | 120 } |
119 | 121 |
120 // Device type. | 122 // Device type. |
121 DeviceType device_type() const { return device_type_; } | 123 DeviceType device_type() const { return device_type_; } |
122 | 124 |
123 // Total size of the device in bytes. | 125 // Total size of the device in bytes. |
124 uint64 total_size_in_bytes() const { return total_size_in_bytes_; } | 126 uint64_t total_size_in_bytes() const { return total_size_in_bytes_; } |
125 | 127 |
126 // Is the device is a parent device (i.e. sdb rather than sdb1). | 128 // Is the device is a parent device (i.e. sdb rather than sdb1). |
127 bool is_parent() const { return is_parent_; } | 129 bool is_parent() const { return is_parent_; } |
128 | 130 |
129 // Is the device read only. | 131 // Is the device read only. |
130 bool is_read_only() const { return is_read_only_; } | 132 bool is_read_only() const { return is_read_only_; } |
131 | 133 |
132 // Does the device contains media. | 134 // Does the device contains media. |
133 bool has_media() const { return has_media_; } | 135 bool has_media() const { return has_media_; } |
134 | 136 |
(...skipping 19 matching lines...) Expand all Loading... |
154 std::string file_path_; | 156 std::string file_path_; |
155 std::string device_label_; | 157 std::string device_label_; |
156 std::string drive_label_; | 158 std::string drive_label_; |
157 std::string vendor_id_; | 159 std::string vendor_id_; |
158 std::string vendor_name_; | 160 std::string vendor_name_; |
159 std::string product_id_; | 161 std::string product_id_; |
160 std::string product_name_; | 162 std::string product_name_; |
161 std::string fs_uuid_; | 163 std::string fs_uuid_; |
162 std::string system_path_prefix_; | 164 std::string system_path_prefix_; |
163 DeviceType device_type_; | 165 DeviceType device_type_; |
164 uint64 total_size_in_bytes_; | 166 uint64_t total_size_in_bytes_; |
165 bool is_parent_; | 167 bool is_parent_; |
166 bool is_read_only_; | 168 bool is_read_only_; |
167 bool has_media_; | 169 bool has_media_; |
168 bool on_boot_device_; | 170 bool on_boot_device_; |
169 bool on_removable_device_; | 171 bool on_removable_device_; |
170 bool is_hidden_; | 172 bool is_hidden_; |
171 }; | 173 }; |
172 typedef std::map<std::string, Disk*> DiskMap; | 174 typedef std::map<std::string, Disk*> DiskMap; |
173 | 175 |
174 // A struct to store information about mount point. | 176 // A struct to store information about mount point. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 306 |
305 // Returns a pointer to the global DiskMountManager instance. | 307 // Returns a pointer to the global DiskMountManager instance. |
306 // Initialize() should already have been called. | 308 // Initialize() should already have been called. |
307 static DiskMountManager* GetInstance(); | 309 static DiskMountManager* GetInstance(); |
308 }; | 310 }; |
309 | 311 |
310 } // namespace disks | 312 } // namespace disks |
311 } // namespace chromeos | 313 } // namespace chromeos |
312 | 314 |
313 #endif // CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 315 #endif // CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
OLD | NEW |