Changeset View
Changeset View
Standalone View
Standalone View
daemon/powerdevilfdoconnector.h
Show All 37 Lines | 33 | { | |||
---|---|---|---|---|---|
38 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.PowerManagement.Inhibit") | 38 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.PowerManagement.Inhibit") | ||
39 | 39 | | |||
40 | public: | 40 | public: | ||
41 | explicit FdoConnector(PowerDevil::Core *parent); | 41 | explicit FdoConnector(PowerDevil::Core *parent); | ||
42 | 42 | | |||
43 | bool CanHibernate(); | 43 | bool CanHibernate(); | ||
44 | bool CanSuspend(); | 44 | bool CanSuspend(); | ||
45 | bool CanHybridSuspend(); | 45 | bool CanHybridSuspend(); | ||
46 | bool CanSuspendThenHibernate(); | ||||
46 | 47 | | |||
47 | bool GetPowerSaveStatus(); | 48 | bool GetPowerSaveStatus(); | ||
48 | 49 | | |||
49 | void Suspend(); | 50 | void Suspend(); | ||
50 | void Hibernate(); | 51 | void Hibernate(); | ||
51 | void HybridSuspend(); | 52 | void HybridSuspend(); | ||
53 | void SuspendThenHibernate(); | ||||
52 | 54 | | |||
53 | bool HasInhibit(); | 55 | bool HasInhibit(); | ||
54 | 56 | | |||
55 | int Inhibit(const QString &application, const QString &reason); | 57 | int Inhibit(const QString &application, const QString &reason); | ||
56 | void UnInhibit(int cookie); | 58 | void UnInhibit(int cookie); | ||
57 | void ForceUnInhibitAll(); | 59 | void ForceUnInhibitAll(); | ||
58 | 60 | | |||
59 | Q_SIGNALS: | 61 | Q_SIGNALS: | ||
60 | void CanSuspendChanged(bool canSuspend); | 62 | void CanSuspendChanged(bool canSuspend); | ||
61 | void CanHibernateChanged(bool canHibernate); | 63 | void CanHibernateChanged(bool canHibernate); | ||
62 | void CanHybridSuspendChanged(bool canHybridSuspend); | 64 | void CanHybridSuspendChanged(bool canHybridSuspend); | ||
65 | void CanSuspendThenHibernateChanged(bool canSuspendThenHibernate); | ||||
63 | void PowerSaveStatusChanged(bool savePower); | 66 | void PowerSaveStatusChanged(bool savePower); | ||
64 | 67 | | |||
65 | void HasInhibitChanged(bool hasInhibit); | 68 | void HasInhibitChanged(bool hasInhibit); | ||
66 | 69 | | |||
67 | private Q_SLOTS: | 70 | private Q_SLOTS: | ||
68 | void onAcAdapterStateChanged(PowerDevil::BackendInterface::AcAdapterState); | 71 | void onAcAdapterStateChanged(PowerDevil::BackendInterface::AcAdapterState); | ||
69 | void onUnavailablePoliciesChanged(PowerDevil::PolicyAgent::RequiredPolicies); | 72 | void onUnavailablePoliciesChanged(PowerDevil::PolicyAgent::RequiredPolicies); | ||
70 | void triggerSuspendSession(uint action); | 73 | void triggerSuspendSession(uint action); | ||
71 | 74 | | |||
72 | private: | 75 | private: | ||
73 | PowerDevil::Core *m_core; | 76 | PowerDevil::Core *m_core; | ||
74 | }; | 77 | }; | ||
75 | 78 | | |||
76 | } | 79 | } | ||
77 | 80 | | |||
78 | #endif /*POWERDEVILFDOCONNECTOR_H*/ | 81 | #endif /*POWERDEVILFDOCONNECTOR_H*/ |