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
22 #include "amarok_export.h"
23 #include "plugin/plugin.h"
24 #include "QueryMaker.h"
32 class CollectionLocation
;
34 class AMAROK_EXPORT CollectionFactory
: public QObject
, public Amarok::Plugin
39 virtual ~CollectionFactory();
41 virtual void init() = 0;
44 void newCollection( Collection
*newCollection
);
48 class AMAROK_EXPORT Collection
: public QObject
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;
73 #endif /* AMAROK_COLLECTION_H */