ScummVM API documentation
installshieldv3_archive.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef COMMON_INSTALLSHIELDV3_ARCHIVE_H
23#define COMMON_INSTALLSHIELDV3_ARCHIVE_H
24
25#include "common/archive.h"
26#include "common/scummsys.h"
27#include "common/endian.h"
28#include "common/file.h"
29#include "common/hash-str.h"
30#include "common/hashmap.h"
31#include "common/str.h"
32
33namespace Common {
34
36public:
38 ~InstallShieldV3() override;
39
40 bool open(const Common::Path &filename);
41 bool open(const Common::FSNode &node);
42 bool open(Common::SeekableReadStream *stream);
43 void close();
44 bool isOpen() const { return _stream != nullptr; }
45
46 // Common::Archive API implementation
47 bool hasFile(const Common::Path &path) const override;
48 int listMembers(Common::ArchiveMemberList &list) const override;
49 const Common::ArchiveMemberPtr getMember(const Common::Path &path) const override;
51 char getPathSeparator() const override;
52
53private:
54 struct FileEntry {
55 uint32 uncompressedSize;
56 uint32 compressedSize;
57 uint32 offset;
58 };
59
60 bool read();
61
63
65 FileMap _map;
66};
67
68} // End of namespace Common
69
70#endif
Definition: archive.h:141
Definition: fs.h:69
Definition: installshieldv3_archive.h:35
Common::SeekableReadStream * createReadStreamForMember(const Common::Path &path) const override
int listMembers(Common::ArchiveMemberList &list) const override
const Common::ArchiveMemberPtr getMember(const Common::Path &path) const override
bool hasFile(const Common::Path &path) const override
char getPathSeparator() const override
Definition: list.h:44
Definition: path.h:52
Definition: stream.h:745
Definition: algorithm.h:29