File indexing completed on 2024-11-24 04:55:02

0001 /*
0002  *   SPDX-FileCopyrightText: 2022 Jeremy Whiting <jeremy.whiting@collabora.com>
0003  *
0004  *   SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #ifndef STEAMOSTRANSACTION_H
0008 #define STEAMOSTRANSACTION_H
0009 
0010 #include <QPointer>
0011 #include <Transaction/Transaction.h>
0012 
0013 #include "atomupd1.h"
0014 
0015 class QTimer;
0016 class SteamOSResource;
0017 class SteamOSTransaction : public Transaction
0018 {
0019     Q_OBJECT
0020 public:
0021     SteamOSTransaction(SteamOSResource *app, Role role, ComSteampoweredAtomupd1Interface *interface);
0022 
0023     void cancel() override;
0024 
0025 Q_SIGNALS:
0026     void needReboot();
0027 
0028 private Q_SLOTS:
0029     void refreshStatus();
0030 
0031 private:
0032     void finishTransaction();
0033 
0034     SteamOSResource *const m_app;
0035     QPointer<ComSteampoweredAtomupd1Interface> m_interface; // Interface to atomupd dbus api
0036 };
0037 
0038 #endif // STEAMOSTRANSACTION_H