Qt 4.8
Public Functions | Properties | List of all members
QHttpSetProxyRequest Class Reference
Inheritance diagram for QHttpSetProxyRequest:
QHttpRequest

Public Functions

QIODevicedestinationDevice ()
 
 QHttpSetProxyRequest (const QNetworkProxy &proxy)
 
QIODevicesourceDevice ()
 
void start (QHttp *http)
 
- Public Functions inherited from QHttpRequest
virtual bool hasRequestHeader ()
 
 QHttpRequest ()
 
virtual QHttpRequestHeader requestHeader ()
 
virtual ~QHttpRequest ()
 

Properties

QNetworkProxy proxy
 

Additional Inherited Members

- Public Variables inherited from QHttpRequest
bool finished
 
int id
 

Detailed Description

Definition at line 419 of file qhttp.cpp.

Constructors and Destructors

◆ QHttpSetProxyRequest()

QHttpSetProxyRequest::QHttpSetProxyRequest ( const QNetworkProxy proxy)
inline

Definition at line 422 of file qhttp.cpp.

423  {
424  this->proxy = proxy;
425  }
QNetworkProxy proxy
Definition: qhttp.cpp:444

Functions

◆ destinationDevice()

QIODevice* QHttpSetProxyRequest::destinationDevice ( )
inlinevirtual

Implements QHttpRequest.

Definition at line 441 of file qhttp.cpp.

442  { return 0; }

◆ sourceDevice()

QIODevice* QHttpSetProxyRequest::sourceDevice ( )
inlinevirtual

Implements QHttpRequest.

Definition at line 439 of file qhttp.cpp.

440  { return 0; }

◆ start()

void QHttpSetProxyRequest::start ( QHttp http)
inlinevirtual

Implements QHttpRequest.

Definition at line 427 of file qhttp.cpp.

428  {
429  http->d_func()->proxy = proxy;
430  QString user = proxy.user();
431  if (!user.isEmpty())
432  http->d_func()->proxyAuthenticator.setUser(user);
433  QString password = proxy.password();
434  if (!password.isEmpty())
435  http->d_func()->proxyAuthenticator.setPassword(password);
436  http->d_func()->finishedWithSuccess();
437  }
The QString class provides a Unicode character string.
Definition: qstring.h:83
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
int setUser(const QString &username, const QString &password=QString())
This function sets the user name userName and password password for web pages that require authentica...
Definition: qhttp.cpp:2176
QString password() const
Returns the password used for authentication.
QString user() const
Returns the user name used for authentication.
QNetworkProxy proxy
Definition: qhttp.cpp:444

Properties

◆ proxy

QNetworkProxy QHttpSetProxyRequest::proxy
private

Definition at line 444 of file qhttp.cpp.


The documentation for this class was generated from the following file: