| 1 | /* |
| 2 | * This file is part of lomiri-online-accounts-service |
| 3 | * |
| 4 | * Copyright (C) 2014 Canonical Ltd. |
| 5 | * |
| 6 | * Contact: Alberto Mardegan <[email protected]> |
| 7 | * |
| 8 | * This program is free software: you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU General Public License version 3, as published |
| 10 | * by the Free Software Foundation. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranties of |
| 14 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
| 15 | * PURPOSE. See the GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License along |
| 18 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | #include "indicator-service.h"cxx . . $ `<file>/online-accounts-service/src/indicator-service.h`/ |
| 22 | |
| 23 | #include <online-accounts-common/debug.h>cxx . . $ `<file>/online-accounts-common/debug.h`/ |
| 24 | #include <online-accounts-common/i18n.h>cxx . . $ `<file>/online-accounts-common/i18n.h`/ |
| 25 | #include "notification.h"cxx . . $ `<file>/online-accounts-service/src/notification.h`/ |
| 26 | #include "reauthenticator.h"cxx . . $ `<file>/online-accounts-service/src/reauthenticator.h`/ |
| 27 | #include "webcredentialsadaptor.h"cxx . . $ `<file>/build/online-accounts-service/src/webcredentialsadaptor.h`/ |
| 28 | |
| 29 | #include <QByteArray> |
| 30 | #include <QDBusContext> |
| 31 | |
| 32 | using namespace OnlineAccountsUi; |
| 33 | using namespace SignOnUi; |
| 34 | |
| 35 | QDBusArgumentcxx . . $ QDBusArgument# &operatorcxx . . $ `operator<<`(f862f3f4630d714).<<(QDBusArgumentcxx . . $ QDBusArgument# &argument, const QSetcxx . . $ QSet#<uintcxx . . $ uint#> &set) |
| 36 | { |
| 37 | argument.beginArraycxx . . $ QDBusArgument#beginArray(d4f767463ce0a6b3).(qMetaTypeIdcxx . . $ qMetaTypeId(b126dc7c1de90089).<uintcxx . . $ uint#>()); |
| 38 | Q_FOREACHcxx . . $ `<external>/15045578679651060896/qglobal.h:1137:9`!(uint id, set) { |
| 39 | argument <<cxx . . $ QDBusArgument#`operator<<`(5af213fa923c97ec). id; |
| 40 | } |
| 41 | argument.endArraycxx . . $ QDBusArgument#endArray(49f6e7a06ebc5aa8).(); |
| 42 | return argument; |
| 43 | } |
| 44 | |
| 45 | const QDBusArgumentcxx . . $ QDBusArgument# &operatorcxx . . $ `operator>>`(c537f4654ec60be6).>>(const QDBusArgumentcxx . . $ QDBusArgument# &argument, |
| 46 | QSetcxx . . $ QSet#<uintcxx . . $ uint#> &set) |
| 47 | { |
| 48 | argument.beginArraycxx . . $ QDBusArgument#beginArray(83f5f38750778ac8).(); |
| 49 | while (!argument.atEndcxx . . $ QDBusArgument#atEnd(50ce9a9e25b4a850).()) { |
| 50 | uintcxx . . $ uint# id; |
| 51 | argument >>cxx . . $ QDBusArgument#`operator>>`(394db848110320d2). id; |
| 52 | set.insertcxx . . $ QSet#insert(b1720532d625d779).(id); |
| 53 | } |
| 54 | argument.endArraycxx . . $ QDBusArgument#endArray(83f5f38750778ac8).(); |
| 55 | return argument; |
| 56 | } |
| 57 | |
| 58 | namespace SignOnUicxx . . $ SignOnUi/ { |
| 59 | |
| 60 | static IndicatorServicecxx . . $ SignOnUi/IndicatorService# *m_instancecxx . . $ SignOnUi/m_instance. = 0; |
| 61 | |
| 62 | class IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#: public QObjectcxx . . $ QObject#, QDBusContextcxx . . $ QDBusContext# |
| 63 | { |
| 64 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 65 | Q_DECLARE_PUBLICcxx . . $ `<external>/15045578679651060896/qglobal.h:1172:9`!(IndicatorService) |
| 66 | |
| 67 | public: |
| 68 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(QSet<uint> Failures READ failures) |
| 69 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(bool ErrorStatus READ errorStatus) |
| 70 | |
| 71 | IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#IndicatorServicePrivate(d2c06814b8883eb1).(IndicatorServicecxx . . $ SignOnUi/IndicatorService# *service); |
| 72 | ~cxx . . $ SignOnUi/IndicatorServicePrivate#`~IndicatorServicePrivate`(ced63f7c635d850d).IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#() {}; |
| 73 | |
| 74 | QSetcxx . . $ QSet#<uintcxx . . $ uint#> failurescxx . . $ SignOnUi/IndicatorServicePrivate#failures(9e471859e48ca5a5).() const { return m_failurescxx . . $ SignOnUi/IndicatorServicePrivate#m_failures.; } |
| 75 | bool errorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#errorStatus(50ce9a9e25b4a850).() const { return m_errorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#m_errorStatus.; } |
| 76 | |
| 77 | public Q_SLOTScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:92:10`!: |
| 78 | void ClearErrorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#ClearErrorStatus(49f6e7a06ebc5aa8).(); |
| 79 | void RemoveFailurescxx . . $ SignOnUi/IndicatorServicePrivate#RemoveFailures(370b4fd2c6af790f).(const QSetcxx . . $ QSet#<uintcxx . . $ uint#> &accountIds); |
| 80 | void ReportFailurecxx . . $ SignOnUi/IndicatorServicePrivate#ReportFailure(a674b9a78b7822c6).(uintcxx . . $ uint# accountId, const QVariantMapcxx . . $ QVariantMap# ¬ification); |
| 81 | bool ReauthenticateAccountcxx . . $ SignOnUi/IndicatorServicePrivate#ReauthenticateAccount(82a5854b56d36e97).(uintcxx . . $ uint# accountId, |
| 82 | const QVariantMapcxx . . $ QVariantMap# &extraParameters); |
| 83 | |
| 84 | private: |
| 85 | void showNotificationcxx . . $ SignOnUi/IndicatorServicePrivate#showNotification(3e95df3e31f2cce8).(const QVariantMapcxx . . $ QVariantMap# ¶meters); |
| 86 | void notifyPropertyChangedcxx . . $ SignOnUi/IndicatorServicePrivate#notifyPropertyChanged(85c52e162fed56f9).(const char *propertyName); |
| 87 | |
| 88 | private Q_SLOTScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:92:10`!: |
| 89 | void onReauthenticatorFinishedcxx . . $ SignOnUi/IndicatorServicePrivate#onReauthenticatorFinished(b45ddcbc8423892c).(bool success); |
| 90 | |
| 91 | private: |
| 92 | mutable IndicatorServicecxx . . $ SignOnUi/IndicatorService# *q_ptrcxx . . $ SignOnUi/IndicatorServicePrivate#q_ptr.; |
| 93 | WebcredentialsAdaptorcxx . . $ WebcredentialsAdaptor# *m_adaptorcxx . . $ SignOnUi/IndicatorServicePrivate#m_adaptor.; |
| 94 | QSetcxx . . $ QSet#<uintcxx . . $ uint#> m_failurescxx . . $ SignOnUi/IndicatorServicePrivate#m_failures.; |
| 95 | QMapcxx . . $ QMap#<uintcxx . . $ uint#, QListcxx . . $ QList#<AuthDatacxx . . $ SignOnUi/AuthData#> > m_failureClientDatacxx . . $ SignOnUi/IndicatorServicePrivate#m_failureClientData.; |
| 96 | QMapcxx . . $ QMap#<uintcxx . . $ uint#, Reauthenticatorcxx . . $ SignOnUi/Reauthenticator#*> m_reauthenticatorscxx . . $ SignOnUi/IndicatorServicePrivate#m_reauthenticators.; |
| 97 | QDBusMessagecxx . . $ QDBusMessage# m_clientMessagecxx . . $ SignOnUi/IndicatorServicePrivate#m_clientMessage.; |
| 98 | bool m_errorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#m_errorStatus.; |
| 99 | }; |
| 100 | |
| 101 | } // namespace |
| 102 | |
| 103 | IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#::IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#IndicatorServicePrivate(d2c06814b8883eb1).(IndicatorServicecxx . . $ SignOnUi/IndicatorService# *service): |
| 104 | QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(service), |
| 105 | q_ptrcxx . . $ SignOnUi/IndicatorServicePrivate#q_ptr.(service), |
| 106 | m_adaptorcxx . . $ SignOnUi/IndicatorServicePrivate#m_adaptor.(new WebcredentialsAdaptorcxx . . $ WebcredentialsAdaptor#(service)), |
| 107 | m_errorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#m_errorStatus.(false) |
| 108 | { |
| 109 | qDBusRegisterMetaTypecxx . . $ qDBusRegisterMetaType(2f7c408e008fec29).< QSetcxx . . $ QSet#<uintcxx . . $ uint#> >(); |
| 110 | } |
| 111 | |
| 112 | void IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#::ClearErrorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#ClearErrorStatus(49f6e7a06ebc5aa8).() |
| 113 | { |
| 114 | if (m_errorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#m_errorStatus.) { |
| 115 | m_errorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#m_errorStatus. = false; |
| 116 | notifyPropertyChangedcxx . . $ SignOnUi/IndicatorServicePrivate#notifyPropertyChanged(85c52e162fed56f9).("ErrorStatus"); |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | void IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#::RemoveFailurescxx . . $ SignOnUi/IndicatorServicePrivate#RemoveFailures(370b4fd2c6af790f).(const QSetcxx . . $ QSet#<uintcxx . . $ uint#> &accountIds) |
| 121 | { |
| 122 | Q_Qcxx . . $ `<external>/15045578679651060896/qglobal.h:1178:9`!(IndicatorService); |
| 123 | m_failurescxx . . $ SignOnUi/IndicatorServicePrivate#m_failures..subtractcxx . . $ QSet#subtract(ccebfa87892ac54d).(accountIds); |
| 124 | notifyPropertyChangedcxx . . $ SignOnUi/IndicatorServicePrivate#notifyPropertyChanged(85c52e162fed56f9).("Failures"); |
| 125 | if (q->isIdlecxx . . $ SignOnUi/IndicatorService#isIdle(50ce9a9e25b4a850).()) { |
| 126 | Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! q->isIdleChangedcxx . . $ SignOnUi/IndicatorService#isIdleChanged(49f6e7a06ebc5aa8).(); |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | void IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#::ReportFailurecxx . . $ SignOnUi/IndicatorServicePrivate#ReportFailure(a674b9a78b7822c6).(uintcxx . . $ uint# accountId, |
| 131 | const QVariantMapcxx . . $ QVariantMap# ¬ification) |
| 132 | { |
| 133 | Q_Qcxx . . $ `<external>/15045578679651060896/qglobal.h:1178:9`!(IndicatorService); |
| 134 | bool wasIdle = q->isIdlecxx . . $ SignOnUi/IndicatorService#isIdle(50ce9a9e25b4a850).(); |
| 135 | m_failurescxx . . $ SignOnUi/IndicatorServicePrivate#m_failures..insertcxx . . $ QSet#insert(b1720532d625d779).(accountId); |
| 136 | if (wasIdle) { |
| 137 | Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! q->isIdleChangedcxx . . $ SignOnUi/IndicatorService#isIdleChanged(49f6e7a06ebc5aa8).(); |
| 138 | } |
| 139 | |
| 140 | /* If the original client data is provided, we remember it: it can |
| 141 | * be used to replay the authentication later. |
| 142 | */ |
| 143 | if (notification.containscxx . . $ QMap#contains(8877ebe272b9620d).("ClientData"cxx . . $ QString#QString(85c52e162fed56f9).)) { |
| 144 | /* If the key is not found, the QMap's [] operator inserts an empty |
| 145 | * element in the map and return a reference to it. So the following |
| 146 | * line of code returns a valid QList even if the account never failed |
| 147 | * before. |
| 148 | */ |
| 149 | QListcxx . . $ QList#<AuthDatacxx . . $ SignOnUi/AuthData#> &failedAuthentications = |
| 150 | m_failureClientDatacxx . . $ SignOnUi/IndicatorServicePrivate#m_failureClientData.[cxx . . $ QMap#`operator[]`(bbd415b616967878).accountId]; |
| 151 | |
| 152 | AuthDatacxx . . $ SignOnUi/AuthData# authData; |
| 153 | authData.sessionDatacxx . . $ SignOnUi/AuthData#sessionData. =cxx . . $ QMap#`operator=`(86243d55ea3d6313). notification[cxx . . $ QMap#`operator[]`(bfda1f1f965926d4)."ClientData"cxx . . $ QString#QString(85c52e162fed56f9).].toMapcxx . . $ QVariant#toMap(87f780dbe64191c4).(); |
| 154 | authData.identitycxx . . $ SignOnUi/AuthData#identity. = quint32cxx . . $ quint32#(notification[cxx . . $ QMap#`operator[]`(bfda1f1f965926d4)."Identity"cxx . . $ QString#QString(85c52e162fed56f9).].toUIntcxx . . $ QVariant#toUInt(870b63f89c7fb98).()); |
| 155 | authData.methodcxx . . $ SignOnUi/AuthData#method. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). notification[cxx . . $ QMap#`operator[]`(bfda1f1f965926d4)."Method"cxx . . $ QString#QString(85c52e162fed56f9).].toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 156 | authData.mechanismcxx . . $ SignOnUi/AuthData#mechanism. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). notification[cxx . . $ QMap#`operator[]`(bfda1f1f965926d4)."Mechanism"cxx . . $ QString#QString(85c52e162fed56f9).].toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 157 | failedAuthentications.appendcxx . . $ QList#append(77d9f17553126ecb).(authData); |
| 158 | } |
| 159 | |
| 160 | notifyPropertyChangedcxx . . $ SignOnUi/IndicatorServicePrivate#notifyPropertyChanged(85c52e162fed56f9).("Failures"); |
| 161 | |
| 162 | showNotificationcxx . . $ SignOnUi/IndicatorServicePrivate#showNotification(3e95df3e31f2cce8).(notification); |
| 163 | } |
| 164 | |
| 165 | bool IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#::ReauthenticateAccountcxx . . $ SignOnUi/IndicatorServicePrivate#ReauthenticateAccount(82a5854b56d36e97).(uintcxx . . $ uint# accountId, |
| 166 | const QVariantMapcxx . . $ QVariantMap# &extraParameters) |
| 167 | { |
| 168 | if (!m_failureClientDatacxx . . $ SignOnUi/IndicatorServicePrivate#m_failureClientData..containscxx . . $ QMap#contains(8877ebe272b9620d).(accountId)) { |
| 169 | /* Nothing we can do about this account */ |
| 170 | DEBUGcxx . . $ `online-accounts-common/debug.h:42:13`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "No reauthentication data for account" <<cxx . . $ QDebug#`operator<<`(e121dc42ed06808d). accountId; |
| 171 | return false; |
| 172 | } |
| 173 | |
| 174 | if (m_reauthenticatorscxx . . $ SignOnUi/IndicatorServicePrivate#m_reauthenticators..containscxx . . $ QMap#contains(8877ebe272b9620d).(accountId)) { |
| 175 | /* A reauthenticator for this account is already at work. This |
| 176 | * shouldn't happen in a real world scenario. */ |
| 177 | qWarningcxx . . $ `<external>/10450329605257866924/qlogging.h:166:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Reauthenticator already active on" <<cxx . . $ QDebug#`operator<<`(e121dc42ed06808d). accountId; |
| 178 | return false; |
| 179 | } |
| 180 | |
| 181 | DEBUGcxx . . $ `online-accounts-common/debug.h:42:13`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Reauthenticating account" <<cxx . . $ QDebug#`operator<<`(e121dc42ed06808d). accountId; |
| 182 | |
| 183 | /* If we need to reauthenticate, we are delivering the result |
| 184 | * after iterating the event loop, so we must inform QtDBus that |
| 185 | * it shouldn't use this method's return value as a result. |
| 186 | */ |
| 187 | setDelayedReplycxx . . $ QDBusContext#setDelayedReply(a85845bc2b7828e2).(true); |
| 188 | m_clientMessagecxx . . $ SignOnUi/IndicatorServicePrivate#m_clientMessage. =cxx . . $ QDBusMessage#`operator=`(ede8248d108943e4). messagecxx . . $ QDBusContext#message(c95203e4dc7b0001).(); |
| 189 | QListcxx . . $ QList#<AuthDatacxx . . $ SignOnUi/AuthData#> &failedAuthentications = m_failureClientDatacxx . . $ SignOnUi/IndicatorServicePrivate#m_failureClientData.[cxx . . $ QMap#`operator[]`(bbd415b616967878).accountId]; |
| 190 | |
| 191 | Reauthenticatorcxx . . $ SignOnUi/Reauthenticator# *reauthenticator = |
| 192 | new Reauthenticatorcxx . . $ SignOnUi/Reauthenticator#(failedAuthentications, extraParameters, this); |
| 193 | m_reauthenticatorscxx . . $ SignOnUi/IndicatorServicePrivate#m_reauthenticators.[cxx . . $ QMap#`operator[]`(bbd415b616967878).accountId] = reauthenticator; |
| 194 | |
| 195 | QObjectcxx . . $ QObject#::connectcxx . . $ QObject#connect(158df1d9a01a3410).(reauthenticator, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(finished(bool)), |
| 196 | this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(onReauthenticatorFinished(bool)), |
| 197 | Qtcxx . . $ Qt/::QueuedConnectioncxx . . $ Qt/QueuedConnection.); |
| 198 | reauthenticator->startcxx . . $ SignOnUi/Reauthenticator#start(49f6e7a06ebc5aa8).(); |
| 199 | |
| 200 | return true; // ignored, see setDelayedReply() above. |
| 201 | } |
| 202 | |
| 203 | void IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#::showNotificationcxx . . $ SignOnUi/IndicatorServicePrivate#showNotification(3e95df3e31f2cce8).(const QVariantMapcxx . . $ QVariantMap# ¶meters) |
| 204 | { |
| 205 | /* Don't show more than one notification, until the error status is |
| 206 | * cleared */ |
| 207 | if (m_errorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#m_errorStatus.) return; |
| 208 | |
| 209 | m_errorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#m_errorStatus. = true; |
| 210 | notifyPropertyChangedcxx . . $ SignOnUi/IndicatorServicePrivate#notifyPropertyChanged(85c52e162fed56f9).("ErrorStatus"); |
| 211 | |
| 212 | QStringcxx . . $ QString# applicationName = parameters.valuecxx . . $ QMap#value(866b0a4e5fb46e14).("DisplayName"cxx . . $ QString#QString(85c52e162fed56f9).).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 213 | |
| 214 | QStringcxx . . $ QString# summarycxx . . $ QString#QString(ced63f7c635d850d).; |
| 215 | if (applicationName.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) { |
| 216 | summary =cxx . . $ QString#`operator=`(4f35bf974e7f8568). _cxx . . $ OnlineAccountsUi/_(2618eaa6859b6ce4).("Applications can no longer access " |
| 217 | "some of your Online Accounts", |
| 218 | SIGNONUI_I18N_DOMAINcxx . . $ `<built-in>:487:9`!); |
| 219 | } else { |
| 220 | summary =cxx . . $ QString#`operator=`(4f35bf974e7f8568). _cxx . . $ OnlineAccountsUi/_(2618eaa6859b6ce4).("Applications can no longer access " |
| 221 | "your %1 Online Account", |
| 222 | SIGNONUI_I18N_DOMAINcxx . . $ `<built-in>:487:9`!).argcxx . . $ QString#arg(bc823072288cbbb5).(applicationName); |
| 223 | } |
| 224 | |
| 225 | QStringcxx . . $ QString# message = _cxx . . $ OnlineAccountsUi/_(2618eaa6859b6ce4).("Choose <b>Online Accounts</b> from the user " |
| 226 | "menu to reinstate access to this account.", |
| 227 | SIGNONUI_I18N_DOMAINcxx . . $ `<built-in>:487:9`!); |
| 228 | |
| 229 | Notificationcxx . . $ OnlineAccountsUi/Notification# notificationcxx . . $ OnlineAccountsUi/Notification#Notification(b05324713c9ab95e).(summary, message); |
| 230 | notification.showcxx . . $ OnlineAccountsUi/Notification#show(49f6e7a06ebc5aa8).(); |
| 231 | } |
| 232 | |
| 233 | void IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#::notifyPropertyChangedcxx . . $ SignOnUi/IndicatorServicePrivate#notifyPropertyChanged(85c52e162fed56f9).(const char *propertyName) |
| 234 | { |
| 235 | QDBusMessagecxx . . $ QDBusMessage# signal = |
| 236 | QDBusMessagecxx . . $ QDBusMessage#::createSignalcxx . . $ QDBusMessage#createSignal(129141009e452cc5).(WEBCREDENTIALS_OBJECT_PATHcxx . . $ `online-accounts-service/src/indicator-service.h:30:9`!, |
| 237 | "org.freedesktop.DBus.Properties"cxx . . $ QString#QString(85c52e162fed56f9)., |
| 238 | "PropertiesChanged"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 239 | signal <<cxx . . $ QDBusMessage#`operator<<`(ef5601b8018cb889). WEBCREDENTIALS_INTERFACEcxx . . $ `online-accounts-service/src/indicator-service.h:32:9`!; |
| 240 | QVariantMapcxx . . $ QVariantMap# changedPropscxx . . $ QMap#QMap(ced63f7c635d850d).; |
| 241 | changedProps.insertcxx . . $ QMap#insert(929a1ed410fe8423).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).(propertyName), |
| 242 | propertycxx . . $ QObject#property(950ff6813be46b58).(propertyName)); |
| 243 | signal <<cxx . . $ QDBusMessage#`operator<<`(ef5601b8018cb889). changedPropscxx . . $ QVariant#QVariant(3e95df3e31f2cce8).; |
| 244 | signal <<cxx . . $ QDBusMessage#`operator<<`(ef5601b8018cb889). QStringListcxx . . $ QVariant#QVariant(631c0101495f0328).(); |
| 245 | QDBusConnectioncxx . . $ QDBusConnection#::sessionBuscxx . . $ QDBusConnection#sessionBus(45d475f1888103b2).().sendcxx . . $ QDBusConnection#send(88cf1e7c0a6f9f8e).(signal); |
| 246 | } |
| 247 | |
| 248 | void IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#::onReauthenticatorFinishedcxx . . $ SignOnUi/IndicatorServicePrivate#onReauthenticatorFinished(b45ddcbc8423892c).(bool success) |
| 249 | { |
| 250 | Q_Qcxx . . $ `<external>/15045578679651060896/qglobal.h:1178:9`!(IndicatorService); |
| 251 | |
| 252 | Reauthenticatorcxx . . $ SignOnUi/Reauthenticator# *reauthenticator = |
| 253 | qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<Reauthenticatorcxx . . $ SignOnUi/Reauthenticator#*>(sendercxx . . $ QObject#sender(2dbb680a34285c44).()); |
| 254 | |
| 255 | /* Find the account; searching a map by value is inefficient, but |
| 256 | * in this case it's extremely likely that the map contains just |
| 257 | * one element. :-) */ |
| 258 | uintcxx . . $ uint# accountId = 0; |
| 259 | QMapcxx . . $ QMap#<uint,Reauthenticator*>::const_iteratorcxx . . $ QMap#const_iterator# icxx . . $ QMap#const_iterator#const_iterator(49f6e7a06ebc5aa8).; |
| 260 | for (i =cxx . . $ QMap#const_iterator#`operator=`(a8c1ac8fc63d9d60). m_reauthenticatorscxx . . $ SignOnUi/IndicatorServicePrivate#m_reauthenticators..constBegincxx . . $ QMap#constBegin(81a977e5fd18ea74).(); |
| 261 | i !=cxx . . $ QMap#const_iterator#`operator!=`(afb29c289d8ce2db). m_reauthenticatorscxx . . $ SignOnUi/IndicatorServicePrivate#m_reauthenticators..constEndcxx . . $ QMap#constEnd(81a977e5fd18ea74).(); |
| 262 | i++cxx . . $ QMap#const_iterator#operator++(fb26c9591f87d150).) { |
| 263 | if (i.valuecxx . . $ QMap#const_iterator#value(bdbd05d619d62250).() == reauthenticator) { |
| 264 | accountId = i.keycxx . . $ QMap#const_iterator#key(ea465e50d690edfe).(); |
| 265 | break; |
| 266 | } |
| 267 | } |
| 268 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`! (accountId != 0); |
| 269 | |
| 270 | QDBusMessagecxx . . $ QDBusMessage# reply = m_clientMessagecxx . . $ SignOnUi/IndicatorServicePrivate#m_clientMessage..createReplycxx . . $ QDBusMessage#createReply(6d61b237a175eff6).(successcxx . . $ QVariant#QVariant(b45ddcbc8423892c).); |
| 271 | QDBusConnectioncxx . . $ QDBusConnection#::sessionBuscxx . . $ QDBusConnection#sessionBus(45d475f1888103b2).().sendcxx . . $ QDBusConnection#send(88cf1e7c0a6f9f8e).(reply); |
| 272 | |
| 273 | if (success) { |
| 274 | m_failureClientDatacxx . . $ SignOnUi/IndicatorServicePrivate#m_failureClientData..removecxx . . $ QMap#remove(dd8e59d271e40448).(accountId); |
| 275 | m_failurescxx . . $ SignOnUi/IndicatorServicePrivate#m_failures..removecxx . . $ QSet#remove(fe1ba53999e710f3).(accountId); |
| 276 | notifyPropertyChangedcxx . . $ SignOnUi/IndicatorServicePrivate#notifyPropertyChanged(85c52e162fed56f9).("Failures"); |
| 277 | |
| 278 | if (m_failurescxx . . $ SignOnUi/IndicatorServicePrivate#m_failures..isEmptycxx . . $ QSet#isEmpty(50ce9a9e25b4a850).()) { |
| 279 | ClearErrorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#ClearErrorStatus(49f6e7a06ebc5aa8).(); |
| 280 | Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! q->isIdleChangedcxx . . $ SignOnUi/IndicatorService#isIdleChanged(49f6e7a06ebc5aa8).(); |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | m_reauthenticatorscxx . . $ SignOnUi/IndicatorServicePrivate#m_reauthenticators..removecxx . . $ QMap#remove(dd8e59d271e40448).(accountId); |
| 285 | reauthenticator->deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).(); |
| 286 | } |
| 287 | |
| 288 | IndicatorServicecxx . . $ SignOnUi/IndicatorService#::IndicatorServicecxx . . $ SignOnUi/IndicatorService#IndicatorService(749de1b6ae65bddd).(QObjectcxx . . $ QObject# *parent): |
| 289 | QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(parent), |
| 290 | d_ptrcxx . . $ SignOnUi/IndicatorService#d_ptr.(new IndicatorServicePrivatecxx . . $ SignOnUi/IndicatorServicePrivate#IndicatorServicePrivate(d2c06814b8883eb1).(this)) |
| 291 | { |
| 292 | if (m_instancecxx . . $ SignOnUi/m_instance. == 0) { |
| 293 | m_instancecxx . . $ SignOnUi/m_instance. = this; |
| 294 | } else { |
| 295 | qWarningcxx . . $ `<external>/10450329605257866924/qlogging.h:166:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Instantiating a second IndicatorService!"; |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | IndicatorServicecxx . . $ SignOnUi/IndicatorService#::~cxx . . $ SignOnUi/IndicatorService#`~IndicatorService`(ced63f7c635d850d).IndicatorServicecxx . . $ SignOnUi/IndicatorService#() |
| 300 | { |
| 301 | m_instancecxx . . $ SignOnUi/m_instance. = 0; |
| 302 | delete d_ptrcxx . . $ SignOnUi/IndicatorService#d_ptr.; |
| 303 | } |
| 304 | |
| 305 | IndicatorServicecxx . . $ SignOnUi/IndicatorService# *IndicatorServicecxx . . $ SignOnUi/IndicatorService#::instancecxx . . $ SignOnUi/IndicatorService#instance(dfb173c382d9d9a3).() |
| 306 | { |
| 307 | return m_instancecxx . . $ SignOnUi/m_instance.; |
| 308 | } |
| 309 | |
| 310 | QObjectcxx . . $ QObject# *IndicatorServicecxx . . $ SignOnUi/IndicatorService#::serviceObjectcxx . . $ SignOnUi/IndicatorService#serviceObject(2dbb680a34285c44).() const |
| 311 | { |
| 312 | return d_ptrcxx . . $ SignOnUi/IndicatorService#d_ptr.; |
| 313 | } |
| 314 | |
| 315 | void IndicatorServicecxx . . $ SignOnUi/IndicatorService#::ClearErrorStatuscxx . . $ SignOnUi/IndicatorService#ClearErrorStatus(49f6e7a06ebc5aa8).() |
| 316 | { |
| 317 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(IndicatorService); |
| 318 | d->ClearErrorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#ClearErrorStatus(49f6e7a06ebc5aa8).(); |
| 319 | } |
| 320 | |
| 321 | bool IndicatorServicecxx . . $ SignOnUi/IndicatorService#::ReauthenticateAccountcxx . . $ SignOnUi/IndicatorService#ReauthenticateAccount(82a5854b56d36e97).(uintcxx . . $ uint# accountId, |
| 322 | const QVariantMapcxx . . $ QVariantMap# &extraParameters) |
| 323 | { |
| 324 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(IndicatorService); |
| 325 | return d->ReauthenticateAccountcxx . . $ SignOnUi/IndicatorServicePrivate#ReauthenticateAccount(82a5854b56d36e97).(accountId, extraParameters); |
| 326 | } |
| 327 | |
| 328 | void IndicatorServicecxx . . $ SignOnUi/IndicatorService#::RemoveFailurescxx . . $ SignOnUi/IndicatorService#RemoveFailures(370b4fd2c6af790f).(const QSetcxx . . $ QSet#<uintcxx . . $ uint#> &accountIds) |
| 329 | { |
| 330 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(IndicatorService); |
| 331 | d->RemoveFailurescxx . . $ SignOnUi/IndicatorServicePrivate#RemoveFailures(370b4fd2c6af790f).(accountIds); |
| 332 | } |
| 333 | |
| 334 | void IndicatorServicecxx . . $ SignOnUi/IndicatorService#::ReportFailurecxx . . $ SignOnUi/IndicatorService#ReportFailure(a674b9a78b7822c6).(uintcxx . . $ uint# accountId, |
| 335 | const QVariantMapcxx . . $ QVariantMap# ¬ification) |
| 336 | { |
| 337 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(IndicatorService); |
| 338 | d->ReportFailurecxx . . $ SignOnUi/IndicatorServicePrivate#ReportFailure(a674b9a78b7822c6).(accountId, notification); |
| 339 | } |
| 340 | |
| 341 | QSetcxx . . $ QSet#<uintcxx . . $ uint#> IndicatorServicecxx . . $ SignOnUi/IndicatorService#::failurescxx . . $ SignOnUi/IndicatorService#failures(9e471859e48ca5a5).() const |
| 342 | { |
| 343 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const IndicatorService); |
| 344 | return d->m_failurescxx . . $ SignOnUi/IndicatorServicePrivate#m_failures.; |
| 345 | } |
| 346 | |
| 347 | bool IndicatorServicecxx . . $ SignOnUi/IndicatorService#::errorStatuscxx . . $ SignOnUi/IndicatorService#errorStatus(50ce9a9e25b4a850).() const |
| 348 | { |
| 349 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const IndicatorService); |
| 350 | return d->m_errorStatuscxx . . $ SignOnUi/IndicatorServicePrivate#m_errorStatus.; |
| 351 | } |
| 352 | |
| 353 | bool IndicatorServicecxx . . $ SignOnUi/IndicatorService#::isIdlecxx . . $ SignOnUi/IndicatorService#isIdle(50ce9a9e25b4a850).() const |
| 354 | { |
| 355 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const IndicatorService); |
| 356 | return d->m_failurescxx . . $ SignOnUi/IndicatorServicePrivate#m_failures..isEmptycxx . . $ QSet#isEmpty(50ce9a9e25b4a850).(); |
| 357 | } |
| 358 | |
| 359 | #include "indicator-service.moc"cxx . . $ `<file>/build/online-accounts-service/src/lomiri-online-accounts-service_autogen/include/indicator-service.moc`/ |