27 #include <QDBusArgument> 28 #include <QDataStream> 41 QVariantMap::const_iterator i;
42 for (i = info.constBegin(); i != info.constEnd(); i++) {
43 if (qstrcmp(i.value().typeName(),
"QDBusArgument") == 0) {
44 QDBusArgument container = i.value().value<QDBusArgument>();
46 if (i.key() == SIGNOND_IDENTITY_INFO_AUTHMETHODS) {
50 BLAME() <<
"Found unsupported QDBusArgument in key" << i.key();
53 insert(i.key(), i.value());
65 QMapIterator<QString, QVariant> it(info);
66 while (it.hasNext()) {
69 if (it.key() == SIGNOND_IDENTITY_INFO_ID)
continue;
71 insert(it.key(), it.value());
76 const QString &mechanism,
77 QString &allowedMechanism)
82 if (methodMap.isEmpty())
85 if (!methodMap.contains(method))
93 if (mechs.contains(mechanism)) {
94 allowedMechanism = mechanism;
103 QStringList mechanisms =
104 mechanism.split(QLatin1Char(
' '), QString::SkipEmptyParts);
108 if (mechanisms.size() <= 1)
111 QStringList allowedMechanisms;
112 foreach (
const QString &mech, mechanisms) {
113 if (mechs.contains(mech))
114 allowedMechanisms.append(mech);
116 if (allowedMechanisms.isEmpty())
119 allowedMechanism = allowedMechanisms.join(QLatin1String(
" "));
QStringList MechanismsList
void setMethods(const MethodMap &methods)
bool checkMethodAndMechanism(const QString &method, const QString &mechanism, QString &allowedMechanism)
MethodMap methods() const
Daemon side representation of identity information.
const QVariantMap toMap() const
void update(const SignonIdentityInfo &info)