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

Side by Side Diff: ppapi/cpp/file_io.h

Issue 7242002: Sang's initial CL for moving the file interface out of dev. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_CPP_FILE_IO_H_
6 #define PPAPI_CPP_FILE_IO_H_
7
8 #include "ppapi/c/pp_time.h"
9 #include "ppapi/cpp/resource.h"
10
11 struct PP_FileInfo;
12
13 namespace pp {
14
15 class CompletionCallback;
16 class FileRef;
17 class Instance;
18
19 class FileIO: public Resource {
20 public:
21 // Constructs an is_null resource.
22 FileIO();
23
24 FileIO(Instance* instance);
25 FileIO(const FileIO& other);
26
27 // PPB_FileIO methods:
28 int32_t Open(const FileRef& file_ref,
29 int32_t open_flags,
30 const CompletionCallback& cc);
31 int32_t Query(PP_FileInfo* result_buf,
32 const CompletionCallback& cc);
33 int32_t Touch(PP_Time last_access_time,
34 PP_Time last_modified_time,
35 const CompletionCallback& cc);
36 int32_t Read(int64_t offset,
37 char* buffer,
38 int32_t bytes_to_read,
39 const CompletionCallback& cc);
40 int32_t Write(int64_t offset,
41 const char* buffer,
42 int32_t bytes_to_write,
43 const CompletionCallback& cc);
44 int32_t SetLength(int64_t length,
45 const CompletionCallback& cc);
46 int32_t Flush(const CompletionCallback& cc);
47 void Close();
48 };
49
50 } // namespace pp
51
52 #endif // PPAPI_CPP_FILE_IO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698