2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2006-01-27 15:43:23 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
2006-02-11 09:53:53 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2006-01-27 15:43:23 +00:00
|
|
|
*/
|
|
|
|
|
2008-09-23 09:50:03 +00:00
|
|
|
#ifndef COMMON_UNZIP_H
|
|
|
|
#define COMMON_UNZIP_H
|
2006-01-27 15:43:23 +00:00
|
|
|
|
2008-09-05 22:12:46 +00:00
|
|
|
#ifdef USE_ZLIB
|
|
|
|
|
2006-01-27 15:43:23 +00:00
|
|
|
#include "common/scummsys.h"
|
2008-09-05 22:12:46 +00:00
|
|
|
#include "common/archive.h"
|
2006-01-27 15:43:23 +00:00
|
|
|
|
2008-09-23 09:50:03 +00:00
|
|
|
typedef void *unzFile;
|
2006-01-27 15:43:23 +00:00
|
|
|
|
2008-09-23 09:50:03 +00:00
|
|
|
namespace Common {
|
2006-01-27 15:43:23 +00:00
|
|
|
|
2008-09-23 09:50:03 +00:00
|
|
|
class ZipArchive : public Archive {
|
|
|
|
void *_zipFile;
|
2008-09-05 22:12:46 +00:00
|
|
|
|
|
|
|
public:
|
2008-09-23 09:50:03 +00:00
|
|
|
ZipArchive(const String &name);
|
2008-10-09 17:56:07 +00:00
|
|
|
ZipArchive(const Common::FSNode &node);
|
2008-09-23 09:39:37 +00:00
|
|
|
~ZipArchive();
|
2008-09-05 22:12:46 +00:00
|
|
|
|
2008-09-23 09:50:03 +00:00
|
|
|
bool isOpen() const;
|
2008-09-23 09:39:37 +00:00
|
|
|
|
2008-09-23 09:50:03 +00:00
|
|
|
virtual bool hasFile(const String &name);
|
2008-10-03 16:57:40 +00:00
|
|
|
virtual int listMembers(Common::ArchiveMemberList &list);
|
2008-09-23 09:39:37 +00:00
|
|
|
virtual Common::SeekableReadStream *openFile(const Common::String &name);
|
2008-09-05 22:12:46 +00:00
|
|
|
};
|
|
|
|
|
2008-09-23 09:50:03 +00:00
|
|
|
} // End of namespace Common
|
|
|
|
|
2008-09-05 22:12:46 +00:00
|
|
|
#endif // USE_ZLIB
|
2006-01-27 15:43:23 +00:00
|
|
|
|
|
|
|
#endif /* _unz_H */
|