File indexing completed on 2024-11-17 04:55:38
0001 /* 0002 * SPDX-FileCopyrightText: 2013 Aleix Pol Gonzalez <aleixpol@blue-systems.com> 0003 * SPDX-FileCopyrightText: 2017 Jan Grulich <jgrulich@redhat.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0006 */ 0007 0008 #pragma once 0009 0010 #include "flatpak-helper.h" 0011 #include <QPointer> 0012 #include <Transaction/Transaction.h> 0013 0014 #include <gio/gio.h> 0015 #include <glib.h> 0016 0017 class FlatpakResource; 0018 class FlatpakTransactionThread; 0019 class FlatpakJobTransaction : public Transaction 0020 { 0021 Q_OBJECT 0022 public: 0023 FlatpakJobTransaction(FlatpakResource *app, Role role, bool delayStart = false); 0024 0025 ~FlatpakJobTransaction(); 0026 0027 void cancel() override; 0028 0029 public Q_SLOTS: 0030 void finishTransaction(); 0031 void start(); 0032 0033 Q_SIGNALS: 0034 void repositoriesAdded(const QMap<QString, QStringList> &repositoryNames); 0035 0036 private: 0037 void updateProgress(); 0038 0039 QPointer<FlatpakResource> m_app; 0040 QPointer<FlatpakTransactionThread> m_appJob; 0041 };