on ac4b821 help sign in
49 lines 1.4 kB history raw
1/*
2 * Copyright (C) 2012,2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michael Terry <michael.terry@canonical.com>
17 */
19#ifndef UNITY_MOCK_POWERD_H
20#define UNITY_MOCK_POWERD_H
22#include <QtCore/QObject>
24class Powerd: public QObject
26 Q_OBJECT
27 Q_ENUMS(Status)
28 Q_FLAGS(DisplayFlag DisplayFlags)
30public:
31 enum DisplayFlag {
32 UseProximity = 1, // Use proximity sensor to override screen state
33 DisableAutoBrightness = 2, // Force autobrightness to be disabled
34 Bright = 4, // Request the screen to stay bright
35 };
36 Q_DECLARE_FLAGS(DisplayFlags, DisplayFlag)
38 enum Status {
39 Off,
40 On,
41 };
43 explicit Powerd(QObject *parent = 0);
45Q_SIGNALS:
46 void displayPowerStateChange(int status, unsigned int flags);
47};
49#endif