- add sources.
[platform/framework/web/crosswalk.git] / src / ppapi / shared_impl / file_type_conversion.h
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/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"
13
14 namespace ppapi {
15
16 PPAPI_SHARED_EXPORT int PlatformFileErrorToPepperError(
17     base::PlatformFileError error_code);
18
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,
24     int* flags_out);
25
26 PPAPI_SHARED_EXPORT void PlatformFileInfoToPepperFileInfo(
27     const base::PlatformFileInfo& info,
28     PP_FileSystemType fs_type,
29     PP_FileInfo* info_out);
30
31 }  // namespace ppapi
32
33 #endif  // PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_