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

0001 /* This file is part of the KDE project
0002 
0003    Copyright (C) 2004 Dario Massarin <nekkar@libero.it>
0004    Copyright (C) 2009 Lukas Appelhans <l.appelhans@gmx.de>
0005 
0006    This program is free software; you can redistribute it and/or
0007    modify it under the terms of the GNU General Public
0008    License as published by the Free Software Foundation; either
0009    version 2 of the License, or (at your option) any later version.
0010 */
0011 
0012 #include "transferfactory.h"
0013 
0014 #include "kget.h"
0015 
0016 #include <KLocalizedString>
0017 #include <QDebug>
0018 
0019 TransferFactory::TransferFactory(QObject *parent, const QVariantList &args)
0020     : KGetPlugin(parent, args)
0021 {
0022 }
0023 
0024 Transfer *TransferFactory::createTransfer(const QUrl &srcUrl, const QUrl &destUrl, TransferGroup *parent, Scheduler *scheduler, const QDomElement *n)
0025 {
0026     Q_UNUSED(srcUrl)
0027     Q_UNUSED(destUrl)
0028     Q_UNUSED(parent)
0029     Q_UNUSED(scheduler)
0030     Q_UNUSED(n)
0031     return nullptr;
0032 }
0033 
0034 TransferHandler *TransferFactory::createTransferHandler(Transfer *transfer, Scheduler *scheduler)
0035 {
0036     return new TransferHandler(transfer, scheduler);
0037 }
0038 
0039 QWidget *TransferFactory::createDetailsWidget(TransferHandler *transfer)
0040 {
0041     Q_UNUSED(transfer)
0042     return nullptr;
0043 }
0044 
0045 QDialog *TransferFactory::createNewTransferDialog(const QUrl &srcUrl, const QString &suggestedFileName, TransferGroupHandler *defaultGroup)
0046 {
0047     Q_UNUSED(srcUrl)
0048     Q_UNUSED(suggestedFileName)
0049     Q_UNUSED(defaultGroup)
0050     return nullptr;
0051 }
0052 
0053 const QList<QAction *> TransferFactory::actions(TransferHandler *handler)
0054 {
0055     Q_UNUSED(handler)
0056     return QList<QAction *>();
0057 }
0058 
0059 TransferDataSource *TransferFactory::createTransferDataSource(const QUrl &srcUrl, const QDomElement &type, QObject *parent)
0060 {
0061     Q_UNUSED(srcUrl)
0062     Q_UNUSED(type)
0063     Q_UNUSED(parent)
0064     return nullptr;
0065 }
0066 
0067 bool TransferFactory::isSupported(const QUrl &url) const
0068 {
0069     Q_UNUSED(url)
0070     return false;
0071 }
0072 
0073 QStringList TransferFactory::addsProtocols() const
0074 {
0075     return QStringList();
0076 }
0077 
0078 QString TransferFactory::displayName() const
0079 {
0080     return QStringLiteral("Undefined");
0081 }
0082 
0083 #include "moc_transferfactory.cpp"