on xenial help sign in
add apidox
commit649291d342b9b390d33ebd794802cdb46e98ed5a authorLukáš Tinkl <lukas.tinkl@canonical.com> dateTue 16 Jun 2015, 17:06 (11 years ago) parentd8fd129
2 files changed+40−1
plugins/Unity/Session/dbusunitysessionservice.h+40 tests/plugins/Unity/Session/sessionbackendtest.cpp−1
plugins/Unity/Session/dbusunitysessionservice.h+40
@@ -115,11 +115,25 @@ public Q_SLOTS:
115115 */
116116 Q_SCRIPTABLE void Shutdown();
117117
118+ /**
119+ * Suspend the system
120+ *
121+ * This method puts the system into sleep without user's confirmation.
122+ */
118123 Q_SCRIPTABLE void Suspend();
119124
125+ /**
126+ * Hibernate the system
127+ *
128+ * This method puts the system into hibernation without user's confirmation.
129+ */
120130 Q_SCRIPTABLE void Hibernate();
121131
122132 /**
133+ * Hybrid sleep
134+ *
135+ * This method puts the system into hybrid sleep without user's confirmation.
136+ *
123137 * @since unity8
124138 */
125139 Q_SCRIPTABLE void HybridSleep();
@@ -163,32 +177,58 @@ public Q_SLOTS:
163177 */
164178 Q_SCRIPTABLE void EndSession();
165179
180+ /**
181+ * @return whether the system is capable of hibernating
182+ */
166183 Q_SCRIPTABLE bool CanHibernate() const;
167184
185+ /**
186+ * @return whether the system is capable of suspending
187+ */
168188 Q_SCRIPTABLE bool CanSuspend() const;
169189
170190 /**
191+ * @return whether the system is capable of hybrid sleep
171192 * @since unity8
172193 */
173194 Q_SCRIPTABLE bool CanHybridSleep() const;
174195
175196 /**
197+ * @return whether the system is capable of rebooting
176198 * @since unity8
177199 */
178200 Q_SCRIPTABLE bool CanReboot() const;
179201
202+ /**
203+ * @return whether the system is capable of shutting down
204+ */
180205 Q_SCRIPTABLE bool CanShutdown() const;
181206
207+ /**
208+ * @return whether the system is capable of locking the session
209+ */
182210 Q_SCRIPTABLE bool CanLock() const;
183211
184212 Q_SCRIPTABLE QString UserName() const;
185213
214+ /**
215+ * @return the real name of the current user
216+ */
186217 Q_SCRIPTABLE QString RealName() const;
187218
219+ /**
220+ * @return the local hostname
221+ */
188222 Q_SCRIPTABLE QString HostName() const;
189223
224+ /**
225+ * Request that the session get locked, emits signal LockRequested()
226+ */
190227 Q_SCRIPTABLE void PromptLock();
191228
229+ /**
230+ * Locks the session immediately
231+ */
192232 Q_SCRIPTABLE void Lock();
193233};
194234
tests/plugins/Unity/Session/sessionbackendtest.cpp−1
@@ -31,7 +31,6 @@
3131#include <sys/types.h>
3232
3333#include "dbusunitysessionservice.h"
34−#include "../../AccountsService/AccountsServiceDBusAdaptor.h"
3534
3635enum class Action : unsigned
3736{