annotate rdf/PluginRDFIndexer.h @ 457:ef14acd6d102

* Add beginnings of capability to search plugins that are not yet installed -- lots more work to do here, though
author Chris Cannam
date Tue, 14 Oct 2008 16:36:35 +0000
parents 64e64e304a12
children 2019d89ebcf9
rev   line source
Chris@439 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@439 2
Chris@439 3 /*
Chris@439 4 Sonic Visualiser
Chris@439 5 An audio file viewer and annotation editor.
Chris@439 6 Centre for Digital Music, Queen Mary, University of London.
Chris@439 7 This file copyright 2008 QMUL.
Chris@439 8
Chris@439 9 This program is free software; you can redistribute it and/or
Chris@439 10 modify it under the terms of the GNU General Public License as
Chris@439 11 published by the Free Software Foundation; either version 2 of the
Chris@439 12 License, or (at your option) any later version. See the file
Chris@439 13 COPYING included with this distribution for more information.
Chris@439 14 */
Chris@439 15
Chris@439 16 #ifndef _PLUGIN_RDF_INDEXER_H_
Chris@439 17 #define _PLUGIN_RDF_INDEXER_H_
Chris@439 18
Chris@439 19 #include <QString>
Chris@456 20 #include <QStringList>
Chris@439 21 #include <map>
Chris@439 22 #include <set>
Chris@439 23
Chris@439 24 class FileSource;
Chris@439 25
Chris@439 26 class PluginRDFIndexer
Chris@439 27 {
Chris@439 28 public:
Chris@439 29 static PluginRDFIndexer *getInstance();
Chris@439 30
Chris@456 31 bool indexURL(QString url); // in addition to "installed" URLs
Chris@456 32
Chris@439 33 QString getURIForPluginId(QString pluginId);
Chris@439 34 QString getIdForPluginURI(QString uri);
Chris@439 35 QString getDescriptionURLForPluginId(QString pluginId);
Chris@439 36 QString getDescriptionURLForPluginURI(QString uri);
Chris@439 37
Chris@456 38 QStringList getIndexedPluginIds();
Chris@456 39
Chris@439 40 ~PluginRDFIndexer();
Chris@439 41
Chris@439 42 protected:
Chris@439 43 PluginRDFIndexer();
Chris@457 44 std::set<FileSource *> m_sources;
Chris@439 45 typedef std::map<QString, QString> StringMap;
Chris@439 46 StringMap m_uriToIdMap;
Chris@439 47 StringMap m_idToUriMap;
Chris@439 48 StringMap m_idToDescriptionMap;
Chris@439 49 bool indexFile(QString path);
Chris@439 50 static PluginRDFIndexer *m_instance;
Chris@439 51 };
Chris@439 52
Chris@439 53 #endif
Chris@439 54