| 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" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 /// associated with a file. | 23 /// associated with a file. |
| 24 class FileSystem : public Resource { | 24 class FileSystem : public Resource { |
| 25 public: | 25 public: |
| 26 /// Constructs an is_null() filesystem resource. If you use this constructor, | 26 /// Constructs an is_null() filesystem resource. If you use this constructor, |
| 27 /// you will have to assign it to a "real" FileSystem object before you can | 27 /// you will have to assign it to a "real" FileSystem object before you can |
| 28 /// use it. | 28 /// use it. |
| 29 FileSystem(); | 29 FileSystem(); |
| 30 | 30 |
| 31 /// This constructor creates a file system object of the given type. | 31 /// This constructor creates a file system object of the given type. |
| 32 /// | 32 /// |
| 33 /// @param[in] instance A <code>Instance</code> identifying the instance | 33 /// @param[in] instance The instance with which this resource will be |
| 34 /// with the file. | 34 /// associated. |
| 35 /// |
| 35 /// @param[in] type A file system type as defined by | 36 /// @param[in] type A file system type as defined by |
| 36 /// <code>PP_FileSystemType</code> enum. | 37 /// <code>PP_FileSystemType</code> enum. |
| 37 FileSystem(Instance* instance, PP_FileSystemType type); | 38 FileSystem(const InstanceHandle& instance, PP_FileSystemType type); |
| 38 | 39 |
| 39 /// Open() opens the file system. A file system must be opened before running | 40 /// Open() opens the file system. A file system must be opened before running |
| 40 /// any other operation on it. | 41 /// any other operation on it. |
| 41 /// | 42 /// |
| 42 /// @param[in] expected_size The expected size of the file system. | 43 /// @param[in] expected_size The expected size of the file system. |
| 43 /// @param[in] cc A <code>PP_CompletionCallback</code> to be called upon | 44 /// @param[in] cc A <code>PP_CompletionCallback</code> to be called upon |
| 44 /// completion of Open(). | 45 /// completion of Open(). |
| 45 /// | 46 /// |
| 46 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. | 47 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 47 int32_t Open(int64_t expected_size, const CompletionCallback& cc); | 48 int32_t Open(int64_t expected_size, const CompletionCallback& cc); |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 } // namespace pp | 51 } // namespace pp |
| 51 | 52 |
| 52 #endif // PPAPI_CPP_FILE_SYSTEM_H_ | 53 #endif // PPAPI_CPP_FILE_SYSTEM_H_ |
| OLD | NEW |