Make plasma libs build.
[amarok.git] / src / collection / Collection.h
blobcf289c27caaf0c215b474ea3aeb6fd04f2093dc4
1 /*
2 * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick@googlemail.com>
4 * This program 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 2 of the License, or
7 * (at your option) any later version.
9 * This program 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 this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 #ifndef AMAROK_COLLECTION_H
19 #define AMAROK_COLLECTION_H
21 #include "amarok.h"
22 #include "amarok_export.h"
23 #include "plugin/plugin.h"
24 #include "QueryMaker.h"
26 #include <QObject>
27 #include <QString>
29 #include <KUrl>
31 class Collection;
32 class CollectionLocation;
34 class AMAROK_EXPORT CollectionFactory : public QObject, public Amarok::Plugin
36 Q_OBJECT
37 public:
38 CollectionFactory();
39 virtual ~CollectionFactory();
41 virtual void init() = 0;
43 signals:
44 void newCollection( Collection *newCollection );
48 class AMAROK_EXPORT Collection : public QObject
50 Q_OBJECT
51 public:
53 Collection();
54 virtual ~Collection();
56 virtual QueryMaker * queryMaker() = 0;
57 virtual void startFullScan() { }
58 virtual void startIncrementalScan() {}
60 virtual QString collectionId() const = 0;
61 virtual QString prettyName() const = 0;
63 virtual bool possiblyContainsTrack( const KUrl &url ) const;
64 virtual Meta::TrackPtr trackForUrl( const KUrl &url );
66 virtual CollectionLocation* location() const;
68 signals:
69 void remove();
70 void updated();
73 #endif /* AMAROK_COLLECTION_H */