File indexing completed on 2024-04-28 04:57:33

0001 /* This file is part of the KDE project
0002 
0003    Copyright (C) 2008 Manolo Valdes <nolis71cu@gmail.com>
0004 
0005    This program is free software; you can redistribute it and/or
0006    modify it under the terms of the GNU General Public
0007    License as published by the Free Software Foundation; either
0008    version 2 of the License, or (at your option) any later version.
0009 */
0010 
0011 #include "mirrorsearchfactory.h"
0012 #include "mirrorsearchtransferdatasource.h"
0013 
0014 #include "core/scheduler.h"
0015 #include "core/transfergroup.h"
0016 
0017 #include "kget_debug.h"
0018 #include <QDebug>
0019 
0020 #include <QDomElement>
0021 
0022 K_PLUGIN_CLASS_WITH_JSON(MirrorSearchFactory, "kget_mirrorsearchfactory.json")
0023 
0024 MirrorSearchFactory::MirrorSearchFactory(QObject *parent, const QVariantList &args)
0025     : TransferFactory(parent, args)
0026 {
0027 }
0028 
0029 MirrorSearchFactory::~MirrorSearchFactory()
0030 {
0031 }
0032 
0033 TransferDataSource *MirrorSearchFactory::createTransferDataSource(const QUrl &srcUrl, const QDomElement &type, QObject *parent)
0034 {
0035     qCDebug(KGET_DEBUG);
0036 
0037     if (type.attribute("type") == "search") {
0038         return new MirrorSearchTransferDataSource(srcUrl, parent);
0039     }
0040     return nullptr;
0041 }
0042 
0043 #include "mirrorsearchfactory.moc"
0044 #include "moc_mirrorsearchfactory.cpp"