]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/collectionsource.h
Add an API to open files from a collection's sources
[libs/datafile.git] / source / collectionsource.h
index 61bb11555decbbf85d36500f18ed829073b64f31..398f7942c85c6260d514796beac77146b5cc7d32 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <list>
 #include <string>
+#include <msp/io/seekable.h>
 
 namespace Msp {
 namespace DataFile {
@@ -31,6 +32,10 @@ public:
        virtual NameList get_names(const CollectionItemTypeBase &type) const = 0;
 
        virtual void load(Collection &, const CollectionItemTypeBase &, const std::string &) const = 0;
+
+       /** Opens a file from the source.  The caller is responsible for deleting
+       the returned object when done with it. */
+       virtual IO::Seekable *open(const std::string &) const = 0;
 };
 
 } // namespace DataFile