Mercurial > hg > svcore
changeset 456:64e64e304a12
* minor addition to help out future work
author | Chris Cannam |
---|---|
date | Mon, 13 Oct 2008 13:53:05 +0000 |
parents | 3e0f1f7bec85 |
children | ef14acd6d102 |
files | rdf/PluginRDFIndexer.cpp rdf/PluginRDFIndexer.h |
diffstat | 2 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rdf/PluginRDFIndexer.cpp Thu Oct 09 20:10:28 2008 +0000 +++ b/rdf/PluginRDFIndexer.cpp Mon Oct 13 13:53:05 2008 +0000 @@ -153,6 +153,17 @@ return getDescriptionURLForPluginId(id); } +QStringList +PluginRDFIndexer::getIndexedPluginIds() +{ + QStringList ids; + for (StringMap::const_iterator i = m_idToDescriptionMap.begin(); + i != m_idToDescriptionMap.end(); ++i) { + ids.push_back(i->first); + } + return ids; +} + bool PluginRDFIndexer::indexFile(QString filepath) {
--- a/rdf/PluginRDFIndexer.h Thu Oct 09 20:10:28 2008 +0000 +++ b/rdf/PluginRDFIndexer.h Mon Oct 13 13:53:05 2008 +0000 @@ -17,6 +17,7 @@ #define _PLUGIN_RDF_INDEXER_H_ #include <QString> +#include <QStringList> #include <map> #include <set> @@ -27,11 +28,15 @@ public: static PluginRDFIndexer *getInstance(); + bool indexURL(QString url); // in addition to "installed" URLs + QString getURIForPluginId(QString pluginId); QString getIdForPluginURI(QString uri); QString getDescriptionURLForPluginId(QString pluginId); QString getDescriptionURLForPluginURI(QString uri); + QStringList getIndexedPluginIds(); + ~PluginRDFIndexer(); protected: @@ -41,7 +46,6 @@ StringMap m_idToUriMap; StringMap m_idToDescriptionMap; bool indexFile(QString path); - bool indexURL(QString url); std::set<FileSource *> m_cache; static PluginRDFIndexer *m_instance; };