File indexing completed on 2024-05-12 05:48:10

0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0002 // SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
0003 
0004 #pragma once
0005 
0006 #include <QUrl>
0007 
0008 #include <KIO/Job>
0009 
0010 #include "busobject.h"
0011 
0012 class CopyCommand : public BusObject
0013 {
0014     Q_OBJECT
0015     Q_CLASSINFO("D-Bus Interface", "org.kde.kio.admin.CopyCommand")
0016 public:
0017     explicit CopyCommand(const QUrl &src,
0018                          const QUrl &dst,
0019                          int permissions,
0020                          KIO::JobFlags flags,
0021                          const QString &remoteService,
0022                          const QDBusObjectPath &objectPath,
0023                          QObject *parent = nullptr);
0024 
0025 public Q_SLOTS:
0026     void start();
0027 
0028 Q_SIGNALS:
0029     void result(int error, const QString &errorString);
0030 
0031 private:
0032     const QUrl m_src;
0033     const QUrl m_dst;
0034     const int m_permissions;
0035     const KIO::JobFlags m_flags;
0036 };