From 6b5b44074fd6bdbbeb59f8d006fb88e0230cf1ef Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 5 Aug 2009 18:24:59 -0700 Subject: Cleaning up and sanityzing the ioctl subsystem. --- mpq-bios.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'mpq-bios.h') diff --git a/mpq-bios.h b/mpq-bios.h index af58b93..5444469 100644 --- a/mpq-bios.h +++ b/mpq-bios.h @@ -15,6 +15,9 @@ struct mpq_archive_t; enum mpqlib_ioctl_t { MPQLIB_IOCTL_NO_ACTION = 0, + MPQLIB_IOCTL_SEEK, + MPQLIB_IOCTL_READ, + MPQLIB_IOCTL_WRITE, MPQLIB_IOCTL_ENTRY_EXISTS, MPQLIB_IOCTL_GET_FORMAT_VERSION, MPQLIB_IOCTL_GET_SECTOR_SIZE, @@ -22,6 +25,10 @@ enum mpqlib_ioctl_t { MPQLIB_IOCTL_GET_BLOCK_SIZE, MPQLIB_IOCTL_GET_FILE_SIZE, MPQLIB_IOCTL_GET_FLAGS, + MPQLIB_IOCTL_SET_BLOCK_OFFSET, + MPQLIB_IOCTL_SET_BLOCK_SIZE, + MPQLIB_IOCTL_SET_FILE_SIZE, + MPQLIB_IOCTL_SET_FLAGS, }; #ifdef __cplusplus @@ -34,9 +41,11 @@ struct mpq_archive_t * mpqlib_open_archive_for_writing(const char * fname); struct mpq_archive_t * mpqlib_reopen_archive(int fd); void mpqlib_printtables(struct mpq_archive_t *); void mpqlib_close_archive(struct mpq_archive_t *); -int mpqlib_find_hash_entry_by_name(struct mpq_archive_t *, const char * name, uint32_t language, uint32_t platform); -int mpqlib_find_hash_entry_by_hash(struct mpq_archive_t *, uint32_t h, uint32_t hA, uint32_t hB, uint32_t language, uint32_t platform); -uint64_t mpqlib_ioctl(struct mpq_archive_t *, enum mpqlib_ioctl_t command, int entry); +int mpqlib_find_hash_entry_by_name(struct mpq_archive_t *, const char * name, uint16_t language, uint16_t platform); +int mpqlib_find_hash_entry_by_hash(struct mpq_archive_t *, uint32_t h, uint32_t hA, uint32_t hB, uint16_t language, uint16_t platform); +int mpqlib_add_hash_entry_by_name(struct mpq_archive_t *, const char * name, uint16_t language, uint16_t platform, int entry); +int mpqlib_add_hash_entry_by_hash(struct mpq_archive_t *, uint32_t h, uint32_t hA, uint32_t hB, uint16_t language, uint16_t, int entry); +uint64_t mpqlib_ioctl(struct mpq_archive_t *, enum mpqlib_ioctl_t command, ...); #ifdef __cplusplus } -- cgit v1.2.3