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 // Helper interface to support media device isolated file system operations. |
| 21 class MediaDeviceInterface { |
| 22 public: |
| 23 virtual base::PlatformFileError GetFileInfo( |
| 24 const FilePath& file_path, |
| 25 base::PlatformFileInfo* file_info) = 0; |
| 26 virtual FileSystemFileUtil::AbstractFileEnumerator* CreateFileEnumerator( |
| 27 const FilePath& root, |
| 28 bool recursive) = 0; |
| 29 virtual base::PlatformFileError Touch( |
| 30 const FilePath& file_path, |
| 31 const base::Time& last_access_time, |
| 32 const base::Time& last_modified_time) = 0; |
| 33 virtual bool PathExists(const FilePath& file_path) = 0; |
| 34 virtual bool DirectoryExists(const FilePath& file_path) = 0; |
| 35 virtual bool IsDirectoryEmpty(const FilePath& file_path) = 0; |
| 36 virtual PlatformFileError CreateSnapshotFile( |
| 37 const FilePath& device_file_path, |
| 38 const FilePath& local_path, |
| 39 base::PlatformFileInfo* file_info) = 0; |
| 40 }; |
| 41 |
| 42 } // namespace fileapi |
| 43 |
| 44 #endif // WEBKIT_FILEAPI_MEDIA_MEDIA_DEVICE_INTERFACE_H_ |
OLD | NEW |