Chris@439: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@439: Chris@439: /* Chris@439: Sonic Visualiser Chris@439: An audio file viewer and annotation editor. Chris@439: Centre for Digital Music, Queen Mary, University of London. Chris@439: This file copyright 2008 QMUL. Chris@439: Chris@439: This program is free software; you can redistribute it and/or Chris@439: modify it under the terms of the GNU General Public License as Chris@439: published by the Free Software Foundation; either version 2 of the Chris@439: License, or (at your option) any later version. See the file Chris@439: COPYING included with this distribution for more information. Chris@439: */ Chris@439: Chris@439: #ifndef _PLUGIN_RDF_INDEXER_H_ Chris@439: #define _PLUGIN_RDF_INDEXER_H_ Chris@439: Chris@439: #include Chris@456: #include Chris@439: #include Chris@439: #include Chris@439: Chris@439: class FileSource; Chris@439: Chris@439: class PluginRDFIndexer Chris@439: { Chris@439: public: Chris@439: static PluginRDFIndexer *getInstance(); Chris@439: Chris@456: bool indexURL(QString url); // in addition to "installed" URLs Chris@456: Chris@439: QString getURIForPluginId(QString pluginId); Chris@439: QString getIdForPluginURI(QString uri); Chris@439: QString getDescriptionURLForPluginId(QString pluginId); Chris@439: QString getDescriptionURLForPluginURI(QString uri); Chris@439: Chris@456: QStringList getIndexedPluginIds(); Chris@456: Chris@439: ~PluginRDFIndexer(); Chris@439: Chris@439: protected: Chris@439: PluginRDFIndexer(); Chris@457: std::set m_sources; Chris@439: typedef std::map StringMap; Chris@439: StringMap m_uriToIdMap; Chris@439: StringMap m_idToUriMap; Chris@439: StringMap m_idToDescriptionMap; Chris@439: bool indexFile(QString path); Chris@439: static PluginRDFIndexer *m_instance; Chris@439: }; Chris@439: Chris@439: #endif Chris@439: