1 | // Copyright (C) 2013 Teo Mrnjavac <teo@kde.org> |
---|---|
2 | // Copyright (C) 2016 The Qt Company Ltd. |
3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
4 | |
5 | #pragma once |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is part of the QPA API and is not meant to be used |
12 | // in applications. Usage of this API may make your code |
13 | // source and binary incompatible with future versions of Qt. |
14 | // |
15 | |
16 | #include <qpa/qplatformsessionmanager.h> |
17 | |
18 | #ifndef QT_NO_SESSIONMANAGER |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | class QEventLoop; |
23 | |
24 | class QXcbSessionManager : public QPlatformSessionManager |
25 | { |
26 | public: |
27 | QXcbSessionManager(const QString &id, const QString &key); |
28 | virtual ~QXcbSessionManager(); |
29 | |
30 | void *handle() const; |
31 | |
32 | void setSessionId(const QString &id) { m_sessionId = id; } |
33 | void setSessionKey(const QString &key) { m_sessionKey = key; } |
34 | |
35 | bool allowsInteraction() override; |
36 | bool allowsErrorInteraction() override; |
37 | void release() override; |
38 | |
39 | void cancel() override; |
40 | |
41 | void setManagerProperty(const QString &name, const QString &value) override; |
42 | void setManagerProperty(const QString &name, const QStringList &value) override; |
43 | |
44 | bool isPhase2() const override; |
45 | void requestPhase2() override; |
46 | |
47 | void exitEventLoop(); |
48 | |
49 | private: |
50 | QEventLoop *m_eventLoop; |
51 | }; |
52 | |
53 | QT_END_NAMESPACE |
54 | |
55 | #endif //QT_NO_SESSIONMANAGER |
56 |