aboutsummaryrefslogtreecommitdiff
path: root/common/archive.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/archive.h')
-rw-r--r--common/archive.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/common/archive.h b/common/archive.h
index b005090a87..5aca4bd450 100644
--- a/common/archive.h
+++ b/common/archive.h
@@ -51,7 +51,8 @@ public:
virtual SeekableReadStream *open() = 0;
};
-typedef List<SharedPtr<ArchiveMember> > ArchiveMemberList;
+typedef SharedPtr<ArchiveMember> ArchiveMemberPtr;
+typedef List<ArchiveMemberPtr> ArchiveMemberList;
class Archive;
@@ -107,6 +108,11 @@ public:
virtual int listMembers(ArchiveMemberList &list) = 0;
/**
+ * Returns a ArchiveMember representation of the given file.
+ */
+ virtual ArchiveMemberPtr getMember(const String &name) = 0;
+
+ /**
* Create a stream bound to a file in the archive.
* @return the newly created input stream
*/
@@ -209,6 +215,12 @@ public:
virtual int listMembers(ArchiveMemberList &list);
/**
+ * Get a ArchiveMember representation of the specified file. A full match of relative
+ * path and filename is needed for success.
+ */
+ virtual ArchiveMemberPtr getMember(const String &name);
+
+ /**
* Open the specified file. A full match of relative path and filename is needed
* for success.
*/
@@ -273,6 +285,8 @@ public:
virtual int listMatchingMembers(ArchiveMemberList &list, const String &pattern);
virtual int listMembers(ArchiveMemberList &list);
+ virtual ArchiveMemberPtr getMember(const String &name);
+
/**
* Implements openFile from Archive base class. The current policy is
* opening the first file encountered that matches the name.