8 #ifndef PPAPI_C_PPB_FILE_IO_H_
9 #define PPAPI_C_PPB_FILE_IO_H_
11 #include "ppapi/c/pp_array_output.h"
12 #include "ppapi/c/pp_bool.h"
13 #include "ppapi/c/pp_completion_callback.h"
14 #include "ppapi/c/pp_file_info.h"
15 #include "ppapi/c/pp_instance.h"
16 #include "ppapi/c/pp_macros.h"
17 #include "ppapi/c/pp_resource.h"
18 #include "ppapi/c/pp_stdint.h"
19 #include "ppapi/c/pp_time.h"
21 #define PPB_FILEIO_INTERFACE_1_0 "PPB_FileIO;1.0"
22 #define PPB_FILEIO_INTERFACE_1_1 "PPB_FileIO;1.1"
23 #define PPB_FILEIO_INTERFACE PPB_FILEIO_INTERFACE_1_1
194 int32_t bytes_to_read,
218 int32_t bytes_to_write,
289 int32_t max_read_length,
313 int32_t bytes_to_read,
318 int32_t bytes_to_write,
int32_t(* Write)(PP_Resource file_io, int64_t offset, const char *buffer, int32_t bytes_to_write, struct PP_CompletionCallback callback)
int32_t(* Query)(PP_Resource file_io, struct PP_FileInfo *info, struct PP_CompletionCallback callback)
int32_t(* SetLength)(PP_Resource file_io, int64_t length, struct PP_CompletionCallback callback)
PP_Bool(* IsFileIO)(PP_Resource resource)
void(* Close)(PP_Resource file_io)
int32_t(* Flush)(PP_Resource file_io, struct PP_CompletionCallback callback)
int32_t(* ReadToArray)(PP_Resource file_io, int64_t offset, int32_t max_read_length, struct PP_ArrayOutput *output, struct PP_CompletionCallback callback)
int32_t(* SetLength)(PP_Resource file_io, int64_t length, struct PP_CompletionCallback callback)
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileOpenFlags, 4)
int32_t(* Open)(PP_Resource file_io, PP_Resource file_ref, int32_t open_flags, struct PP_CompletionCallback callback)
PP_Resource(* Create)(PP_Instance instance)
int32_t(* Query)(PP_Resource file_io, struct PP_FileInfo *info, struct PP_CompletionCallback callback)
int32_t(* Write)(PP_Resource file_io, int64_t offset, const char *buffer, int32_t bytes_to_write, struct PP_CompletionCallback callback)
void(* Close)(PP_Resource file_io)
int32_t(* Touch)(PP_Resource file_io, PP_Time last_access_time, PP_Time last_modified_time, struct PP_CompletionCallback callback)
int32_t(* Touch)(PP_Resource file_io, PP_Time last_access_time, PP_Time last_modified_time, struct PP_CompletionCallback callback)
int32_t(* Read)(PP_Resource file_io, int64_t offset, char *buffer, int32_t bytes_to_read, struct PP_CompletionCallback callback)
PP_Bool(* IsFileIO)(PP_Resource resource)
PP_Resource(* Create)(PP_Instance instance)
int32_t(* Open)(PP_Resource file_io, PP_Resource file_ref, int32_t open_flags, struct PP_CompletionCallback callback)
int32_t(* Read)(PP_Resource file_io, int64_t offset, char *buffer, int32_t bytes_to_read, struct PP_CompletionCallback callback)
int32_t(* Flush)(PP_Resource file_io, struct PP_CompletionCallback callback)