File indexing completed on 2024-05-12 04:55:35
0001 /** 0002 * \file acoustidimportplugin.h 0003 * AcoustID import plugin. 0004 * 0005 * \b Project: Kid3 0006 * \author Urs Fleisch 0007 * \date 21 Jul 2013 0008 * 0009 * Copyright (C) 2013-2024 Urs Fleisch 0010 * 0011 * This file is part of Kid3. 0012 * 0013 * Kid3 is free software; you can redistribute it and/or modify 0014 * it under the terms of the GNU General Public License as published by 0015 * the Free Software Foundation; either version 2 of the License, or 0016 * (at your option) any later version. 0017 * 0018 * Kid3 is distributed in the hope that it will be useful, 0019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0021 * GNU General Public License for more details. 0022 * 0023 * You should have received a copy of the GNU General Public License 0024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0025 */ 0026 0027 #pragma once 0028 0029 #include <QObject> 0030 #include "iservertrackimporterfactory.h" 0031 0032 /** 0033 * AcoustID import plugin. 0034 */ 0035 class KID3_PLUGIN_EXPORT AcoustidImportPlugin 0036 : public QObject, public IServerTrackImporterFactory { 0037 Q_OBJECT 0038 Q_PLUGIN_METADATA(IID "org.kde.kid3.IServerTrackImporterFactory") 0039 Q_INTERFACES(IServerTrackImporterFactory) 0040 public: 0041 /*! 0042 * Constructor. 0043 * @param parent parent object 0044 */ 0045 explicit AcoustidImportPlugin(QObject* parent = nullptr); 0046 0047 /** 0048 * Destructor. 0049 */ 0050 ~AcoustidImportPlugin() override = default; 0051 0052 /** 0053 * Get keys of available server importers. 0054 * @return list of keys. 0055 */ 0056 QStringList serverTrackImporterKeys() const override; 0057 0058 /** 0059 * Create server importer. 0060 * @param key server importer key 0061 * @param netMgr network access manager 0062 * @param trackDataModel track data to be filled with imported values 0063 * @return server importer instance, 0 if key unknown. 0064 * @remarks The caller takes ownership of the returned instance. 0065 */ 0066 ServerTrackImporter* createServerTrackImporter( 0067 const QString& key, 0068 QNetworkAccessManager* netMgr, TrackDataModel* trackDataModel) override; 0069 };