/* This file is subject to the terms and conditions defined in * file 'LICENSE.txt', which is part of this source code package. */ #pragma once #include #include #include class DB; class Configuration; class CollectionInfo; class Item; class CollectionDatabase { public: CollectionDatabase(DB &db, Configuration &c); virtual ~CollectionDatabase(); bool Initialize(); bool Import(); bool ResetDatabase(); bool GetCollection(std::string collectionName, std::vector &list); bool SetHidden(std::string collectionName, Item *item, bool hidden); private: unsigned long CalculateCollectionCrc32(CollectionInfo *info); bool CollectionChanged(CollectionInfo *info, unsigned long crc32); unsigned long CrcFile(std::string file, unsigned long crc); // bool ImportMetadata(CollectionInfo *info); bool ImportDirectory(CollectionInfo *info, unsigned long crc32); bool ImportBasicList(CollectionInfo *info, std::string file, std::map &list); bool ImportHyperList(CollectionInfo *info, std::string file, std::map &list); std::map *ImportHyperList(CollectionInfo *info); Configuration &Config; DB &DBInstance; };