com.trolltech.qt.network
Class QNetworkProxy.ProxyType

java.lang.Object
  extended by java.lang.Enum
      extended by com.trolltech.qt.network.QNetworkProxy.ProxyType
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable
Enclosing class:
QNetworkProxy

public static final class QNetworkProxy.ProxyType
extends java.lang.Enum
implements QtEnumerator

This enum describes the types of network proxying provided in Qt.

There are two types of proxies that Qt understands: transparent proxies and caching proxies. The first group consists of proxies that can handle any arbitrary data transfer, while the second can only handle specific requests. The caching proxies only make sense for the specific classes where they can be used. The table below lists different proxy types and their capabilities. Since each proxy type has different capabilities, it is important to understand them before choosing a proxy type.

Proxy type
Description
Default capabilities
SOCKS 5 Generic proxy for any kind of connection. Supports TCP, UDP, binding to a port (incoming connections) and authentication. TunnelingCapability , ListeningCapability , UdpTunnelingCapability , HostNameLookupCapability
HTTP Implemented using the "CONNECT" command, supports only outgoing TCP connections; supports authentication. TunnelingCapability , CachingCapability , HostNameLookupCapability
Caching-only HTTP Implemented using normal HTTP commands, it is useful only in the context of HTTP requests (see QHttp, QNetworkAccessManager) CachingCapability , HostNameLookupCapability
Caching FTP Implemented using an FTP proxy, it is useful only in the context of FTP requests (see QFtp, QNetworkAccessManager) CachingCapability , HostNameLookupCapability
Also note that you shouldn't set the application default proxy (setApplicationProxy()) to a proxy that doesn't have the TunnelingCapability capability. If you do, QTcpSocket will not know how to open connections.

See also:
setType(), type(), capabilities(), and setCapabilities().

See Also:
Serialized Form

Field Summary
static QNetworkProxy.ProxyType DefaultProxy
          Proxy is determined based on the application proxy set using setApplicationProxy()
static QNetworkProxy.ProxyType FtpCachingProxy
          Proxying for FTP requests only
static QNetworkProxy.ProxyType HttpCachingProxy
          Proxying for HTTP requests only
static QNetworkProxy.ProxyType HttpProxy
          HTTP transparent proxying is used
static QNetworkProxy.ProxyType NoProxy
          No proxying is used
static QNetworkProxy.ProxyType Socks5Proxy
          Socks5 proxying is used
 
Method Summary
static QNetworkProxy.ProxyType resolve(int value)
          Returns the QNetworkProxy$ProxyType constant with the specified int.
 int value()
          This function should return an integer value for the enum values of the enumeration that implements this interface.
static QNetworkProxy.ProxyType valueOf(java.lang.String name)
           
static QNetworkProxy.ProxyType[] values()
           
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DefaultProxy

public static final QNetworkProxy.ProxyType DefaultProxy
Proxy is determined based on the application proxy set using setApplicationProxy()


Socks5Proxy

public static final QNetworkProxy.ProxyType Socks5Proxy
Socks5 proxying is used


NoProxy

public static final QNetworkProxy.ProxyType NoProxy
No proxying is used


HttpProxy

public static final QNetworkProxy.ProxyType HttpProxy
HTTP transparent proxying is used


HttpCachingProxy

public static final QNetworkProxy.ProxyType HttpCachingProxy
Proxying for HTTP requests only


FtpCachingProxy

public static final QNetworkProxy.ProxyType FtpCachingProxy
Proxying for FTP requests only

Method Detail

values

public static QNetworkProxy.ProxyType[] values()

valueOf

public static QNetworkProxy.ProxyType valueOf(java.lang.String name)

value

public int value()
This function should return an integer value for the enum values of the enumeration that implements this interface.

Specified by:
value in interface QtEnumerator

resolve

public static QNetworkProxy.ProxyType resolve(int value)
Returns the QNetworkProxy$ProxyType constant with the specified int.