/* This file is part of the KDE project SPDX-FileCopyrightText: 2017 David Faure SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ #ifndef SEARCHPROVIDERREGISTRY_H #define SEARCHPROVIDERREGISTRY_H #include #include class SearchProvider; /** * Memory cache for search provider desktop files */ class SearchProviderRegistry { public: /** * Default constructor */ SearchProviderRegistry(); /** * Destructor */ ~SearchProviderRegistry(); SearchProviderRegistry(const SearchProviderRegistry &) = delete; SearchProviderRegistry &operator=(const SearchProviderRegistry &) = delete; QList findAll(); SearchProvider *findByKey(const QString &key) const; SearchProvider *findByDesktopName(const QString &desktopName) const; void reload(); private: QStringList directories() const; QList m_searchProviders; QMap m_searchProvidersByKey; QMap m_searchProvidersByDesktopName; }; #endif // SEARCHPROVIDERREGISTRY_H