-
Notifications
You must be signed in to change notification settings - Fork 7
/
Archives.h
142 lines (126 loc) · 7.93 KB
/
Archives.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*----------------------------------------------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------#
#------ This File is Part Of : ----------------------------------------------------------------------------------------#
#------- _ ------------------- ______ _ --------------------------------------------------------------------------#
#------ | | ------------------- (_____ \ | | --------------------------------------------------------------------------#
#------ | | --- _ _ ____ _____) )| | ____ _ _ ____ ____ ----------------------------------------------#
#------ | | --- | | | | / _ | | ____/ | | / _ || | | | / _ ) / ___) ----------------------------------------------#
#------ | |_____| |_| |( ( | | | | | |( ( | || |_| |( (/ / | | --------------------------------------------------#
#------ |_______)\____| \_||_| |_| |_| \_||_| \__ | \____)|_| --------------------------------------------------#
#------------------------------------------------- (____/ -------------------------------------------------------------#
#------------------------ ______ _ -------------------------------------------------------------------------------#
#------------------------ (_____ \ | | -------------------------------------------------------------------------------#
#------------------------ _____) )| | _ _ ___ ------------------------------------------------------------------#
#------------------------ | ____/ | || | | | /___) ------------------------------------------------------------------#
#------------------------ | | | || |_| ||___ | ------------------------------------------------------------------#
#------------------------ |_| |_| \____|(___/ ------------------------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------#
#- Licensed under the GPL License --------------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------#
#- Copyright (c) Nanni <cusunanni@hotmail.it> --------------------------------------------------------------------------#
#- Copyright (c) Rinnegatamante <rinnegatamante@eternalongju2.com> -----------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------#
#- Official Forum : http://rinnegatamante.eu/luaplayerplus/forum.php ---------------------------------------------------#
#- For help using LuaPlayerPlus, code help, and other please visit : http://rinnegatamante.eu/luaplayerplus/forum.php --#
#-----------------------------------------------------------------------------------------------------------------------#
#- Credits : -----------------------------------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------#
#- Homemister for LPHM sourcecode --------------------------------------------------------------------------------------#
#- Zack & Shine for LP Euphoria sourcecode -----------------------------------------------------------------------------#
#- ab5000 for support on psp-ita.com -----------------------------------------------------------------------------------#
#- valantin for sceIoMvdir and sceIoCpdir improved functions------------------------------------------------------------#
#- Dark_AleX for usbdevice ---------------------------------------------------------------------------------------------#
#- VirtuosFlame & ColdBird for iso drivers and kuBridge ----------------------------------------------------------------#
#- sakya for Media Engine and OslibMod ---------------------------------------------------------------------------------#
#- Booster & silverspring for EEPROM write/read functions --------------------------------------------------------------#
#- Akind for RemoteJoyLite ---------------------------------------------------------------------------------------------#
#- cooleyes for mpeg4 lib ----------------------------------------------------------------------------------------------#
#- Arshia001 for PSPAALib ----------------------------------------------------------------------------------------------#
#- InsertWittyName & MK2k for PGE sourcecode ---------------------------------------------------------------------------#
#- Youresam for LUA BMPLib ---------------------------------------------------------------------------------------------#
#- Raphael for vram manager code ---------------------------------------------------------------------------------------#
#- Dynodzzo for LSD concepts -------------------------------------------------------------------------------------------#
#- ab_portugal for Image.negative function -----------------------------------------------------------------------------#
#- JiCé for drawCircle function ----------------------------------------------------------------------------------------#
#- Rapper_skull & DarkGiovy for testing LuaPlayer Plus and coming up with some neat ideas for it. ----------------------#
#-----------------------------------------------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------*/
#ifndef __ARCHIVES_H_
#define __ARCHIVES_H_
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************
** UnZip *********************************************************************
*******************************************************************************/
/** @defgroup Zip Zip Library
* @{
*/
#include "zlib.h"
/**
* A zip
*/
typedef void Zip;
/**
* A file within a zip
*/
typedef struct
{
unsigned char *data; /**< The file data */
int size; /**< Size of the data */
} ZipFile;
/**
* Open a Zip file
*
* @param filename - Path of the zip to load.
*
* @returns A pointer to a ::Zip struct or NULL on error.
*/
Zip* ZipOpen(const char *filename);
/**
* Close a Zip file
*
* @param zip - A valid (previously opened) ::Zip
*
* @returns 1 on success, 0 on error
*/
int ZipClose(Zip *zip);
/**
* Read a file from a zip
*
* @param zip - A valid (previously opened) ::Zip
*
* @param filename - The file to read within the zip
*
* @param password - The password of the file (pass NULL if no password)
*
* @returns A ::ZipFile struct containing the file
*/
ZipFile* ZipFileRead(Zip *zip, const char *filename, const char *password);
/**
* Extract all files from a zip
*
* @param zip - A valid (previously opened) ::Zip file
*
* @param password - The password of the file (pass NULL if no password)
*
* @param path - Path where to extract files
*
* @returns 1 on success, 0 on error.
*/
int ZipExtract(Zip *zip, const char *password, const char* path);
/**
* Free the file data previously loaded from a zip
*
* @param file - A valid (previously read) ::ZipFile
*/
void ZipFileFree(ZipFile *file);
#ifdef __cplusplus
}
#endif
#endif /* __ARCHIVES_H_ */
/*----------------------------------------------------------------------------------------------------------------------#
#-----------------------------------------------------------------------------------------------------------------------*/