on dc3a20d help sign in
39 lines 1.2 kB history raw
1/*
2 * Copyright (C) 2019 UBports Foundation.
3 * Author(s): Marius Gripsgard <marius@ubports.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 3.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
18#include <QObject>
20class XdgWatcher: public QObject
22 Q_OBJECT
23public:
24 XdgWatcher(QObject* parent = nullptr);
26 // testing
27 static XdgWatcher* instance();
28 static const QString stripAppIdVersion(const QString rawAppID);
29 void addMockApp(const QString &appId);
30 void removeMockApp(const QString &appId);
31Q_SIGNALS:
32 void appAdded(const QString &appId);
33 void appRemoved(const QString &appId);
34 void appInfoChanged(const QString &appId);
36private:
37 static QStringList s_list;
38 static XdgWatcher *s_xinstance;
39};