Debian Codegraph @

tests/mock/signon.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2013 Canonical Ltd.
3 *
4 * Contact: Alberto Mardegan <[email protected]>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; version 2.1.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef MOCK_SIGNON_H
20 #define MOCK_SIGNON_Hcxx . . $ `tests/mock/signon.h:20:9`!
21
22 #include <QObject>
23 #include <QPointer>
24 #include <QTimer>
25 #include <QVariantMap>
26
27 namespace SignOncxx . . $ SignOn/ {
28
29 class AuthSessioncxx . . $ SignOn/AuthSession#;
30 typedef QPointercxx . . $ QPointer#<AuthSessioncxx . . $ SignOn/AuthSession#> AuthSessionPcxx . . $ SignOn/AuthSessionP#;
31
32 class Errorcxx . . $ SignOn/Error#
33 {
34 public:
35 enum ErrorTypecxx . . $ SignOn/Error#ErrorType# {
36 Unknowncxx . . $ SignOn/Error#Unknown. = 1, /**< Catch-all for errors not distinguished
37 by another code. */
38 InternalServercxx . . $ SignOn/Error#InternalServer. = 2, /**< Signon Daemon internal error. */
39 InternalCommunicationcxx . . $ SignOn/Error#InternalCommunication. = 3, /**< Communication with Signon Daemon
40 error. */
41 PermissionDeniedcxx . . $ SignOn/Error#PermissionDenied. = 4, /**< The operation cannot be performed due to
42 insufficient client permissions. */
43 EncryptionFailurecxx . . $ SignOn/Error#EncryptionFailure., /**< Failure during data
44 encryption/decryption. */
45 AuthServiceErrcxx . . $ SignOn/Error#AuthServiceErr. = 100, /* Placeholder to rearrange enumeration
46 - AuthService specific */
47 MethodNotKnowncxx . . $ SignOn/Error#MethodNotKnown., /**< The method with this name is not
48 found. */
49 ServiceNotAvailablecxx . . $ SignOn/Error#ServiceNotAvailable., /**< The service is temporarily
50 unavailable. */
51 InvalidQuerycxx . . $ SignOn/Error#InvalidQuery., /**< Parameters for the query are invalid. */
52 IdentityErrcxx . . $ SignOn/Error#IdentityErr. = 200, /* Placeholder to rearrange enumeration
53 - Identity specific */
54 MethodNotAvailablecxx . . $ SignOn/Error#MethodNotAvailable., /**< The requested method is not available. */
55 IdentityNotFoundcxx . . $ SignOn/Error#IdentityNotFound., /**< The identity matching this Identity
56 object was not found on the service. */
57 StoreFailedcxx . . $ SignOn/Error#StoreFailed., /**< Storing credentials failed. */
58 RemoveFailedcxx . . $ SignOn/Error#RemoveFailed., /**< Removing credentials failed. */
59 SignOutFailedcxx . . $ SignOn/Error#SignOutFailed., /**< SignOut failed. */
60 IdentityOperationCanceledcxx . . $ SignOn/Error#IdentityOperationCanceled., /**< Identity operation was canceled by
61 user. */
62 CredentialsNotAvailablecxx . . $ SignOn/Error#CredentialsNotAvailable., /**< Query failed. */
63 ReferenceNotFoundcxx . . $ SignOn/Error#ReferenceNotFound., /**< Trying to remove nonexistent
64 reference. */
65 AuthSessionErrcxx . . $ SignOn/Error#AuthSessionErr. = 300, /* Placeholder to rearrange enumeration
66 - AuthSession/AuthPluginInterface
67 specific */
68 MechanismNotAvailablecxx . . $ SignOn/Error#MechanismNotAvailable., /**< The requested mechanism is not
69 available. */
70 MissingDatacxx . . $ SignOn/Error#MissingData., /**< The SessionData object does not contain
71 necessary information. */
72 InvalidCredentialscxx . . $ SignOn/Error#InvalidCredentials., /**< The supplied credentials are invalid for
73 the mechanism implementation. */
74 NotAuthorizedcxx . . $ SignOn/Error#NotAuthorized., /**< Authorization failed. */
75 WrongStatecxx . . $ SignOn/Error#WrongState., /**< An operation method has been called in
76 a wrong state. */
77 OperationNotSupportedcxx . . $ SignOn/Error#OperationNotSupported., /**< The operation is not supported by the
78 mechanism implementation. */
79 NoConnectioncxx . . $ SignOn/Error#NoConnection., /**< No Network connetion. */
80 Networkcxx . . $ SignOn/Error#Network., /**< Network connetion failed. */
81 Sslcxx . . $ SignOn/Error#Ssl., /**< Ssl connection failed. */
82 Runtimecxx . . $ SignOn/Error#Runtime., /**< Casting SessionData into subclass
83 failed */
84 SessionCanceledcxx . . $ SignOn/Error#SessionCanceled., /**< Challenge was cancelled. */
85 TimedOutcxx . . $ SignOn/Error#TimedOut., /**< Challenge was timed out. */
86 UserInteractioncxx . . $ SignOn/Error#UserInteraction., /**< User interaction dialog failed */
87 OperationFailedcxx . . $ SignOn/Error#OperationFailed., /**< Temporary failure in authentication. */
88 EncryptionFailedcxx . . $ SignOn/Error#EncryptionFailed., /**< @deprecated Failure during data
89 encryption/decryption. */
90 TOSNotAcceptedcxx . . $ SignOn/Error#TOSNotAccepted., /**< User declined Terms of Service. */
91 ForgotPasswordcxx . . $ SignOn/Error#ForgotPassword., /**< User requested reset password
92 sequence. */
93 MethodOrMechanismNotAllowedcxx . . $ SignOn/Error#MethodOrMechanismNotAllowed., /**< Method or mechanism not allowed for
94 this identity. */
95 IncorrectDatecxx . . $ SignOn/Error#IncorrectDate., /**< Date time incorrect on device. */
96 UserErrcxx . . $ SignOn/Error#UserErr. = 400 /* Placeholder to rearrange enumeration
97 - User space specific */
98 };
99
100 Errorcxx . . $ SignOn/Error#Error(49f6e7a06ebc5aa8).() : m_typecxx . . $ SignOn/Error#m_type.((int)Unknowncxx . . $ SignOn/Error#Unknown.), m_messagecxx . . $ SignOn/Error#m_message.(QStringcxx . . $ QString#QString(49f6e7a06ebc5aa8).()) {}
101 Errorcxx . . $ SignOn/Error#Error(e22be6690a8478ff).(const Errorcxx . . $ SignOn/Error# &src) :
102 m_typecxx . . $ SignOn/Error#m_type.(src.typecxx . . $ SignOn/Error#type(455f465bc33b4cdf).()), m_messagecxx . . $ SignOn/Error#m_message.(src.messagecxx . . $ SignOn/Error#message(6ef7b6c27b00b43d).()) {}
103 Errorcxx . . $ SignOn/Error#Error(4b11a7293b4ed91c).(int type, const QStringcxx . . $ QString# &message = QStringcxx . . $ QString#QString(49f6e7a06ebc5aa8).()):
104 m_typecxx . . $ SignOn/Error#m_type.(type), m_messagecxx . . $ SignOn/Error#m_message.(message) {}
105 Errorcxx . . $ SignOn/Error# &operatorcxx . . $ SignOn/Error#`operator=`(a0676c0a23301c03).=(const Errorcxx . . $ SignOn/Error# &src)
106 { m_typecxx . . $ SignOn/Error#m_type. = src.typecxx . . $ SignOn/Error#type(455f465bc33b4cdf).(); m_messagecxx . . $ SignOn/Error#m_message. =cxx . . $ QString#`operator=`(7b76e6691bca1027). src.messagecxx . . $ SignOn/Error#message(6ef7b6c27b00b43d).(); return *this; }
107
108 virtual ~cxx . . $ SignOn/Error#`~Error`(49f6e7a06ebc5aa8).Errorcxx . . $ SignOn/Error#() {}
109
110 void setTypecxx . . $ SignOn/Error#setType(d4f767463ce0a6b3).(int type) { m_typecxx . . $ SignOn/Error#m_type. = type; }
111 void setMessagecxx . . $ SignOn/Error#setMessage(3520e46b33348bf6).(const QStringcxx . . $ QString# &message) { m_messagecxx . . $ SignOn/Error#m_message. =cxx . . $ QString#`operator=`(6a89d0b7f4d2681c). message; }
112 int typecxx . . $ SignOn/Error#type(455f465bc33b4cdf).() const { return m_typecxx . . $ SignOn/Error#m_type.; }
113 QStringcxx . . $ QString# messagecxx . . $ SignOn/Error#message(6ef7b6c27b00b43d).() const { return m_messagecxx . . $ QString#QString(3520e46b33348bf6).; }
114
115 private:
116 int m_typecxx . . $ SignOn/Error#m_type.;
117 QStringcxx . . $ QString# m_messagecxx . . $ SignOn/Error#m_message.;
118 };
119
120 class SessionDatacxx . . $ SignOn/SessionData#
121 {
122 public:
123 SessionDatacxx . . $ SignOn/SessionData#SessionData(3e95df3e31f2cce8).(const QVariantMapcxx . . $ QVariantMap# &data = QVariantMapcxx . . $ QVariantMap#()) { m_datacxx . . $ SignOn/SessionData#m_data. =cxx . . $ QMap#`operator=`(9a30e17cbbb0999d). data; }
124 SessionDatacxx . . $ SignOn/SessionData#SessionData(788a73c1a1492fd5).(const SessionDatacxx . . $ SignOn/SessionData# &other) { m_datacxx . . $ SignOn/SessionData#m_data. =cxx . . $ QMap#`operator=`(9a30e17cbbb0999d). other.m_datacxx . . $ SignOn/SessionData#m_data.; }
125 SessionDatacxx . . $ SignOn/SessionData# &operatorcxx . . $ SignOn/SessionData#`operator=`(539f66cb75557d59).=(const SessionDatacxx . . $ SignOn/SessionData# &other) {
126 m_datacxx . . $ SignOn/SessionData#m_data. =cxx . . $ QMap#`operator=`(9a30e17cbbb0999d). other.m_datacxx . . $ SignOn/SessionData#m_data.;
127 return *this;
128 }
129
130 QVariantMapcxx . . $ QVariantMap# toMapcxx . . $ SignOn/SessionData#toMap(87f780dbe64191c4).() const { return m_datacxx . . $ SignOn/SessionData#m_data.; }
131
132 protected:
133 QVariantMapcxx . . $ QVariantMap# m_datacxx . . $ SignOn/SessionData#m_data.;
134 };
135
136 typedef QStringcxx . . $ QString# MethodNamecxx . . $ SignOn/MethodName#;
137 typedef QStringListcxx . . $ QStringList# MechanismsListcxx . . $ SignOn/MechanismsList#;
138 class IdentityInfoImplcxx . . $ SignOn/IdentityInfoImpl#;
139 class IdentityInfocxx . . $ SignOn/IdentityInfo#
140 {
141 public:
142 enum CredentialsTypecxx . . $ SignOn/IdentityInfo#CredentialsType# {
143 Othercxx . . $ SignOn/IdentityInfo#Other. = 0,
144 Applicationcxx . . $ SignOn/IdentityInfo#Application. = 1 << 0,
145 Webcxx . . $ SignOn/IdentityInfo#Web. = 1 << 1,
146 Networkcxx . . $ SignOn/IdentityInfo#Network. = 1 << 2
147 };
148 public:
149 IdentityInfocxx . . $ SignOn/IdentityInfo#IdentityInfo(49f6e7a06ebc5aa8).();
150 IdentityInfocxx . . $ SignOn/IdentityInfo#IdentityInfo(672256099159c8d5).(const IdentityInfocxx . . $ SignOn/IdentityInfo# &other);
151 IdentityInfocxx . . $ SignOn/IdentityInfo# &operatorcxx . . $ SignOn/IdentityInfo#`operator=`(c020721df0ed262f).=(const IdentityInfocxx . . $ SignOn/IdentityInfo# &other);
152 ~cxx . . $ SignOn/IdentityInfo#`~IdentityInfo`(49f6e7a06ebc5aa8).IdentityInfocxx . . $ SignOn/IdentityInfo#();
153
154 void setIdcxx . . $ SignOn/IdentityInfo#setId(cb2f890c2fdad230).(const quint32cxx . . $ quint32# id);
155 quint32cxx . . $ quint32# idcxx . . $ SignOn/IdentityInfo#id(ddd8539a2fcdd4ce).() const;
156
157 void setSecretcxx . . $ SignOn/IdentityInfo#setSecret(37c160c81b6367f7).(const QStringcxx . . $ QString# &secret, const bool storeSecret = true);
158 QStringcxx . . $ QString# secretcxx . . $ SignOn/IdentityInfo#secret(6ef7b6c27b00b43d).() const;
159
160 bool isStoringSecretcxx . . $ SignOn/IdentityInfo#isStoringSecret(50ce9a9e25b4a850).() const;
161 void setStoreSecretcxx . . $ SignOn/IdentityInfo#setStoreSecret(b45ddcbc8423892c).(const bool storeSecret);
162
163 void setUserNamecxx . . $ SignOn/IdentityInfo#setUserName(3520e46b33348bf6).(const QStringcxx . . $ QString# &userName);
164 const QStringcxx . . $ QString# userNamecxx . . $ SignOn/IdentityInfo#userName(34227b1e5d5004df).() const;
165
166 void setCaptioncxx . . $ SignOn/IdentityInfo#setCaption(3520e46b33348bf6).(const QStringcxx . . $ QString# &caption);
167 const QStringcxx . . $ QString# captioncxx . . $ SignOn/IdentityInfo#caption(34227b1e5d5004df).() const;
168
169 void setRealmscxx . . $ SignOn/IdentityInfo#setRealms(631c0101495f0328).(const QStringListcxx . . $ QStringList# &realms);
170 QStringListcxx . . $ QStringList# realmscxx . . $ SignOn/IdentityInfo#realms(e1dbd5c4feadc8f5).() const;
171
172 void setOwnercxx . . $ SignOn/IdentityInfo#setOwner(3520e46b33348bf6).(const QStringcxx . . $ QString# &ownerToken);
173 QStringcxx . . $ QString# ownercxx . . $ SignOn/IdentityInfo#owner(6ef7b6c27b00b43d).() const;
174
175 void setAccessControlListcxx . . $ SignOn/IdentityInfo#setAccessControlList(631c0101495f0328).(const QStringListcxx . . $ QStringList# &accessControlList);
176 QStringListcxx . . $ QStringList# accessControlListcxx . . $ SignOn/IdentityInfo#accessControlList(e1dbd5c4feadc8f5).() const;
177
178 void setMethodcxx . . $ SignOn/IdentityInfo#setMethod(4a8467afe4f213e4).(const MethodNamecxx . . $ SignOn/MethodName# &method,
179 const MechanismsListcxx . . $ SignOn/MechanismsList# &mechanismsList);
180 void removeMethodcxx . . $ SignOn/IdentityInfo#removeMethod(3520e46b33348bf6).(const MethodNamecxx . . $ SignOn/MethodName# &method);
181
182 void setTypecxx . . $ SignOn/IdentityInfo#setType(cd11ac4f59b6ed88).(CredentialsTypecxx . . $ SignOn/IdentityInfo#CredentialsType# type);
183 CredentialsTypecxx . . $ SignOn/IdentityInfo#CredentialsType# typecxx . . $ SignOn/IdentityInfo#type(b8a02f84b2ff07fb).() const;
184
185 QListcxx . . $ QList#<MethodNamecxx . . $ SignOn/MethodName#> methodscxx . . $ SignOn/IdentityInfo#methods(2b25566bdf736d18).() const;
186 MechanismsListcxx . . $ SignOn/MechanismsList# mechanismscxx . . $ SignOn/IdentityInfo#mechanisms(50afb52245723b61).(const MethodNamecxx . . $ SignOn/MethodName# &method) const;
187
188 private:
189 class IdentityInfoImplcxx . . $ SignOn/IdentityInfoImpl# *implcxx . . $ SignOn/IdentityInfo#impl.;
190 };
191
192 class Identitycxx . . $ SignOn/Identity#: public QObjectcxx . . $ QObject#
193 {
194 Q_OBJECTcxx . . $ SignOn/Identity#staticMetaObject.
195 Q_DISABLE_COPYcxx . . $ SignOn/Identity#Identity(a55f282e59b0bab3).(Identity)
196
197 protected:
198 Identitycxx . . $ SignOn/Identity#Identity(90217e68596da428).(const quint32cxx . . $ quint32# id = 0, QObjectcxx . . $ QObject# *parent = 0);
199
200 public:
201 static Identitycxx . . $ SignOn/Identity# *newIdentitycxx . . $ SignOn/Identity#newIdentity(4e278b3d0801c5d8).(const IdentityInfocxx . . $ SignOn/IdentityInfo# &info = IdentityInfocxx . . $ SignOn/IdentityInfo#(),
202 QObjectcxx . . $ QObject# *parent = 0);
203 static Identitycxx . . $ SignOn/Identity# *existingIdentitycxx . . $ SignOn/Identity#existingIdentity(7e534ccf80011be0).(const quint32cxx . . $ quint32# id, QObjectcxx . . $ QObject# *parent = 0);
204 virtual ~cxx . . $ SignOn/Identity#`~Identity`(49f6e7a06ebc5aa8).Identitycxx . . $ SignOn/Identity#();
205
206 AuthSessionPcxx . . $ SignOn/AuthSessionP# createSessioncxx . . $ SignOn/Identity#createSession(1578aaca65afd4e1).(const QStringcxx . . $ QString# &methodName);
207 void storeCredentialscxx . . $ SignOn/Identity#storeCredentials(672256099159c8d5).(const IdentityInfocxx . . $ SignOn/IdentityInfo# &info = IdentityInfocxx . . $ SignOn/IdentityInfo#IdentityInfo(49f6e7a06ebc5aa8).());
208 void removecxx . . $ SignOn/Identity#remove(49f6e7a06ebc5aa8).();
209 void queryInfocxx . . $ SignOn/Identity#queryInfo(49f6e7a06ebc5aa8).();
210
211 Q_SIGNALScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:93:10`!:
212 void errorcxx . . $ SignOn/Identity#error(e22be6690a8478ff).(const SignOncxx . . $ SignOn/::Errorcxx . . $ SignOn/Error# &err);
213 void credentialsStoredcxx . . $ SignOn/Identity#credentialsStored(cb2f890c2fdad230).(const quint32cxx . . $ quint32# id);
214 void infocxx . . $ SignOn/Identity#info(672256099159c8d5).(const SignOncxx . . $ SignOn/::IdentityInfocxx . . $ SignOn/IdentityInfo# &info);
215 void removedcxx . . $ SignOn/Identity#removed(49f6e7a06ebc5aa8).();
216
217 private Q_SLOTScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:92:10`!:
218 void emitCredentialsStoredcxx . . $ SignOn/Identity#emitCredentialsStored(49f6e7a06ebc5aa8).();
219 void emitInfocxx . . $ SignOn/Identity#emitInfo(49f6e7a06ebc5aa8).();
220 void emitRemovedcxx . . $ SignOn/Identity#emitRemoved(49f6e7a06ebc5aa8).();
221
222 private:
223 static quint32cxx . . $ quint32# lastIdcxx . . $ SignOn/Identity#lastId.;
224 quint32cxx . . $ quint32# m_idcxx . . $ SignOn/Identity#m_id.;
225 IdentityInfocxx . . $ SignOn/IdentityInfo# m_infocxx . . $ SignOn/Identity#m_info.;
226 QTimercxx . . $ QTimer# m_storeTimercxx . . $ SignOn/Identity#m_storeTimer.;
227 QTimercxx . . $ QTimer# m_infoTimercxx . . $ SignOn/Identity#m_infoTimer.;
228 QTimercxx . . $ QTimer# m_removeTimercxx . . $ SignOn/Identity#m_removeTimer.;
229 };
230
231 class AuthSessioncxx . . $ SignOn/AuthSession#: public QObjectcxx . . $ QObject#
232 {
233 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
234
235 friend class Identitycxx . . $ SignOn/Identity#;
236 protected:
237 AuthSessioncxx . . $ SignOn/AuthSession#AuthSession(359326898a2e89de).(quint32cxx . . $ quint32# id, const QStringcxx . . $ QString# &methodName, QObjectcxx . . $ QObject# *parent = 0);
238 ~cxx . . $ SignOn/AuthSession#`~AuthSession`(49f6e7a06ebc5aa8).AuthSessioncxx . . $ SignOn/AuthSession#();
239
240 public:
241 const QStringcxx . . $ QString# namecxx . . $ SignOn/AuthSession#name(34227b1e5d5004df).() const;
242 void processcxx . . $ SignOn/AuthSession#process(eb4bf72deea28a27).(const SessionDatacxx . . $ SignOn/SessionData# &sessionData,
243 const QStringcxx . . $ QString# &mechanism = QStringcxx . . $ QString#QString(49f6e7a06ebc5aa8).());
244 void cancelcxx . . $ SignOn/AuthSession#cancel(49f6e7a06ebc5aa8).();
245
246 Q_SIGNALScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:93:10`!:
247 void errorcxx . . $ SignOn/AuthSession#error(e22be6690a8478ff).(const SignOncxx . . $ SignOn/::Errorcxx . . $ SignOn/Error# &err);
248 void responsecxx . . $ SignOn/AuthSession#response(788a73c1a1492fd5).(const SignOncxx . . $ SignOn/::SessionDatacxx . . $ SignOn/SessionData# &sessionData);
249
250 private Q_SLOTScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:92:10`!:
251 void respondcxx . . $ SignOn/AuthSession#respond(49f6e7a06ebc5aa8).();
252
253 private:
254 quint32cxx . . $ quint32# m_idcxx . . $ SignOn/AuthSession#m_id.;
255 QStringcxx . . $ QString# m_methodcxx . . $ SignOn/AuthSession#m_method.;
256 QStringcxx . . $ QString# m_mechanismcxx . . $ SignOn/AuthSession#m_mechanism.;
257 QVariantMapcxx . . $ QVariantMap# m_sessionDatacxx . . $ SignOn/AuthSession#m_sessionData.;
258 QTimercxx . . $ QTimer# responseTimercxx . . $ SignOn/AuthSession#responseTimer.;
259 };
260
261 }; // namespace
262
263 Q_DECLARE_METATYPEcxx . . $ QMetaTypeId#$anonymous_type_0#(SignOn::Error)
264 Q_DECLARE_METATYPEcxx . . $ QMetaTypeId#(SignOn::IdentityInfo)
265 Q_DECLARE_METATYPEcxx . . $ QBasicAtomicInt#(SignOn::SessionData)
266
267 #endif // MOCK_SIGNON_H