| 1 | /* Copyright (C) 2010-2016 The RetroArch team |
| 2 | * |
| 3 | * --------------------------------------------------------------------------------------- |
| 4 | * The following license statement only applies to this file (file_stream.h). |
| 5 | * --------------------------------------------------------------------------------------- |
| 6 | * |
| 7 | * Permission is hereby granted, free of charge, |
| 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), |
| 9 | * to deal in the Software without restriction, including without limitation the rights to |
| 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, |
| 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, |
| 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
| 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 21 | */ |
| 22 | |
| 23 | #ifndef __LIBRETRO_SDK_FILE_STREAM_H |
| 24 | #define __LIBRETRO_SDK_FILE_STREAM_Hcxx . . $ `libretro-common/include/streams/file_stream.h:24:9`! |
| 25 | |
| 26 | #include <stdint.h> |
| 27 | #include <stddef.h> |
| 28 | |
| 29 | #include <sys/types.h> |
| 30 | |
| 31 | #include <retro_common.h>cxx . . $ `<file>/libretro-common/include/retro_common.h`/ |
| 32 | #include <boolean.h>cxx . . $ `<file>/libretro-common/include/boolean.h`/ |
| 33 | |
| 34 | #ifdef __cpluspluscxx . . $ `<built-in>:471:9`! |
| 35 | extern "C" { |
| 36 | #endif |
| 37 | |
| 38 | typedef struct RFILEcxx . . $ RFILE# RFILEcxx . . $ RFILE#; |
| 39 | |
| 40 | enumcxx . . $ $anonymous_type_4e781a473cff17a0_0# |
| 41 | { |
| 42 | RFILE_MODE_READcxx . . $ RFILE_MODE_READ. = 0, |
| 43 | RFILE_MODE_WRITEcxx . . $ RFILE_MODE_WRITE., |
| 44 | RFILE_MODE_READ_WRITEcxx . . $ RFILE_MODE_READ_WRITE., |
| 45 | |
| 46 | /* There is no garantee these requests will be attended. */ |
| 47 | RFILE_HINT_UNBUFFEREDcxx . . $ RFILE_HINT_UNBUFFERED. = 1<<8, |
| 48 | RFILE_HINT_MMAPcxx . . $ RFILE_HINT_MMAP. = 1<<9 /* requires RFILE_MODE_READ */ |
| 49 | }; |
| 50 | |
| 51 | RFILEcxx . . $ RFILE# *filestream_opencxx . . $ filestream_open(5289339e9c722221).(const char *path, unsigned mode, ssize_tcxx . . $ ssize_t# len); |
| 52 | |
| 53 | ssize_tcxx . . $ ssize_t# filestream_seekcxx . . $ filestream_seek(3ba5ec69a3eac100).(RFILEcxx . . $ RFILE# *stream, ssize_tcxx . . $ ssize_t# offset, int whence); |
| 54 | |
| 55 | ssize_tcxx . . $ ssize_t# filestream_readcxx . . $ filestream_read(c96c610afba7cf57).(RFILEcxx . . $ RFILE# *stream, void *data, size_t len); |
| 56 | |
| 57 | ssize_tcxx . . $ ssize_t# filestream_writecxx . . $ filestream_write(219cf578744d1f0e).(RFILEcxx . . $ RFILE# *stream, const void *data, size_t len); |
| 58 | |
| 59 | ssize_tcxx . . $ ssize_t# filestream_tellcxx . . $ filestream_tell(fb7f681fccbdceb6).(RFILEcxx . . $ RFILE# *stream); |
| 60 | |
| 61 | void filestream_rewindcxx . . $ filestream_rewind(3c4b55969f06ce5a).(RFILEcxx . . $ RFILE# *stream); |
| 62 | |
| 63 | int filestream_closecxx . . $ filestream_close(3edcd12cab33f13c).(RFILEcxx . . $ RFILE# *stream); |
| 64 | |
| 65 | int filestream_read_filecxx . . $ filestream_read_file(6440f34c71310b70).(const char *path, void **buf, ssize_tcxx . . $ ssize_t# *len); |
| 66 | |
| 67 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! filestream_write_filecxx . . $ filestream_write_file(687a2a5ef442d8f6).(const char *path, const void *data, ssize_tcxx . . $ ssize_t# size); |
| 68 | |
| 69 | int filestream_get_fdcxx . . $ filestream_get_fd(3edcd12cab33f13c).(RFILEcxx . . $ RFILE# *stream); |
| 70 | |
| 71 | #ifdef __cpluspluscxx . . $ `<built-in>:471:9`! |
| 72 | } |
| 73 | #endif |
| 74 | |
| 75 | #endif |