Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: ppapi/c/trusted/ppb_file_io_trusted.h

Issue 7396002: More trivial cleanupi of ppapi/c/trusted headers (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/c/trusted/ppb_buffer_trusted.h ('k') | ppapi/c/trusted/ppb_image_data_trusted.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_C_PPB_FILE_IO_TRUSTED_H_
6 #define PPAPI_C_PPB_FILE_IO_TRUSTED_H_
7 5
6 /* From trusted/ppb_file_io_trusted.idl modified Mon Jul 18 10:45:10 2011. */
7
8 #ifndef PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_
9 #define PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_
10
11 #include "ppapi/c/pp_completion_callback.h"
12 #include "ppapi/c/pp_macros.h"
8 #include "ppapi/c/pp_resource.h" 13 #include "ppapi/c/pp_resource.h"
9 #include "ppapi/c/pp_stdint.h" 14 #include "ppapi/c/pp_stdint.h"
10 15
11 struct PP_CompletionCallback; 16 /**
17 * @file
18 *
19 * This file defines the trusted file IO interface
20 */
12 21
22
23 /**
24 * @addtogroup Interfaces
25 * @{
26 */
27 /* Available only to trusted implementations. */
13 #define PPB_FILEIOTRUSTED_INTERFACE_0_4 "PPB_FileIOTrusted;0.4" 28 #define PPB_FILEIOTRUSTED_INTERFACE_0_4 "PPB_FileIOTrusted;0.4"
14 #define PPB_FILEIOTRUSTED_INTERFACE PPB_FILEIOTRUSTED_INTERFACE_0_4 29 #define PPB_FILEIOTRUSTED_INTERFACE PPB_FILEIOTRUSTED_INTERFACE_0_4
15 30
16 // Available only to trusted implementations.
17 struct PPB_FileIOTrusted { 31 struct PPB_FileIOTrusted {
18 // Returns a file descriptor corresponding to the given FileIO object. On 32 /**
19 // Windows, returns a HANDLE; on all other platforms, returns a POSIX file 33 * Returns a file descriptor corresponding to the given FileIO object. On
20 // descriptor. The FileIO object must have been opened with a successful 34 * Windows, returns a HANDLE; on all other platforms, returns a POSIX file
21 // call to FileIO::Open. The file descriptor will be closed automatically 35 * descriptor. The FileIO object must have been opened with a successful
22 // when the FileIO object is closed or destroyed. 36 * call to FileIO::Open. The file descriptor will be closed automatically
37 * when the FileIO object is closed or destroyed.
38 */
23 int32_t (*GetOSFileDescriptor)(PP_Resource file_io); 39 int32_t (*GetOSFileDescriptor)(PP_Resource file_io);
24 40 /**
25 // Notifies the browser that underlying file will be modified. This gives 41 * Notifies the browser that underlying file will be modified. This gives
26 // the browser the opportunity to apply quota restrictions and possibly 42 * the browser the opportunity to apply quota restrictions and possibly
27 // return an error to indicate that the write is not allowed. 43 * return an error to indicate that the write is not allowed.
44 */
28 int32_t (*WillWrite)(PP_Resource file_io, 45 int32_t (*WillWrite)(PP_Resource file_io,
29 int64_t offset, 46 int64_t offset,
30 int32_t bytes_to_write, 47 int32_t bytes_to_write,
31 struct PP_CompletionCallback callback); 48 struct PP_CompletionCallback callback);
32 49 /**
33 // Notifies the browser that underlying file will be modified. This gives 50 * Notifies the browser that underlying file will be modified. This gives
34 // the browser the opportunity to apply quota restrictions and possibly 51 * the browser the opportunity to apply quota restrictions and possibly
35 // return an error to indicate that the write is not allowed. 52 * return an error to indicate that the write is not allowed.
53 *
54 * TODO(darin): Maybe unify the above into a single WillChangeFileSize
55 * method? The above methods have the advantage of mapping to PPB_FileIO
56 * Write and SetLength calls. WillChangeFileSize would require the caller to
57 * compute the file size resulting from a Write call, which may be
58 * undesirable.
59 */
dmichael (off chromium) 2011/07/18 21:19:40 Is there any way to have comments go in to a separ
36 int32_t (*WillSetLength)(PP_Resource file_io, 60 int32_t (*WillSetLength)(PP_Resource file_io,
37 int64_t length, 61 int64_t length,
38 struct PP_CompletionCallback callback); 62 struct PP_CompletionCallback callback);
63 };
64 /**
65 * @}
66 */
39 67
40 // TODO(darin): Maybe unify the above into a single WillChangeFileSize 68 #endif /* PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_ */
41 // method? The above methods have the advantage of mapping to PPB_FileIO
42 // Write and SetLength calls. WillChangeFileSize would require the caller to
43 // compute the file size resulting from a Write call, which may be
44 // undesirable.
45 };
46 69
47 #endif /* PPAPI_C_PPB_FILE_IO_TRUSTED_H_ */
48
OLDNEW
« no previous file with comments | « ppapi/c/trusted/ppb_buffer_trusted.h ('k') | ppapi/c/trusted/ppb_image_data_trusted.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698