/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #ifndef ASSETSCANNER_H #define ASSETSCANNER_H #if !defined(Q_MOC_RUN) #include "native/assetprocessor.h" #include "assetScannerWorker.h" #include "assetScanFolderInfo.h" #include #include #include #endif namespace AssetProcessor { class PlatformConfiguration; /** This Class is responsible for scanning for assets at startup */ class AssetScanner : public QObject { Q_OBJECT public: explicit AssetScanner(PlatformConfiguration* config, QObject* parent = nullptr); virtual ~AssetScanner(); void StartScan();//Should be called to start a scan void StopScan();//Should be called to stop a scan Q_INVOKABLE AssetScanningStatus status() const; Q_SIGNALS: void AssetScanningStatusChanged(AssetScanningStatus status); void FilesFound(QSet files); void FoldersFound(QSet folders); void ExcludedFound(QSet excluded); private: QThread m_assetWorkerScannerThread; AssetScannerWorker m_assetScannerWorker; bool m_workerCreated = false; AZStd::atomic m_status; }; }// end namespace AssetProcessor #endif // ASSETSCANNER_H