// // BatchLoader.h // libraries/script-engine/src // // Created by Ryan Huffman on 01/22/15 // Copyright 2015 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #ifndef hifi_BatchLoader_h #define hifi_BatchLoader_h #include #include #include #include #include #include #include class ScriptCacheSignalProxy : public QObject { Q_OBJECT public: void receivedContent(const QString& url, const QString& contents, bool isURL, bool success); signals: void contentAvailable(const QString& url, const QString& contents, bool isURL, bool success); }; class BatchLoader : public QObject { Q_OBJECT public: BatchLoader(const QList& urls); void start(); bool isFinished() const { return _finished; }; signals: void finished(const QMap& data); private: void checkFinished(); bool _started; bool _finished; QSet _urls; QMap _data; }; #endif // hifi_BatchLoader_h