mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00

因为有些机型不支持待机,但是后端中是否支持待机的接口返回值不对需要修改,因此后端在System DBus中新增了一个 com.deepin.daemon.PowerManager接口,任务栏需要调整使用此接口来判断显示待机和休眠选项 Log: 修复待机后电源无法唤醒,只能硬重启问题 Bug: https://pms.uniontech.com/zentao/bug-view-48165.html Change-Id: I31641df56fc69965e16a92c09b6a725f8465185b
74 lines
1.9 KiB
C++
74 lines
1.9 KiB
C++
/*
|
|
* This file was generated by qdbusxml2cpp version 0.8
|
|
* Command line was: qdbusxml2cpp -c PowerManager -p com_deepin_daemon_powermanager com.deepin.daemon.PowerManager.xml
|
|
*
|
|
* qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd.
|
|
*
|
|
* This is an auto-generated file.
|
|
* Do not edit! All changes made to it will be lost.
|
|
*/
|
|
|
|
#ifndef COM_DEEPIN_DAEMON_POWERMANAGER_H
|
|
#define COM_DEEPIN_DAEMON_POWERMANAGER_H
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtCore/QByteArray>
|
|
#include <QtCore/QList>
|
|
#include <QtCore/QMap>
|
|
#include <QtCore/QString>
|
|
#include <QtCore/QStringList>
|
|
#include <QtCore/QVariant>
|
|
#include <QtDBus/QtDBus>
|
|
|
|
/*
|
|
* Proxy class for interface com.deepin.daemon.PowerManager
|
|
*/
|
|
class DBusPowerManager: public QDBusAbstractInterface
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
static inline const char *staticInterfaceName()
|
|
{ return "com.deepin.daemon.PowerManager"; }
|
|
|
|
public:
|
|
DBusPowerManager(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
|
|
|
~DBusPowerManager();
|
|
|
|
public Q_SLOTS: // METHODS
|
|
inline QDBusPendingReply<bool> CanHibernate()
|
|
{
|
|
QList<QVariant> argumentList;
|
|
return asyncCallWithArgumentList(QStringLiteral("CanHibernate"), argumentList);
|
|
}
|
|
|
|
inline QDBusPendingReply<bool> CanReboot()
|
|
{
|
|
QList<QVariant> argumentList;
|
|
return asyncCallWithArgumentList(QStringLiteral("CanReboot"), argumentList);
|
|
}
|
|
|
|
inline QDBusPendingReply<bool> CanShutdown()
|
|
{
|
|
QList<QVariant> argumentList;
|
|
return asyncCallWithArgumentList(QStringLiteral("CanShutdown"), argumentList);
|
|
}
|
|
|
|
inline QDBusPendingReply<bool> CanSuspend()
|
|
{
|
|
QList<QVariant> argumentList;
|
|
return asyncCallWithArgumentList(QStringLiteral("CanSuspend"), argumentList);
|
|
}
|
|
|
|
Q_SIGNALS: // SIGNALS
|
|
};
|
|
|
|
namespace com {
|
|
namespace deepin {
|
|
namespace daemon {
|
|
typedef ::DBusPowerManager PowerManager;
|
|
}
|
|
}
|
|
}
|
|
#endif
|