Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/network/kernel/qnetworkproxy.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the QtNetwork module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4949
    5050    \reentrant
    51     \ingroup io
     51    \ingroup
    5252    \inmodule QtNetwork
    5353
     
    5555    proxy support to the Qt network classes. The currently supported
    5656    classes are QAbstractSocket, QTcpSocket, QUdpSocket, QTcpServer,
    57     QHttp and QFtp. The proxy support is designed to be as transparent
    58     as possible. This means that existing network-enabled applications
    59     that you have written should automatically support network proxy
    60     using the following code.
     57    Q
     58   
     59   
     60    using the following code.
    6161
    6262    \snippet doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp 0
     
    8787    The supported authentication methods are no authentication and
    8888    username/password authentication.  Both IPv4 and IPv6 are
    89     supported, but domain name resolution via the SOCKS server is not
    90     supported; i.e. all domain names are resolved locally. There are
    91     several things to remember when using SOCKS5 with QUdpSocket and
    92     QTcpServer:
     89    supported. Domain names are resolved through the SOCKS5 server if
     90    the QNetworkProxy::HostNameLookupCapability is enabled, otherwise
     91    they are resolved locally and the IP address is sent to the
     92    server. There are several things to remember when using SOCKS5
     93    with QUdpSocket and QTcpServer:
    9394
    9495    With QUdpSocket, a call to \l {QUdpSocket::bind()}{bind()} may fail
     
    160161        \o Caching-only HTTP
    161162        \o Implemented using normal HTTP commands, it is useful only
    162            in the context of HTTP requests (see QHttp,
    163            QNetworkAccessManager)
     163           in the context of HTTP requests (see QNetworkAccessManager)
    164164        \o CachingCapability, HostNameLookupCapability
    165165
     
    221221#ifndef QT_NO_NETWORKPROXY
    222222
     223
    223224#include "private/qsocks5socketengine_p.h"
    224225#include "private/qhttpsocketengine_p.h"
     
    324325}
    325326
    326 Q_GLOBAL_STATIC(QGlobalNetworkProxy, globalNetworkProxy);
     327Q_GLOBAL_STATIC(QGlobalNetworkProxy, globalNetworkProxy)
    327328
    328329namespace {
     
    366367    };
    367368
    368     Q_ASSERT(int(type) >= 0 && int(type) <= int(QNetworkProxy::FtpCachingProxy));
     369    if (int(type) < 0 || int(type) > int(QNetworkProxy::FtpCachingProxy))
     370        type = QNetworkProxy::DefaultProxy;
    369371    return QNetworkProxy::Capabilities(defaults[int(type)]);
    370372}
     
    379381    quint16 port;
    380382    QNetworkProxy::ProxyType type;
     383
    381384
    382385    inline QNetworkProxyPrivate(QNetworkProxy::ProxyType t = QNetworkProxy::DefaultProxy,
     
    388391          capabilities(defaultCapabilitiesForType(t)),
    389392          port(p),
    390           type(t)
     393          type(t),
     394          capabilitiesSet(false)
    391395    { }
    392396
     
    491495
    492496    Note that changing the type of a proxy does not change
    493     the set of capabilities this QNetworkProxy object holds.
     497    the set of capabilities this QNetworkProxy object holds if any
     498    capabilities have been set with setCapabilities().
    494499
    495500    \sa type(), setCapabilities()
     
    498503{
    499504    d->type = type;
     505
     506
    500507}
    501508
     
    520527{
    521528    d->capabilities = capabilities;
     529
    522530}
    523531
     
    11121120    \since 4.5
    11131121
    1114     \ingroup io
     1122    \ingroup
    11151123    \inmodule QtNetwork
    11161124
     
    11481156QNetworkProxyFactory::~QNetworkProxyFactory()
    11491157{
     1158
     1159
     1160
     1161
     1162
     1163
     1164
     1165
     1166
     1167
     1168
     1169
     1170
     1171
     1172
     1173
     1174
     1175
     1176
     1177
     1178
     1179
     1180
    11501181}
    11511182
     
    12511282}
    12521283
     1284
     1285
    12531286#endif // QT_NO_NETWORKPROXY
    1254 
    1255 QT_END_NAMESPACE
Note: See TracChangeset for help on using the changeset viewer.