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_REF_H_ | 5 #ifndef PPAPI_CPP_FILE_REF_H_ |
6 #define PPAPI_CPP_FILE_REF_H_ | 6 #define PPAPI_CPP_FILE_REF_H_ |
7 | 7 |
8 #include "ppapi/c/pp_file_info.h" | |
8 #include "ppapi/c/pp_stdint.h" | 9 #include "ppapi/c/pp_stdint.h" |
9 #include "ppapi/c/ppb_file_ref.h" | 10 #include "ppapi/c/ppb_file_ref.h" |
10 #include "ppapi/cpp/resource.h" | 11 #include "ppapi/cpp/resource.h" |
11 #include "ppapi/cpp/var.h" | 12 #include "ppapi/cpp/var.h" |
12 | 13 |
13 /// @file | 14 /// @file |
14 /// This file defines the API to create a file reference or "weak pointer" to a | 15 /// This file defines the API to create a file reference or "weak pointer" to a |
15 /// file in a file system. | 16 /// file in a file system. |
16 | 17 |
17 namespace pp { | 18 namespace pp { |
18 | 19 |
20 class FileSystem; | |
19 class CompletionCallback; | 21 class CompletionCallback; |
20 class FileSystem; | 22 template<typename T> class CompletionCallbackWithOutput; |
dmichael (off chromium)
2013/03/27 20:20:06
nit: I think there should be a space between "temp
| |
21 | 23 |
22 /// The <code>FileRef</code> class represents a "weak pointer" to a file in | 24 /// The <code>FileRef</code> class represents a "weak pointer" to a file in |
23 /// a file system. | 25 /// a file system. |
24 class FileRef : public Resource { | 26 class FileRef : public Resource { |
25 public: | 27 public: |
26 /// Default constructor for creating an is_null() <code>FileRef</code> | 28 /// Default constructor for creating an is_null() <code>FileRef</code> |
27 /// object. | 29 /// object. |
28 FileRef() {} | 30 FileRef() {} |
29 | 31 |
30 /// A constructor used when you have an existing PP_Resource for a FileRef | 32 /// A constructor used when you have an existing PP_Resource for a FileRef |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 /// error to rename a file or directory that is in use. It is not valid to | 138 /// error to rename a file or directory that is in use. It is not valid to |
137 /// rename a file in the external file system. | 139 /// rename a file in the external file system. |
138 /// | 140 /// |
139 /// @param[in] new_file_ref A <code>FileRef</code> corresponding to a new | 141 /// @param[in] new_file_ref A <code>FileRef</code> corresponding to a new |
140 /// file reference. | 142 /// file reference. |
141 /// @param[in] cc A <code>CompletionCallback</code> to be called upon | 143 /// @param[in] cc A <code>CompletionCallback</code> to be called upon |
142 /// completion of Rename(). | 144 /// completion of Rename(). |
143 /// | 145 /// |
144 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. | 146 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. |
145 int32_t Rename(const FileRef& new_file_ref, const CompletionCallback& cc); | 147 int32_t Rename(const FileRef& new_file_ref, const CompletionCallback& cc); |
148 | |
149 /// | |
150 /// Query() queries info about a file or directory. You must have access to | |
151 /// read this file or directory if it exists in the external filesystem. | |
152 /// | |
153 /// @param[in] callback A <code>CompletionCallbackWithOutput</code> | |
154 /// to be called upon completion of Query(). | |
155 /// | |
156 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. | |
157 int32_t Query(const CompletionCallbackWithOutput<PP_FileInfo>& callback); | |
146 }; | 158 }; |
147 | 159 |
148 } // namespace pp | 160 } // namespace pp |
149 | 161 |
150 #endif // PPAPI_CPP_FILE_REF_H_ | 162 #endif // PPAPI_CPP_FILE_REF_H_ |
OLD | NEW |