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@1581
|
16 #ifndef SV_PLUGIN_RDF_DESCRIPTION_H
|
Chris@1581
|
17 #define SV_PLUGIN_RDF_DESCRIPTION_H
|
Chris@439
|
18
|
Chris@439
|
19 #include <QString>
|
Chris@457
|
20 #include <QStringList>
|
Chris@439
|
21 #include <map>
|
Chris@1843
|
22 #include <set>
|
Chris@439
|
23
|
Chris@686
|
24 #include "base/Debug.h"
|
Chris@686
|
25
|
Chris@439
|
26 class PluginRDFDescription
|
Chris@439
|
27 {
|
Chris@439
|
28 public:
|
Chris@439
|
29 PluginRDFDescription() : m_haveDescription(false) { }
|
Chris@439
|
30 PluginRDFDescription(QString pluginId);
|
Chris@439
|
31 ~PluginRDFDescription();
|
Chris@439
|
32
|
Chris@439
|
33 enum OutputDisposition
|
Chris@439
|
34 {
|
Chris@439
|
35 OutputDispositionUnknown,
|
Chris@439
|
36 OutputSparse,
|
Chris@439
|
37 OutputDense,
|
Chris@439
|
38 OutputTrackLevel
|
Chris@439
|
39 };
|
Chris@439
|
40
|
Chris@439
|
41 bool haveDescription() const;
|
Chris@457
|
42
|
Chris@457
|
43 QString getPluginName() const;
|
Chris@457
|
44 QString getPluginDescription() const;
|
Chris@457
|
45 QString getPluginMaker() const;
|
Chris@462
|
46 QString getPluginInfoURL() const;
|
Chris@1843
|
47 QString getPluginDownloadURL() const;
|
Chris@457
|
48
|
Chris@1843
|
49 enum DownloadType
|
Chris@1843
|
50 {
|
Chris@1843
|
51 DownloadSourceCode,
|
Chris@1843
|
52 DownloadWindows,
|
Chris@1843
|
53 DownloadMac,
|
Chris@1843
|
54 DownloadLinux32,
|
Chris@1843
|
55 DownloadLinux64,
|
Chris@1843
|
56 DownloadOther
|
Chris@1843
|
57 };
|
Chris@1843
|
58 std::set<DownloadType> getPluginDownloadTypes() const;
|
Chris@1843
|
59
|
Chris@1843
|
60 struct Pack
|
Chris@1843
|
61 {
|
Chris@1843
|
62 QString name;
|
Chris@1843
|
63 QString downloadURL;
|
Chris@1843
|
64 };
|
Chris@1843
|
65 std::map<QString, Pack> getPluginFoundInPacks() const; // uri -> pack
|
Chris@1843
|
66
|
Chris@457
|
67 QStringList getOutputIds() const;
|
Chris@457
|
68 QString getOutputName(QString outputId) const;
|
Chris@439
|
69 OutputDisposition getOutputDisposition(QString outputId) const;
|
Chris@439
|
70 QString getOutputEventTypeURI(QString outputId) const;
|
Chris@440
|
71 QString getOutputFeatureAttributeURI(QString outputId) const;
|
Chris@440
|
72 QString getOutputSignalTypeURI(QString outputId) const;
|
Chris@439
|
73 QString getOutputUnit(QString outputId) const;
|
Chris@494
|
74 QString getOutputUri(QString outputId) const;
|
Chris@439
|
75
|
Chris@439
|
76 protected:
|
Chris@439
|
77 typedef std::map<QString, OutputDisposition> OutputDispositionMap;
|
Chris@439
|
78 typedef std::map<QString, QString> OutputStringMap;
|
Chris@439
|
79
|
Chris@439
|
80 QString m_pluginId;
|
Chris@489
|
81 QString m_pluginUri;
|
Chris@439
|
82 bool m_haveDescription;
|
Chris@457
|
83 QString m_pluginName;
|
Chris@457
|
84 QString m_pluginDescription;
|
Chris@457
|
85 QString m_pluginMaker;
|
Chris@462
|
86 QString m_pluginInfoURL;
|
Chris@1843
|
87 QString m_pluginDownloadURL;
|
Chris@1843
|
88 std::set<DownloadType> m_pluginDownloadTypes;
|
Chris@1843
|
89 std::map<QString, Pack> m_pluginFoundInPacks;
|
Chris@457
|
90 OutputStringMap m_outputNames;
|
Chris@439
|
91 OutputDispositionMap m_outputDispositions;
|
Chris@439
|
92 OutputStringMap m_outputEventTypeURIMap;
|
Chris@440
|
93 OutputStringMap m_outputFeatureAttributeURIMap;
|
Chris@440
|
94 OutputStringMap m_outputSignalTypeURIMap;
|
Chris@439
|
95 OutputStringMap m_outputUnitMap;
|
Chris@494
|
96 OutputStringMap m_outputUriMap;
|
Chris@489
|
97 bool index();
|
Chris@489
|
98 bool indexMetadata();
|
Chris@489
|
99 bool indexOutputs();
|
Chris@439
|
100 };
|
Chris@439
|
101
|
Chris@439
|
102 #endif
|
Chris@439
|
103
|