OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef WEBKIT_FILEAPI_MEDIA_MEDIA_DEVICE_INTERFACE_H_ | |
6 #define WEBKIT_FILEAPI_MEDIA_MEDIA_DEVICE_INTERFACE_H_ | |
7 | |
8 #include "base/file_path.h" | |
9 #include "base/platform_file.h" | |
10 #include "base/timer.h" | |
11 #include "webkit/fileapi/file_system_file_util.h" | |
12 | |
13 namespace base { | |
14 struct PlatformFileInfo; | |
15 class Time; | |
16 } | |
17 | |
18 namespace fileapi { | |
19 | |
20 using base::PlatformFileError; | |
21 using base::PlatformFileInfo; | |
22 using base::Time; | |
23 | |
24 // Helper interface to support media device isolated file system operations. | |
25 class MediaDeviceInterface { | |
26 public: | |
27 virtual PlatformFileError GetFileInfo(const FilePath& file_path, | |
28 PlatformFileInfo* file_info) = 0; | |
29 virtual FileSystemFileUtil::AbstractFileEnumerator* CreateFileEnumerator( | |
30 const FilePath& root, | |
31 bool recursive) = 0; | |
32 virtual PlatformFileError Touch(const FilePath& file_path, | |
33 const Time& last_access_time, | |
34 const Time& last_modified_time) = 0; | |
35 virtual bool PathExists(const FilePath& file_path) = 0; | |
36 virtual bool DirectoryExists(const FilePath& file_path) = 0; | |
37 virtual bool IsDirectoryEmpty(const FilePath& file_path) = 0; | |
38 virtual bool CreateSnapshotFile(const FilePath& device_file_path, | |
kinuko
2012/07/30 23:19:03
Since this could fail for various reasons maybe we
kmadhusu
2012/07/31 01:17:48
Done
| |
39 const FilePath& local_path, | |
40 PlatformFileInfo* file_info) = 0; | |
41 }; | |
42 | |
43 } // namespace fileapi | |
44 | |
45 #endif // WEBKIT_FILEAPI_MEDIA_MEDIA_DEVICE_INTERFACE_H_ | |
OLD | NEW |