RetroArch
7zFile.h
Go to the documentation of this file.
1 /* 7zFile.h -- File IO
2 2009-11-24 : Igor Pavlov : Public domain */
3 
4 #ifndef __7Z_FILE_H
5 #define __7Z_FILE_H
6 
7 #ifdef _WIN32
8 #define USE_WINDOWS_FILE
9 #endif
10 
11 #ifdef USE_WINDOWS_FILE
12 #include <windows.h>
13 #else
14 #include <stdio.h>
15 #endif
16 
17 #include "7zTypes.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /* ---------- File ---------- */
24 
25 typedef struct
26 {
27  #ifdef USE_WINDOWS_FILE
28  HANDLE handle;
29  #else
31  #endif
32 } CSzFile;
33 
34 void File_Construct(CSzFile *p);
35 #if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE)
36 WRes InFile_Open(CSzFile *p, const char *name);
37 WRes OutFile_Open(CSzFile *p, const char *name);
38 #endif
39 #ifdef USE_WINDOWS_FILE
40 WRes InFile_OpenW(CSzFile *p, const WCHAR *name);
41 WRes OutFile_OpenW(CSzFile *p, const WCHAR *name);
42 #endif
44 
45 /* reads max(*size, remain file's size) bytes */
46 WRes File_Read(CSzFile *p, void *data, size_t *size);
47 
48 /* writes *size bytes */
49 WRes File_Write(CSzFile *p, const void *data, size_t *size);
50 
51 WRes File_Seek(CSzFile *p, int64_t *pos, ESzSeek origin);
53 
54 
55 /* ---------- FileInStream ---------- */
56 
57 typedef struct
58 {
62 
64 
65 
66 typedef struct
67 {
71 
73 
74 
75 typedef struct
76 {
80 
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif
GLuint const GLchar * name
Definition: glext.h:6671
ISeqInStream s
Definition: 7zFile.h:59
Definition: 7zFile.h:57
WRes File_Write(CSzFile *p, const void *data, size_t *size)
Definition: 7zFile.c:133
WRes File_Seek(CSzFile *p, int64_t *pos, ESzSeek origin)
Definition: 7zFile.c:168
Definition: 7zTypes.h:100
WRes File_Read(CSzFile *p, void *data, size_t *size)
Definition: 7zFile.c:98
int WRes
Definition: 7zTypes.h:49
Definition: 7zFile.h:75
GLsizeiptr size
Definition: glext.h:6559
void FileSeqInStream_CreateVTable(CFileSeqInStream *p)
Definition: 7zFile.c:246
Definition: 7zFile.h:25
CSzFile file
Definition: 7zFile.h:78
Definition: ibxm.h:9
Definition: 7zTypes.h:86
void File_Construct(CSzFile *p)
Definition: 7zFile.c:29
CSzFile file
Definition: 7zFile.h:60
ISeekInStream s
Definition: 7zFile.h:68
FILE * file
Definition: 7zFile.h:30
WRes File_GetLength(CSzFile *p, uint64_t *length)
Definition: 7zFile.c:211
GLfloat GLfloat p
Definition: glext.h:9809
WRes File_Close(CSzFile *p)
Definition: 7zFile.c:77
#define FILE
Definition: file_stream_transforms.h:35
CSzFile file
Definition: 7zFile.h:69
WRes InFile_Open(CSzFile *p, const char *name)
Definition: 7zFile.c:59
WRes OutFile_Open(CSzFile *p, const char *name)
Definition: 7zFile.c:60
signed __int64 int64_t
Definition: stdint.h:135
void FileOutStream_CreateVTable(CFileOutStream *p)
Definition: 7zFile.c:282
Definition: 7zFile.h:66
ESzSeek
Definition: 7zTypes.h:93
Definition: 7zTypes.h:74
ISeqOutStream s
Definition: 7zFile.h:77
unsigned __int64 uint64_t
Definition: stdint.h:136
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233
void FileInStream_CreateVTable(CFileInStream *p)
Definition: 7zFile.c:266