Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
MprisHost.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include <PhosphorServices/phosphorservices_export.h>
7
9
10#include <QList>
11#include <QObject>
12
13namespace PhosphorServices {
14
15class PHOSPHORSERVICES_EXPORT MprisHost : public QObject
16{
17 Q_OBJECT
18 Q_PROPERTY(int playerCount READ playerCount NOTIFY playerCountChanged)
19
20public:
21 explicit MprisHost(QObject* parent = nullptr);
22 ~MprisHost() override;
23
24 [[nodiscard]] int playerCount() const;
25 [[nodiscard]] QList<MprisPlayer*> players() const;
26 [[nodiscard]] Q_INVOKABLE PhosphorServices::MprisPlayer* playerAt(int index) const;
27
28Q_SIGNALS:
32
33private Q_SLOTS:
38 void _q_nameOwnerChanged(const QString& service, const QString& oldOwner, const QString& newOwner);
39
40private:
41 class Private;
42 std::unique_ptr<Private> d;
43};
44
45} // namespace PhosphorServices
Definition MprisHost.h:16
PhosphorServices::MprisPlayer * playerAt(int index) const
void playerRemoved(PhosphorServices::MprisPlayer *player)
void playerAdded(PhosphorServices::MprisPlayer *player)
MprisHost(QObject *parent=nullptr)
QList< MprisPlayer * > players() const
Definition MprisPlayer.h:16
Definition DBusMenuModel.h:15