summaryrefslogtreecommitdiff
path: root/mpq-file.h
diff options
context:
space:
mode:
authorpixel <pixel>2007-07-09 16:34:30 +0000
committerpixel <pixel>2007-07-09 16:34:30 +0000
commitfabd02b4bb0c1df2b65ea682b29087a1776954ed (patch)
treed05674f049e83e1fd8919ad74bfee84304d6887f /mpq-file.h
parent2efe6f62b644ca93b7294de6dc83090542b2e4e2 (diff)
Adding basic file handling.
Diffstat (limited to 'mpq-file.h')
-rw-r--r--mpq-file.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/mpq-file.h b/mpq-file.h
new file mode 100644
index 0000000..d94a2cf
--- /dev/null
+++ b/mpq-file.h
@@ -0,0 +1,23 @@
+#ifndef __MPQ_FILE_H__
+#define __MPQ_FILE_H__
+
+#include "inttypes.h"
+
+struct mpq_file_internals_t;
+
+typedef struct {
+ struct mpq_file_internals_t * mpq_i;
+} mpq_file_t;
+
+enum mpqfile_seek_t {
+ MPQLIB_SEEK_SET,
+ MPQLIB_SEEK_CUR,
+ MPQLIB_SEEK_END,
+};
+
+mpq_file_t * mpqlib_open_file(mpq_archive_t * mpq_a, int entry);
+mpq_file_t * mpqlib_open_filename(mpq_archive_t * mpq_a, const char * fname);
+uint32_t mpqlib_read(mpq_file_t * mpq_f, void * buffer, uint32_t size);
+uint32_t mpqlib_seek(mpq_file_t, int32_t offset, enum mpqfile_seek_t);
+
+#endif