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_TRUSTED_FILE_IO_TRUSTED_H_ 6 #define PPAPI_CPP_TRUSTED_FILE_IO_TRUSTED_H_ 7 8 #include <string> 9 10 #include "ppapi/c/pp_stdint.h" 11 12 namespace pp { 13 14 class FileIO; 15 class CompletionCallback; 16 17 class FileIO_Trusted { 18 public: 19 /// Creates a FileIO_Trusted object. 20 FileIO_Trusted(); 21 22 int32_t GetOSFileDescriptor(const FileIO& file_io); 23 24 int32_t WillWrite(const FileIO& file_io, 25 int64_t offset, 26 int32_t bytes_to_write, 27 const CompletionCallback& callback); 28 29 int32_t WillSetLength(const FileIO& file_io, 30 int64_t length, 31 const CompletionCallback& callback); 32 }; 33 34 } // namespace pp 35 36 #endif // PPAPI_CPP_TRUSTED_FILE_IO_TRUSTED_H_ 37