author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 19 Feb 2010 23:40:16 +0200 | |
branch | RCL_3 |
changeset 4 | 3b1da2848fc7 |
parent 0 | 1918ee327afb |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the QtGui module of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
15 |
** |
|
16 |
** GNU Lesser General Public License Usage |
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
||
42 |
#include <qsessionmanager.h> |
|
43 |
||
44 |
#ifndef QT_NO_SESSIONMANAGER |
|
45 |
||
46 |
QT_BEGIN_NAMESPACE |
|
47 |
||
48 |
class QSessionManagerPrivate : public QObjectPrivate |
|
49 |
{ |
|
50 |
public: |
|
51 |
QSessionManagerPrivate(QSessionManager *m, const QString &id, |
|
52 |
const QString &key); |
|
53 |
||
54 |
QStringList restartCommand; |
|
55 |
QStringList discardCommand; |
|
56 |
const QString sessionId; |
|
57 |
const QString sessionKey; |
|
58 |
QSessionManager::RestartHint restartHint; |
|
59 |
}; |
|
60 |
||
61 |
QSessionManagerPrivate::QSessionManagerPrivate(QSessionManager*, |
|
62 |
const QString &id, |
|
63 |
const QString &key) |
|
64 |
: QObjectPrivate(), sessionId(id), sessionKey(key) |
|
65 |
{ |
|
66 |
} |
|
67 |
||
68 |
QSessionManager::QSessionManager(QApplication *app, QString &id, QString &key) |
|
69 |
: QObject(*new QSessionManagerPrivate(this, id, key), app) |
|
70 |
{ |
|
71 |
Q_D(QSessionManager); |
|
72 |
d->restartHint = RestartIfRunning; |
|
73 |
} |
|
74 |
||
75 |
QSessionManager::~QSessionManager() |
|
76 |
{ |
|
77 |
} |
|
78 |
||
79 |
QString QSessionManager::sessionId() const |
|
80 |
{ |
|
81 |
Q_D(const QSessionManager); |
|
82 |
return d->sessionId; |
|
83 |
} |
|
84 |
||
85 |
QString QSessionManager::sessionKey() const |
|
86 |
{ |
|
87 |
Q_D(const QSessionManager); |
|
88 |
return d->sessionKey; |
|
89 |
} |
|
90 |
||
91 |
||
92 |
bool QSessionManager::allowsInteraction() |
|
93 |
{ |
|
94 |
return false; |
|
95 |
} |
|
96 |
||
97 |
bool QSessionManager::allowsErrorInteraction() |
|
98 |
{ |
|
99 |
return false; |
|
100 |
} |
|
101 |
||
102 |
void QSessionManager::release() |
|
103 |
{ |
|
104 |
} |
|
105 |
||
106 |
void QSessionManager::cancel() |
|
107 |
{ |
|
108 |
} |
|
109 |
||
110 |
void QSessionManager::setRestartHint(QSessionManager::RestartHint hint) |
|
111 |
{ |
|
112 |
Q_D(QSessionManager); |
|
113 |
d->restartHint = hint; |
|
114 |
} |
|
115 |
||
116 |
QSessionManager::RestartHint QSessionManager::restartHint() const |
|
117 |
{ |
|
118 |
Q_D(const QSessionManager); |
|
119 |
return d->restartHint; |
|
120 |
} |
|
121 |
||
122 |
void QSessionManager::setRestartCommand(const QStringList &command) |
|
123 |
{ |
|
124 |
Q_D(QSessionManager); |
|
125 |
d->restartCommand = command; |
|
126 |
} |
|
127 |
||
128 |
QStringList QSessionManager::restartCommand() const |
|
129 |
{ |
|
130 |
Q_D(const QSessionManager); |
|
131 |
return d->restartCommand; |
|
132 |
} |
|
133 |
||
134 |
void QSessionManager::setDiscardCommand(const QStringList &command) |
|
135 |
{ |
|
136 |
Q_D(QSessionManager); |
|
137 |
d->discardCommand = command; |
|
138 |
} |
|
139 |
||
140 |
QStringList QSessionManager::discardCommand() const |
|
141 |
{ |
|
142 |
Q_D(const QSessionManager); |
|
143 |
return d->discardCommand; |
|
144 |
} |
|
145 |
||
146 |
void QSessionManager::setManagerProperty(const QString &name, |
|
147 |
const QString &value) |
|
148 |
{ |
|
149 |
Q_UNUSED(name); |
|
150 |
Q_UNUSED(value); |
|
151 |
} |
|
152 |
||
153 |
void QSessionManager::setManagerProperty(const QString &name, |
|
154 |
const QStringList &value) |
|
155 |
{ |
|
156 |
Q_UNUSED(name); |
|
157 |
Q_UNUSED(value); |
|
158 |
} |
|
159 |
||
160 |
bool QSessionManager::isPhase2() const |
|
161 |
{ |
|
162 |
return false; |
|
163 |
} |
|
164 |
||
165 |
void QSessionManager::requestPhase2() |
|
166 |
{ |
|
167 |
} |
|
168 |
||
169 |
QT_END_NAMESPACE |
|
170 |
||
171 |
#endif // QT_NO_SESSIONMANAGER |