37 #include <QStringList>
40 #include <SignOn/libsignoncommon.h>
52 #define SIGNON_SESSION_DECLARE_PROPERTY(type_, name_) \
53 void set##name_(const type_ &value ) { m_data.insert(QLatin1String(#name_), value); } \
54 type_ name_() const { return m_data.value(QLatin1String(#name_)).value<type_>(); }
61 #define SSO_ACCESS_CONTROL_TOKENS QLatin1String("AccessControlTokens")
99 SessionData(
const QVariantMap &data = QVariantMap()) { m_data = data; }
123 m_data.unite(other.
m_data);
132 return m_data.keys();
142 return m_data.value(propertyName, QVariant());
150 return getProperty(SSO_ACCESS_CONTROL_TOKENS).toStringList();
158 template <
class T> T
data()
const {
160 dataImpl.m_data = m_data;
168 QVariantMap
toMap()
const {
return m_data; }
175 SIGNON_SESSION_DECLARE_PROPERTY(QString, Secret)
180 SIGNON_SESSION_DECLARE_PROPERTY(QString, UserName)
186 SIGNON_SESSION_DECLARE_PROPERTY(QString, Realm)
192 SIGNON_SESSION_DECLARE_PROPERTY(QString, NetworkProxy)
199 SIGNON_SESSION_DECLARE_PROPERTY(
int, UiPolicy)
209 SIGNON_SESSION_DECLARE_PROPERTY(QString, Caption)
217 SIGNON_SESSION_DECLARE_PROPERTY(quint32, NetworkTimeout)
223 SIGNON_SESSION_DECLARE_PROPERTY(quint32, WindowId)
232 SIGNON_SESSION_DECLARE_PROPERTY(
bool, RenewToken)
241 #endif // SESSIONDATA_H
const QStringList propertyNames() const
Access the list of runtime existing properties of the SessionData.
SignonUiPolicy
Policy to define how the plugin interacts with the user.
Data container to hold values for authentication session.
QVariantMap toMap() const
Gets the QVariantMap of session parameters.
SessionData & operator+=(const SessionData &other)
Addition operator.
QStringList getAccessControlTokens() const
Gets the access control tokens that the requesting application has.
SessionData(const SessionData &other)
Copy constructor.
SessionData & operator=(const SessionData &other)
Assignment operator.
SessionData(const QVariantMap &data=QVariantMap())
Constructor.
const QVariant getProperty(const QString &propertyName) const
Access the list of runtime existing properties of the SessionData.
QVariantMap m_data
Declares the property Secret setter and getter.
T data() const
Creates an instance of type T, which must be derived from SessionData.