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-23 09:50:03 +00:00
|
|
|
namespace Common {
|
2006-01-27 15:43:23 +00:00
|
|
|
|
2010-02-13 11:56:30 +00:00
|
|
|
class Archive;
|
|
|
|
class FSNode;
|
|
|
|
class SeekableReadStream;
|
|
|
|
class String;
|
2008-12-27 17:09:28 +00:00
|
|
|
|
2010-02-13 11:56:30 +00:00
|
|
|
/**
|
|
|
|
* This factory method creates an Archive instance corresponding to the content
|
|
|
|
* of the ZIP compressed file with the given name.
|
|
|
|
*
|
|
|
|
* May return 0 in case of a failure.
|
|
|
|
*/
|
|
|
|
Archive *makeZipArchive(const String &name);
|
2008-12-22 11:22:15 +00:00
|
|
|
|
2010-02-13 11:56:30 +00:00
|
|
|
/**
|
|
|
|
* This factory method creates an Archive instance corresponding to the content
|
|
|
|
* of the ZIP compressed file with the given name.
|
|
|
|
*
|
|
|
|
* May return 0 in case of a failure.
|
|
|
|
*/
|
|
|
|
Archive *makeZipArchive(const FSNode &node);
|
2008-09-23 09:39:37 +00:00
|
|
|
|
2010-02-13 11:56:30 +00:00
|
|
|
/**
|
|
|
|
* This factory method creates an Archive instance corresponding to the content
|
|
|
|
* of the given ZIP compressed datastream.
|
|
|
|
* This takes ownership of the stream, in particular, it is deleted when the
|
|
|
|
* ZipArchive is deleted.
|
|
|
|
*
|
|
|
|
* May return 0 in case of a failure. In this case stream will still be deleted.
|
|
|
|
*/
|
|
|
|
Archive *makeZipArchive(SeekableReadStream *stream);
|
2008-09-05 22:12:46 +00:00
|
|
|
|
2008-09-23 09:50:03 +00:00
|
|
|
} // End of namespace Common
|
|
|
|
|
2010-02-13 11:56:30 +00:00
|
|
|
#endif
|