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.
5 #ifndef PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_
6 #define PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_
8 #include "base/platform_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"
16 PPAPI_SHARED_EXPORT int PlatformFileErrorToPepperError(
17 base::PlatformFileError error_code);
19 // Converts a PP_FileOpenFlags_Dev flag combination into a corresponding
20 // PlatformFileFlags flag combination.
21 // Returns |true| if okay.
22 PPAPI_SHARED_EXPORT bool PepperFileOpenFlagsToPlatformFileFlags(
23 int32_t pp_open_flags,
26 PPAPI_SHARED_EXPORT void PlatformFileInfoToPepperFileInfo(
27 const base::PlatformFileInfo& info,
28 PP_FileSystemType fs_type,
29 PP_FileInfo* info_out);
33 #endif // PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_