on xenial help sign in
add apidox
649291dLukáš Tinkl
plugins/Unity/Session/dbusunitysessionservice.h+40
@@ -115,11 +115,25 @@ public Q_SLOTS:
115 */
115 */
116 Q_SCRIPTABLE void Shutdown();
116 Q_SCRIPTABLE void Shutdown();
117
117
118+ /**
119+ * Suspend the system
120+ *
121+ * This method puts the system into sleep without user's confirmation.
122+ */
118 Q_SCRIPTABLE void Suspend();
123 Q_SCRIPTABLE void Suspend();
119
124
125+ /**
126+ * Hibernate the system
127+ *
128+ * This method puts the system into hibernation without user's confirmation.
129+ */
120 Q_SCRIPTABLE void Hibernate();
130 Q_SCRIPTABLE void Hibernate();
121
131
122 /**
132 /**
133+ * Hybrid sleep
134+ *
135+ * This method puts the system into hybrid sleep without user's confirmation.
136+ *
123 * @since unity8
137 * @since unity8
124 */
138 */
125 Q_SCRIPTABLE void HybridSleep();
139 Q_SCRIPTABLE void HybridSleep();
@@ -163,32 +177,58 @@ public Q_SLOTS:
163 */
177 */
164 Q_SCRIPTABLE void EndSession();
178 Q_SCRIPTABLE void EndSession();
165
179
180+ /**
181+ * @return whether the system is capable of hibernating
182+ */
166 Q_SCRIPTABLE bool CanHibernate() const;
183 Q_SCRIPTABLE bool CanHibernate() const;
167
184
185+ /**
186+ * @return whether the system is capable of suspending
187+ */
168 Q_SCRIPTABLE bool CanSuspend() const;
188 Q_SCRIPTABLE bool CanSuspend() const;
169
189
170 /**
190 /**
191+ * @return whether the system is capable of hybrid sleep
171 * @since unity8
192 * @since unity8
172 */
193 */
173 Q_SCRIPTABLE bool CanHybridSleep() const;
194 Q_SCRIPTABLE bool CanHybridSleep() const;
174
195
175 /**
196 /**
197+ * @return whether the system is capable of rebooting
176 * @since unity8
198 * @since unity8
177 */
199 */
178 Q_SCRIPTABLE bool CanReboot() const;
200 Q_SCRIPTABLE bool CanReboot() const;
179
201
202+ /**
203+ * @return whether the system is capable of shutting down
204+ */
180 Q_SCRIPTABLE bool CanShutdown() const;
205 Q_SCRIPTABLE bool CanShutdown() const;
181
206
207+ /**
208+ * @return whether the system is capable of locking the session
209+ */
182 Q_SCRIPTABLE bool CanLock() const;
210 Q_SCRIPTABLE bool CanLock() const;
183
211
184 Q_SCRIPTABLE QString UserName() const;
212 Q_SCRIPTABLE QString UserName() const;
185
213
214+ /**
215+ * @return the real name of the current user
216+ */
186 Q_SCRIPTABLE QString RealName() const;
217 Q_SCRIPTABLE QString RealName() const;
187
218
219+ /**
220+ * @return the local hostname
221+ */
188 Q_SCRIPTABLE QString HostName() const;
222 Q_SCRIPTABLE QString HostName() const;
189
223
224+ /**
225+ * Request that the session get locked, emits signal LockRequested()
226+ */
190 Q_SCRIPTABLE void PromptLock();
227 Q_SCRIPTABLE void PromptLock();
191
228
229+ /**
230+ * Locks the session immediately
231+ */
192 Q_SCRIPTABLE void Lock();
232 Q_SCRIPTABLE void Lock();
193};
233};
194
234
tests/plugins/Unity/Session/sessionbackendtest.cpp−1
@@ -31,7 +31,6 @@
31#include <sys/types.h>
31#include <sys/types.h>
32
32
33#include "dbusunitysessionservice.h"
33#include "dbusunitysessionservice.h"
34−#include "../../AccountsService/AccountsServiceDBusAdaptor.h"
35
34
36enum class Action : unsigned
35enum class Action : unsigned
37{
36{