RetroArch
interface_stream.h
Go to the documentation of this file.
1 /* Copyright (C) 2010-2018 The RetroArch team
2  *
3  * ---------------------------------------------------------------------------------------
4  * The following license statement only applies to this file (interface_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_INTERFACE_STREAM_H
24 #define _LIBRETRO_SDK_INTERFACE_STREAM_H
25 
26 #include <stdint.h>
27 #include <stddef.h>
28 #include <sys/types.h>
29 
30 #include <retro_common_api.h>
31 #include <boolean.h>
32 
34 
36 {
40 };
41 
43 
44 typedef struct intfstream_info
45 {
46  struct
47  {
48  struct
49  {
52  } buf;
53  bool writable;
54  } memory;
55  struct
56  {
57  void *handle;
59  } chd;
62 
64 
67 
69  const char *path, unsigned mode, unsigned hints);
70 
72  void *s, uint64_t len);
73 
75  const void *s, uint64_t len);
76 
78  char *buffer, uint64_t len);
79 
81 
83  int64_t offset, int whence);
84 
86 
88 
90 
92 
94 
96 
98  unsigned mode, unsigned hints);
99 
101  unsigned mode, unsigned hints, uint64_t size);
102 
104  unsigned mode, unsigned hints, int32_t track);
105 
106 
108 
109 #endif
void * handle
Definition: interface_stream.h:57
char * intfstream_gets(intfstream_internal_t *intf, char *buffer, uint64_t len)
Definition: interface_stream.c:301
void intfstream_rewind(intfstream_internal_t *intf)
Definition: interface_stream.c:370
Definition: interface_stream.h:38
int64_t intfstream_tell(intfstream_internal_t *intf)
Definition: interface_stream.c:348
GLenum mode
Definition: glext.h:6857
struct intfstream_info::@781 chd
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
int FAR intf
Definition: zconf.h:343
void * intfstream_init(intfstream_info_t *info)
Definition: interface_stream.c:183
void intfstream_putc(intfstream_internal_t *intf, int c)
Definition: interface_stream.c:388
Definition: libretro.h:2275
int intfstream_flush(intfstream_internal_t *intf)
Definition: interface_stream.c:139
GLsizei const GLchar ** path
Definition: glext.h:7901
GLenum GLsizei len
Definition: glext.h:7389
int intfstream_close(intfstream_internal_t *intf)
Definition: interface_stream.c:157
GLsizeiptr size
Definition: glext.h:6559
struct intfstream_info::@780 memory
GLdouble s
Definition: glext.h:6390
uint64_t size
Definition: interface_stream.h:51
Definition: interface_stream.h:44
Definition: interface_stream.h:39
Definition: ibxm.h:9
const GLubyte * c
Definition: glext.h:9812
int32_t track
Definition: interface_stream.h:58
int64_t intfstream_seek(intfstream_internal_t *intf, int64_t offset, int whence)
Definition: interface_stream.c:222
struct intfstream_info::@780::@782 buf
bool intfstream_open(intfstream_internal_t *intf, const char *path, unsigned mode, unsigned hints)
Definition: interface_stream.c:107
int intfstream_getc(intfstream_internal_t *intf)
Definition: interface_stream.c:326
intfstream_t * intfstream_open_chd_track(const char *path, unsigned mode, unsigned hints, int32_t track)
Definition: interface_stream.c:462
bool writable
Definition: interface_stream.h:53
int64_t intfstream_read(intfstream_internal_t *intf, void *s, uint64_t len)
Definition: interface_stream.c:260
intfstream_t * intfstream_open_memory(void *data, unsigned mode, unsigned hints, uint64_t size)
Definition: interface_stream.c:432
struct intfstream_info intfstream_info_t
enum intfstream_type type
Definition: interface_stream.h:60
signed int int32_t
Definition: stdint.h:123
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
Definition: interface_stream.c:32
uint8_t * data
Definition: interface_stream.h:50
signed __int64 int64_t
Definition: stdint.h:135
Definition: interface_stream.h:37
int64_t intfstream_get_size(intfstream_internal_t *intf)
Definition: interface_stream.c:60
Definition: video4linux2.c:51
GLintptr offset
Definition: glext.h:6560
int64_t intfstream_write(intfstream_internal_t *intf, const void *s, uint64_t len)
Definition: interface_stream.c:282
bool intfstream_resize(intfstream_internal_t *intf, intfstream_info_t *info)
Definition: interface_stream.c:82
intfstream_type
Definition: interface_stream.h:35
intfstream_t * intfstream_open_file(const char *path, unsigned mode, unsigned hints)
Definition: interface_stream.c:406
unsigned __int64 uint64_t
Definition: stdint.h:136
unsigned char uint8_t
Definition: stdint.h:124