diff options
author | sanga@chromium.org <sanga@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 20:18:59 +0000 |
---|---|---|
committer | sanga@chromium.org <sanga@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 20:18:59 +0000 |
commit | 126f4fbdf4245f4b98b85afc3d9d769d024e55e8 (patch) | |
tree | a305c4fa18b66be5e5429c1abfde328269fb6d4f /ppapi/cpp/file_io.h | |
parent | 4522aace33817d513e3906ea0e2b668d90709840 (diff) | |
download | chromium_src-126f4fbdf4245f4b98b85afc3d9d769d024e55e8.zip chromium_src-126f4fbdf4245f4b98b85afc3d9d769d024e55e8.tar.gz chromium_src-126f4fbdf4245f4b98b85afc3d9d769d024e55e8.tar.bz2 |
This CL is oringialy http://codereview.chromium.org/7210027
I moved to write access repository.
Review URL: http://codereview.chromium.org/7261004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90629 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/file_io.h')
-rw-r--r-- | ppapi/cpp/file_io.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/ppapi/cpp/file_io.h b/ppapi/cpp/file_io.h new file mode 100644 index 0000000..309984d --- /dev/null +++ b/ppapi/cpp/file_io.h @@ -0,0 +1,52 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PPAPI_CPP_FILE_IO_H_ +#define PPAPI_CPP_FILE_IO_H_ + +#include "ppapi/c/pp_time.h" +#include "ppapi/cpp/resource.h" + +struct PP_FileInfo; + +namespace pp { + +class CompletionCallback; +class FileRef; +class Instance; + +class FileIO : public Resource { + public: + // Constructs an is_null resource. + FileIO(); + + FileIO(Instance* instance); + FileIO(const FileIO& other); + + // PPB_FileIO methods: + int32_t Open(const FileRef& file_ref, + int32_t open_flags, + const CompletionCallback& cc); + int32_t Query(PP_FileInfo* result_buf, + const CompletionCallback& cc); + int32_t Touch(PP_Time last_access_time, + PP_Time last_modified_time, + const CompletionCallback& cc); + int32_t Read(int64_t offset, + char* buffer, + int32_t bytes_to_read, + const CompletionCallback& cc); + int32_t Write(int64_t offset, + const char* buffer, + int32_t bytes_to_write, + const CompletionCallback& cc); + int32_t SetLength(int64_t length, + const CompletionCallback& cc); + int32_t Flush(const CompletionCallback& cc); + void Close(); +}; + +} // namespace pp + +#endif // PPAPI_CPP_FILE_IO_H_ |