| 1 |
/**************************************************************************************** |
| 2 |
* Copyright (c) 2010 Ralf Engels <[email protected]> * |
| 3 |
* * |
| 4 |
* This program is free software; you can redistribute it and/or modify it under * |
| 5 |
* the terms of the GNU General Public License as published by the Free Software * |
| 6 |
* Foundation; either version 2 of the License, or (at your option) any later * |
| 7 |
* version. * |
| 8 |
* * |
| 9 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY * |
| 10 |
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * |
| 11 |
* PARTICULAR PURPOSE. See the GNU General Public License for more details. * |
| 12 |
* * |
| 13 |
* You should have received a copy of the GNU General Public License along with * |
| 14 |
* this program. If not, see <http://www.gnu.org/licenses/>. * |
| 15 |
****************************************************************************************/ |
| 16 |
|
| 17 |
#ifndef AMAROK_COLLECTIONSCANCAPABILITY_H |
| 18 |
#define AMAROK_COLLECTIONSCANCAPABILITY_H |
| 19 |
|
| 20 |
#include "core/amarokcore_export.h" |
| 21 |
#include "core/capabilities/Capability.h" |
| 22 |
|
| 23 |
namespace Capabilities |
| 24 |
{ |
| 25 |
/** |
| 26 |
* This capability allows to initiate a scan on a collection. |
| 27 |
* Currently only a few collections have this capability and even then it's unclear |
| 28 |
* Which collections uses the collection folders. |
| 29 |
* |
| 30 |
* @author Ralf Engels <[email protected]> |
| 31 |
*/ |
| 32 |
|
| 33 |
class AMAROKCORE_EXPORT CollectionScanCapability : public Capabilities::Capability |
| 34 |
{ |
| 35 |
Q_OBJECT |
| 36 |
public: |
| 37 |
|
| 38 |
/** |
| 39 |
* Constructor |
| 40 |
*/ |
| 41 |
CollectionScanCapability(); |
| 42 |
|
| 43 |
/** |
| 44 |
* Destructor |
| 45 |
*/ |
| 46 |
~CollectionScanCapability() override; |
| 47 |
|
| 48 |
/** Begin a full scan on the collection. |
| 49 |
*/ |
| 50 |
virtual void startFullScan() = 0; |
| 51 |
|
| 52 |
/** Begin an incremental scan on the collection. |
| 53 |
@p directory An optional specification of which directory to scan. If empty the scanner will check all the collections directories set in the Amarok settings |
| 54 |
*/ |
| 55 |
virtual void startIncrementalScan( const QString &directory = QString() ) = 0; |
| 56 |
|
| 57 |
/** Stop a scan on this collection. |
| 58 |
*/ |
| 59 |
virtual void stopScan() = 0; |
| 60 |
|
| 61 |
/** |
| 62 |
* Get the capabilityInterfaceType of this capability |
| 63 |
* @return The capabilityInterfaceType ( always Capabilities::Capability::CollectionScan; ) |
| 64 |
*/ |
| 65 |
static Type capabilityInterfaceType() { return Capabilities::Capability::CollectionScan; } |
| 66 |
}; |
| 67 |
} |
| 68 |
|
| 69 |
#endif |