File: RefreshNotifierDBus.h

package info (click to toggle)
plasma-discover 6.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,288 kB
  • sloc: cpp: 30,576; xml: 2,710; python: 311; sh: 5; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 736 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
// SPDX-FileCopyrightText: 2024 Harald Sitter <sitter@kde.org>

#pragma once

#include <QDBusConnection>
#include <QDBusMessage>
#include <QString>

namespace RefreshNotifierDBus
{
constexpr auto path = QLatin1String("/");
constexpr auto interface = QLatin1String("org.kde.discover");
constexpr auto notifyNotifier = QLatin1String("NotifyNotifier");
constexpr auto notifyApp = QLatin1String("NotifyApp");

inline void notify(const QString &target)
{
    auto signal = QDBusMessage::createSignal(RefreshNotifierDBus::path, RefreshNotifierDBus::interface, target);
    QDBusConnection::sessionBus().send(signal);
}
} // namespace RefreshNotifierDBus