diff options
Diffstat (limited to 'common/archive.h')
-rw-r--r-- | common/archive.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/common/archive.h b/common/archive.h index 89ea6a5ce2..246d9da8cf 100644 --- a/common/archive.h +++ b/common/archive.h @@ -153,7 +153,7 @@ public: */ class SearchSet : public Archive { struct Node { - uint _priority; + int _priority; String _name; ArchivePtr _arc; }; @@ -169,7 +169,7 @@ public: /** * Add a new archive to the searchable set. */ - void add(const String& name, ArchivePtr archive, uint priority = 0); + void add(const String& name, ArchivePtr archive, int priority = 0); /** * Remove an archive from the searchable set. @@ -184,12 +184,12 @@ public: /** * Empties the searchable set. */ - void clear(); + virtual void clear(); /** * Change the order of searches. */ - void setPriority(const String& name, uint priority); + void setPriority(const String& name, int priority); virtual bool hasFile(const String &name); virtual int matchPattern(StringList &list, const String &pattern); @@ -205,22 +205,28 @@ public: class SearchManager : public Singleton<SearchManager>, public SearchSet { public: + SearchManager(); + /** * Add an existing Archive. This is meant to support searching in system-specific * archives, namely the MACOSX/IPHONE bundles. */ - void addArchive(const String &name, ArchivePtr archive); + void addArchive(const String &name, ArchivePtr archive, int priority = 0); /** * Create and add a FSDirectory by name */ - void addDirectory(const String &name, const String &directory); + void addDirectory(const String &name, const String &directory, int priority = 0); /** * Create and add a FSDirectory and its subdirectories by name */ - void addDirectoryRecursive(const String &name, const String &directory, int depth = 4); + void addDirectoryRecursive(const String &name, const String &directory, int depth = 4, int priority = 0); + /** + * TODO + */ + virtual void clear(); }; /** Shortcut for accessing the search manager. */ |