AusweisApp2
ProxyCredentials.h
gehe zur Dokumentation dieser Datei
1 
5 #pragma once
6 
7 #include <QAuthenticator>
8 #include <QEventLoop>
9 #include <QNetworkProxy>
10 
11 
12 namespace governikus
13 {
14 
16  : public QObject
17 {
18  Q_OBJECT
19 
20  Q_PROPERTY(QString proposedUser READ getProposedUser CONSTANT)
21  Q_PROPERTY(QString url READ getUrl CONSTANT)
22  Q_PROPERTY(QString user READ getUser WRITE setUser NOTIFY fireProxyCredentialsChanged)
23  Q_PROPERTY(QString password READ getPassword WRITE setPassword NOTIFY fireProxyCredentialsChanged)
24 
25  private:
26  QEventLoop mLoop;
27  QAuthenticator* mAuthenticator;
28  const QString mProposedUser;
29  const QString mUrl;
30 
31  QString createUrl(const QNetworkProxy& pProxy) const;
32 
33  public:
34  ProxyCredentials(const QNetworkProxy& pProxy, QAuthenticator* pAuthenticator);
35 
36  QString getProposedUser() const;
37  QString getUrl() const;
38 
39  QString getUser() const;
40  void setUser(const QString& pUser);
41 
42  QString getPassword() const;
43  void setPassword(const QString& pPassword);
44 
45  Q_INVOKABLE void confirmInput();
46  void waitForConfirmation();
47 
48  Q_SIGNALS:
50 };
51 
52 
53 } // namespace governikus
governikus::ProxyCredentials::getUrl
QString getUrl() const
Definition: ProxyCredentials.cpp:50
governikus::ProxyCredentials::ProxyCredentials
ProxyCredentials(const QNetworkProxy &pProxy, QAuthenticator *pAuthenticator)
Definition: ProxyCredentials.cpp:34
governikus::ProxyCredentials::fireProxyCredentialsChanged
void fireProxyCredentialsChanged()
ProxyCredentials.h
governikus::ProxyCredentials::getPassword
QString getPassword() const
Definition: ProxyCredentials.cpp:77
governikus::ProxyCredentials::setPassword
void setPassword(const QString &pPassword)
Definition: ProxyCredentials.cpp:88
governikus::ProxyCredentials
Definition: ProxyCredentials.h:17
governikus
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
governikus::ProxyCredentials::proposedUser
QString proposedUser
Definition: ProxyCredentials.h:20
governikus::ProxyCredentials::waitForConfirmation
void waitForConfirmation()
Definition: ProxyCredentials.cpp:104
governikus::ProxyCredentials::confirmInput
Q_INVOKABLE void confirmInput()
Definition: ProxyCredentials.cpp:98
governikus::ProxyCredentials::url
QString url
Definition: ProxyCredentials.h:21
governikus::ProxyCredentials::setUser
void setUser(const QString &pUser)
Definition: ProxyCredentials.cpp:67
governikus::ProxyCredentials::user
QString user
Definition: ProxyCredentials.h:22
governikus::ProxyCredentials::getUser
QString getUser() const
Definition: ProxyCredentials.cpp:56
governikus::ProxyCredentials::password
QString password
Definition: ProxyCredentials.h:23
governikus::ProxyCredentials::getProposedUser
QString getProposedUser() const
Definition: ProxyCredentials.cpp:44