Music Hub ..
A session-wide music playback service
Loading...
Searching...
No Matches
battery_observer.h
Go to the documentation of this file.
1/*
2 * Copyright © 2014 Canonical Ltd.
3 * Copyright © 2022 UBports Foundation.
4 *
5 * Contact: Alberto Mardegan <mardy@users.sourceforge.net>
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License version 3,
9 * as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Authored by: Thomas Voß <thomas.voss@canonical.com>
20 */
21#ifndef LOMIRI_MEDIAHUBSERVICE_POWER_STATE_OBSERVER_H
22#define LOMIRI_MEDIAHUBSERVICE_POWER_STATE_OBSERVER_H
23
24#include <QObject>
25#include <QScopedPointer>
26
27namespace lomiri
28{
29namespace MediaHubService
30{
31namespace power
32{
33// Enumerates known power levels.
42
43class BatteryObserverPrivate;
44
45// Interface that enables observation of the system power state.
47{
48 Q_OBJECT
49
50public:
51 BatteryObserver(QObject *parent = nullptr);
53
54 Level level() const;
55 bool isWarningActive() const;
56
57Q_SIGNALS:
60
61private:
62 Q_DECLARE_PRIVATE(BatteryObserver);
63 QScopedPointer<BatteryObserverPrivate> d_ptr;
64};
65
66}
67}
68}
69
70#endif // LOMIRI_MEDIAHUBSERVICE_POWER_STATE_OBSERVER_H