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> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
254 const EnsureMountInfoRefreshedCallback& callback, | 254 const EnsureMountInfoRefreshedCallback& callback, |
255 bool force) = 0; | 255 bool force) = 0; |
256 | 256 |
257 // Mounts a device. | 257 // Mounts a device. |
258 // Note that the mount operation may fail. To find out the result, one should | 258 // Note that the mount operation may fail. To find out the result, one should |
259 // observe DiskMountManager for |Observer::OnMountEvent| event, which will be | 259 // observe DiskMountManager for |Observer::OnMountEvent| event, which will be |
260 // raised upon the mount operation completion. | 260 // raised upon the mount operation completion. |
261 virtual void MountPath(const std::string& source_path, | 261 virtual void MountPath(const std::string& source_path, |
262 const std::string& source_format, | 262 const std::string& source_format, |
263 const std::string& mount_label, | 263 const std::string& mount_label, |
264 MountType type) = 0; | 264 MountType type, |
265 MountAccessMode access_mode) = 0; | |
satorux1
2016/08/03 07:29:32
while you are at it, could you add comments about
yamaguchi
2016/08/03 10:22:14
Done.
| |
265 | 266 |
266 // Unmounts a mounted disk. | 267 // Unmounts a mounted disk. |
267 // |UnmountOptions| enum defined in chromeos/dbus/cros_disks_client.h. | 268 // |UnmountOptions| enum defined in chromeos/dbus/cros_disks_client.h. |
268 // When the method is complete, |callback| will be called and observers' | 269 // When the method is complete, |callback| will be called and observers' |
269 // |OnMountEvent| will be raised. | 270 // |OnMountEvent| will be raised. |
270 // | 271 // |
271 // |callback| may be empty, in which case it gets ignored. | 272 // |callback| may be empty, in which case it gets ignored. |
272 virtual void UnmountPath(const std::string& mount_path, | 273 virtual void UnmountPath(const std::string& mount_path, |
273 UnmountOptions options, | 274 UnmountOptions options, |
274 const UnmountPathCallback& callback) = 0; | 275 const UnmountPathCallback& callback) = 0; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
307 | 308 |
308 // Returns a pointer to the global DiskMountManager instance. | 309 // Returns a pointer to the global DiskMountManager instance. |
309 // Initialize() should already have been called. | 310 // Initialize() should already have been called. |
310 static DiskMountManager* GetInstance(); | 311 static DiskMountManager* GetInstance(); |
311 }; | 312 }; |
312 | 313 |
313 } // namespace disks | 314 } // namespace disks |
314 } // namespace chromeos | 315 } // namespace chromeos |
315 | 316 |
316 #endif // CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ | 317 #endif // CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ |
OLD | NEW |