Changeset View
Changeset View
Standalone View
Standalone View
daemon/backends/upower/upowersuspendjob.cpp
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 58 | case PowerDevil::BackendInterface::ToRam: | |||
---|---|---|---|---|---|
59 | m_upowerInterface->AboutToSleep("suspend"); | 59 | m_upowerInterface->AboutToSleep("suspend"); | ||
60 | m_upowerInterface->Suspend(); | 60 | m_upowerInterface->Suspend(); | ||
61 | break; | 61 | break; | ||
62 | case PowerDevil::BackendInterface::ToDisk: | 62 | case PowerDevil::BackendInterface::ToDisk: | ||
63 | m_upowerInterface->AboutToSleep("hibernate"); | 63 | m_upowerInterface->AboutToSleep("hibernate"); | ||
64 | m_upowerInterface->Hibernate(); | 64 | m_upowerInterface->Hibernate(); | ||
65 | break; | 65 | break; | ||
66 | default: | 66 | default: | ||
67 | qCDebug(POWERDEVIL) << "This backend doesn't support hybrid mode"; | 67 | qCDebug(POWERDEVIL) << "This backend doesn't support hybrid mode or suspend then hibernate mode"; | ||
68 | setError(1); | 68 | setError(1); | ||
69 | setErrorText(i18n("Unsupported suspend method")); | 69 | setErrorText(i18n("Unsupported suspend method")); | ||
70 | break; | 70 | break; | ||
71 | } | 71 | } | ||
72 | emitResult(); | 72 | emitResult(); | ||
73 | } | 73 | } | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | void UPowerSuspendJob::resumeDone() | 76 | void UPowerSuspendJob::resumeDone() | ||
77 | { | 77 | { | ||
78 | emitResult(); | 78 | emitResult(); | ||
79 | } | 79 | } |