Home | History | Annotate | Download | only in shared_impl
      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_SHARED_IMPL_FILE_TYPE_CONVERSION_H_
      6 #define PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_
      7 
      8 #include "base/files/file.h"
      9 #include "ppapi/c/pp_file_info.h"
     10 #include "ppapi/c/pp_stdint.h"
     11 #include "ppapi/c/ppb_file_system.h"
     12 #include "ppapi/shared_impl/ppapi_shared_export.h"
     13 
     14 namespace ppapi {
     15 
     16 PPAPI_SHARED_EXPORT int FileErrorToPepperError(base::File::Error error_code);
     17 
     18 // Converts a PP_FileOpenFlags_Dev flag combination into a corresponding
     19 // PlatformFileFlags flag combination.
     20 // Returns |true| if okay.
     21 PPAPI_SHARED_EXPORT bool PepperFileOpenFlagsToPlatformFileFlags(
     22     int32_t pp_open_flags,
     23     int* flags_out);
     24 
     25 PPAPI_SHARED_EXPORT void FileInfoToPepperFileInfo(const base::File::Info& info,
     26                                                   PP_FileSystemType fs_type,
     27                                                   PP_FileInfo* info_out);
     28 
     29 }  // namespace ppapi
     30 
     31 #endif  // PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_
     32