File indexing completed on 2024-05-12 05:28:50
0001 /* 0002 * SPDX-FileCopyrightText: 2017 Aleix Pol Gonzalez <aleixpol@kde.org> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #pragma once 0008 0009 #include "discovercommon_export.h" 0010 0011 #include <AppStreamQt/pool.h> 0012 #include <AppStreamQt/release.h> 0013 #include <KOSRelease> 0014 #include <QObject> 0015 0016 #include <optional> 0017 0018 class DISCOVERCOMMON_EXPORT AppStreamIntegration : public QObject 0019 { 0020 Q_OBJECT 0021 public: 0022 static AppStreamIntegration *global(); 0023 0024 std::optional<AppStream::Release> getDistroUpgrade(AppStream::Pool *pool); 0025 KOSRelease *osRelease() 0026 { 0027 return &m_osrelease; 0028 } 0029 0030 private: 0031 KOSRelease m_osrelease; 0032 0033 AppStreamIntegration() 0034 { 0035 } 0036 };