1
/* This file is part of Clementine.
2
Copyright 2011, David Sansome <me@davidsansome.com>
4
Clementine is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
9
Clementine is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef GLOBALSEARCHSERVICERESULT_H
19
#define GLOBALSEARCHSERVICERESULT_H
21
// This file contains definitions that are shared between Clementine and any
22
// external applications that need to do global searches over DBus.
27
# include <QDBusArgument>
32
namespace globalsearch {
34
// The order of types here is the order they'll appear in the UI.
42
// A token in the search string matched at the beginning of the song
46
// A token matched somewhere else.
52
} // namespace globalsearch
57
struct GlobalSearchServiceResult {
58
// When adding new fields to this struct remember to update the dbus signature
59
// which is duplicated in the xml specification and in clementinerunner.cpp
64
QString provider_name_;
65
globalsearch::Type type_;
66
globalsearch::MatchQuality match_quality_;
73
QString album_artist_;
77
// Not included in the dbus emission.
81
typedef QList<GlobalSearchServiceResult> GlobalSearchServiceResultList;
83
Q_DECLARE_METATYPE(GlobalSearchServiceResult)
84
Q_DECLARE_METATYPE(GlobalSearchServiceResultList)
86
QDBusArgument& operator <<(QDBusArgument& arg, const GlobalSearchServiceResult& result);
87
const QDBusArgument& operator >>(const QDBusArgument& arg, GlobalSearchServiceResult& result);
92
#endif // GLOBALSEARCHSERVICERESULT_H