#ifndef AUTHENTICATIONCREDENTIALS #define AUTHENTICATIONCREDENTIALS #include #include #include #include namespace Network { class Download; class AuthenticationCredentials { friend class Download; public: AuthenticationCredentials(); AuthenticationCredentials(const QString &userName, const QString &password); const QString &userName() const; const QString &password() const; const QList> options() const; bool isIncomplete() const; void clear(); private: bool m_requested; QString m_userName; QString m_password; QList> m_options; }; inline AuthenticationCredentials::AuthenticationCredentials() : m_requested(false) { } inline AuthenticationCredentials::AuthenticationCredentials(const QString &userName, const QString &password) : m_requested(false) , m_userName(userName) , m_password(password) { } inline const QString &AuthenticationCredentials::userName() const { return m_userName; } inline const QString &AuthenticationCredentials::password() const { return m_password; } inline const QList> AuthenticationCredentials::options() const { return m_options; } inline bool AuthenticationCredentials::isIncomplete() const { return m_userName.isEmpty() || m_password.isEmpty(); } inline void AuthenticationCredentials::clear() { m_userName.clear(); m_password.clear(); m_options.clear(); } } // namespace Network #endif // AUTHENTICATIONCREDENTIALS