aboutsummaryrefslogtreecommitdiff
path: root/common/unarj.h
diff options
context:
space:
mode:
authorNicola Mettifogo2010-02-08 16:14:04 +0000
committerNicola Mettifogo2010-02-08 16:14:04 +0000
commitb658c61155ff189fe4381ba774993a69a3f572ea (patch)
treef1253fedfa1acdf0f4e71b13cfb78cc552809847 /common/unarj.h
parenta9a0fdc69474f0491aa2662cb83ff8b7661ebd1a (diff)
downloadscummvm-rg350-b658c61155ff189fe4381ba774993a69a3f572ea.tar.gz
scummvm-rg350-b658c61155ff189fe4381ba774993a69a3f572ea.tar.bz2
scummvm-rg350-b658c61155ff189fe4381ba774993a69a3f572ea.zip
Let ArjFile return a SeekableReadStream instead of implementing
the same interface itself. The caller is now responsible for deleting the returned streams. svn-id: r47994
Diffstat (limited to 'common/unarj.h')
-rw-r--r--common/unarj.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/common/unarj.h b/common/unarj.h
index 992240be67..eaf2bb4f85 100644
--- a/common/unarj.h
+++ b/common/unarj.h
@@ -37,7 +37,7 @@ typedef HashMap<String, int, IgnoreCase_Hash, IgnoreCase_EqualTo> ArjFilesMap;
// TODO: Get rid of this class, by implementing an ArjArchive subclass of Common::Archive.
// Then ArjFile can be substituted by a SearchSet full of ArjArchives plus SearchMan.
-class ArjFile : public SeekableReadStream, public NonCopyable {
+class ArjFile : public NonCopyable {
public:
ArjFile();
~ArjFile();
@@ -46,15 +46,7 @@ public:
void registerArchive(const String &filename);
- bool open(const Common::String &filename);
- void close();
-
- uint32 read(void *dataPtr, uint32 dataSize);
- bool eos() const;
- int32 pos() const;
- int32 size() const;
- bool seek(int32 offset, int whence = SEEK_SET);
- bool isOpen() { return _uncompressed != 0; }
+ SeekableReadStream *open(const Common::String &filename);
private:
bool _fallBack;
@@ -62,8 +54,6 @@ private:
Array<ArjHeader *> _headers;
ArjFilesMap _fileMap;
StringMap _archMap;
-
- SeekableReadStream *_uncompressed;
};
} // End of namespace Common