~paulliu/unity8/shellRotation

« back to all changes in this revision

Viewing changes to plugins/Unity/Session/dbusunitysessionservice.h

  • Committer: Mirco Müller
  • Date: 2015-03-06 14:22:41 UTC
  • mfrom: (1589.1.1 unity8)
  • Revision ID: mirco.mueller@ubuntu.com-20150306142241-wse3a2j2yghqfwoh
Merged kgunn's conflict-resolving branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#ifndef DBUSUNITYSESSIONSERVICE_H
18
18
#define DBUSUNITYSESSIONSERVICE_H
19
19
 
 
20
#include <QDBusObjectPath>
 
21
 
20
22
#include "unitydbusobject.h"
21
23
 
 
24
typedef QList<QDBusObjectPath> QDbusList;
 
25
Q_DECLARE_METATYPE(QList<QDBusObjectPath>)
 
26
 
22
27
/**
23
28
 * DBusUnitySessionService provides com.canonical.Unity.Session dbus
24
29
 * interface.
39
44
    Q_INVOKABLE void logout() { Logout(); }
40
45
    Q_INVOKABLE void reboot() { Reboot(); }
41
46
    Q_INVOKABLE void shutdown() { Shutdown(); }
 
47
    Q_INVOKABLE void endSession() { EndSession(); }
42
48
 
43
49
Q_SIGNALS:
44
50
    /**
49
55
     * @param have_inhibitors if there are any special running applications
50
56
     *        which inhibit the logout.
51
57
     */
52
 
    void logoutRequested(bool have_inhibitors);
 
58
    Q_SCRIPTABLE void logoutRequested(bool have_inhibitors);
53
59
 
54
60
    /**
55
61
     * rebootRequested signal
59
65
     * @param have_inhibitors if there are any special running applications
60
66
     *        which inhibit the reboot.
61
67
     */
62
 
    void rebootRequested(bool have_inhibitors);
 
68
    Q_SCRIPTABLE void rebootRequested(bool have_inhibitors);
63
69
 
64
70
    /**
65
71
     * shutdownRequested signal
69
75
     * @param have_inhibitors if there are any special running applications
70
76
     *        which inhibit the shutdown.
71
77
     */
72
 
    void shutdownRequested(bool have_inhibitors);
 
78
    Q_SCRIPTABLE void shutdownRequested(bool have_inhibitors);
73
79
 
74
80
 
75
81
    /**
139
145
     */
140
146
    Q_SCRIPTABLE void RequestShutdown();
141
147
 
142
 
};
143
 
 
 
148
    /**
 
149
     * Issue an EndSession request.
 
150
     *
 
151
     * This method calls the EndSession() Upstart DBus method on the
 
152
     * current DBus session bus.
 
153
     */
 
154
    Q_SCRIPTABLE void EndSession();
 
155
};
 
156
 
 
157
class DBusGnomeSessionManagerWrapper : public UnityDBusObject
 
158
{
 
159
    Q_OBJECT
 
160
    Q_CLASSINFO("D-Bus Interface", "org.gnome.SessionManager.EndSessionDialog")
 
161
 
 
162
public:
 
163
    DBusGnomeSessionManagerWrapper();
 
164
    ~DBusGnomeSessionManagerWrapper();
 
165
 
 
166
public Q_SLOTS:
 
167
    Q_SCRIPTABLE void Open(const unsigned int type, const unsigned int arg_1, const unsigned int max_wait, const QList<QDBusObjectPath> &inhibitors);
 
168
};
144
169
#endif // DBUSUNITYSESSIONSERVICE_H