Qt 4.8
Public Functions | Properties | List of all members
Maemo::NetworkProxyFactory Class Reference
Inheritance diagram for Maemo::NetworkProxyFactory:
QNetworkProxyFactory

Public Functions

 NetworkProxyFactory ()
 
QList< QNetworkProxyqueryProxy (const QNetworkProxyQuery &query=QNetworkProxyQuery())
 This function takes the query request, query, examines the details of the type of socket or request and returns a list of QNetworkProxy objects that indicate the proxy servers to be used, in order of preference. More...
 

Properties

ProxyConf proxy_conf
 
bool proxy_data_read
 

Additional Inherited Members

- Private Functions inherited from QNetworkProxyFactory
 QNetworkProxyFactory ()
 Creates a QNetworkProxyFactory object. More...
 
virtual ~QNetworkProxyFactory ()
 Destroys the QNetworkProxyFactory object. More...
 
- Static Private Functions inherited from QNetworkProxyFactory
static QList< QNetworkProxyproxyForQuery (const QNetworkProxyQuery &query)
 This function takes the query request, query, examines the details of the type of socket or request and returns a list of QNetworkProxy objects that indicate the proxy servers to be used, in order of preference. More...
 
static void setApplicationProxyFactory (QNetworkProxyFactory *factory)
 Sets the application-wide proxy factory to be factory. More...
 
static void setUseSystemConfiguration (bool enable)
 Enables the use of the platform-specific proxy settings, and only those. More...
 
static QList< QNetworkProxysystemProxyForQuery (const QNetworkProxyQuery &query=QNetworkProxyQuery())
 This function takes the query request, query, examines the details of the type of socket or request and returns a list of QNetworkProxy objects that indicate the proxy servers to be used, in order of preference. More...
 

Detailed Description

Definition at line 145 of file proxyconf.cpp.

Constructors and Destructors

◆ NetworkProxyFactory()

Maemo::NetworkProxyFactory::NetworkProxyFactory ( )
inline

Definition at line 151 of file proxyconf.cpp.

151 : proxy_data_read(false) { }

Functions

◆ queryProxy()

QList< QNetworkProxy > Maemo::NetworkProxyFactory::queryProxy ( const QNetworkProxyQuery query = QNetworkProxyQuery())
virtual

This function takes the query request, query, examines the details of the type of socket or request and returns a list of QNetworkProxy objects that indicate the proxy servers to be used, in order of preference.

When reimplementing this class, take care to return at least one element.

If you cannot determine a better proxy alternative, use QNetworkProxy::DefaultProxy, which tells the code querying for a proxy to use a higher alternative. For example, if this factory is set to a QNetworkAccessManager object, DefaultProxy will tell it to query the application-level proxy settings.

If this factory is set as the application proxy factory, DefaultProxy and NoProxy will have the same meaning.

Implements QNetworkProxyFactory.

Definition at line 156 of file proxyconf.cpp.

157 {
158  if (proxy_data_read == false) {
159  proxy_data_read = true;
161  }
162 
163  QList<QNetworkProxy> result = proxy_conf.flush(query);
164  if (result.isEmpty())
165  result << QNetworkProxy::NoProxy;
166 
167  return result;
168 }
void readProxyData()
Definition: proxyconf.cpp:387
QList< QNetworkProxy > flush(const QNetworkProxyQuery &query=QNetworkProxyQuery())
Definition: proxyconf.cpp:392
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152

Properties

◆ proxy_conf

ProxyConf Maemo::NetworkProxyFactory::proxy_conf
private

Definition at line 147 of file proxyconf.cpp.

◆ proxy_data_read

bool Maemo::NetworkProxyFactory::proxy_data_read
private

Definition at line 148 of file proxyconf.cpp.


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