File indexing completed on 2024-05-19 04:49:26
0001 /**************************************************************************************** 0002 * Copyright (c) 2010 Ralf Engels <ralf-engels@gmx.de> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify it under * 0005 * the terms of the GNU General Public License as published by the Free Software * 0006 * Foundation; either version 2 of the License, or (at your option) any later * 0007 * version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0011 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0012 * * 0013 * You should have received a copy of the GNU General Public License along with * 0014 * this program. If not, see <http://www.gnu.org/licenses/>. * 0015 ****************************************************************************************/ 0016 0017 #ifndef AMAROK_COLLECTIONSCANCAPABILITY_H 0018 #define AMAROK_COLLECTIONSCANCAPABILITY_H 0019 0020 #include "core/amarokcore_export.h" 0021 #include "core/capabilities/Capability.h" 0022 0023 namespace Capabilities 0024 { 0025 /** 0026 * This capability allows to initiate a scan on a collection. 0027 * Currently only a few collections have this capability and even then it's unclear 0028 * Which collections uses the collection folders. 0029 * 0030 * @author Ralf Engels <ralf-engels@gmx.de> 0031 */ 0032 0033 class AMAROKCORE_EXPORT CollectionScanCapability : public Capabilities::Capability 0034 { 0035 Q_OBJECT 0036 public: 0037 0038 /** 0039 * Constructor 0040 */ 0041 CollectionScanCapability(); 0042 0043 /** 0044 * Destructor 0045 */ 0046 ~CollectionScanCapability() override; 0047 0048 /** Begin a full scan on the collection. 0049 */ 0050 virtual void startFullScan() = 0; 0051 0052 /** Begin an incremental scan on the collection. 0053 @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 0054 */ 0055 virtual void startIncrementalScan( const QString &directory = QString() ) = 0; 0056 0057 /** Stop a scan on this collection. 0058 */ 0059 virtual void stopScan() = 0; 0060 0061 /** 0062 * Get the capabilityInterfaceType of this capability 0063 * @return The capabilityInterfaceType ( always Capabilities::Capability::CollectionScan; ) 0064 */ 0065 static Type capabilityInterfaceType() { return Capabilities::Capability::CollectionScan; } 0066 }; 0067 } 0068 0069 #endif