OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_CPP_FILE_SYSTEM_H_ | 5 #ifndef PPAPI_CPP_FILE_SYSTEM_H_ |
6 #define PPAPI_CPP_FILE_SYSTEM_H_ | 6 #define PPAPI_CPP_FILE_SYSTEM_H_ |
7 | 7 |
8 #include "ppapi/c/pp_file_info.h" | 8 #include "ppapi/c/pp_file_info.h" |
9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_stdint.h" | 10 #include "ppapi/c/pp_stdint.h" |
11 #include "ppapi/c/pp_time.h" | 11 #include "ppapi/c/pp_time.h" |
12 #include "ppapi/cpp/instance.h" | 12 #include "ppapi/cpp/instance.h" |
13 #include "ppapi/cpp/resource.h" | 13 #include "ppapi/cpp/resource.h" |
14 | 14 |
| 15 /// @file |
| 16 /// This file defines the API to create a file system associated with a file. |
| 17 |
15 struct PP_FileInfo; | 18 struct PP_FileInfo; |
16 | 19 |
17 namespace pp { | 20 namespace pp { |
18 | 21 |
19 class CompletionCallback; | 22 class CompletionCallback; |
20 class FileRef; | 23 class FileRef; |
21 | 24 |
22 // Wraps methods from ppb_file_system.h | 25 /// The <code>FileSystem</code> class identifies the file system type |
| 26 /// associated with a file. |
23 class FileSystem : public Resource { | 27 class FileSystem : public Resource { |
24 public: | 28 public: |
| 29 |
| 30 /// This constructor creates a file system object of the given type. |
| 31 /// |
| 32 /// @param[in] instance A <code>Instance</code> indentifying the instance |
| 33 /// with the file. |
| 34 /// @param[in] type A file system type as defined by |
| 35 /// <code>PP_FileSystemType</code> enum. |
25 FileSystem(Instance* instance, PP_FileSystemType type); | 36 FileSystem(Instance* instance, PP_FileSystemType type); |
26 | 37 |
| 38 /// Open() opens the file system. A file system must be opened before running |
| 39 /// any other operation on it. |
| 40 /// |
| 41 /// @param[in] expected_size The expected size of the file system. |
| 42 /// @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 43 /// completion of Open(). |
| 44 /// |
| 45 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. |
27 int32_t Open(int64_t expected_size, const CompletionCallback& cc); | 46 int32_t Open(int64_t expected_size, const CompletionCallback& cc); |
28 }; | 47 }; |
29 | 48 |
30 } // namespace pp | 49 } // namespace pp |
31 | 50 |
32 #endif // PPAPI_CPP_FILE_SYSTEM_H_ | 51 #endif // PPAPI_CPP_FILE_SYSTEM_H_ |
OLD | NEW |