KProtocolManager Class Reference
Provides information about I/O (Internet, etc. More...
#include <kprotocolmanager.h>
Public Types | |
enum | ProxyType { NoProxy, ManualProxy, PACProxy, WPADProxy, EnvVarProxy } |
enum | ProxyAuthMode { Prompt, Automatic } |
Static Public Member Functions | |
static QString | defaultUserAgent () |
static QString | defaultUserAgent (const QString &keys) |
static QString | userAgentForHost (const QString &hostname) |
static int | readTimeout () |
static int | connectTimeout () |
static int | proxyConnectTimeout () |
static int | responseTimeout () |
static bool | useProxy () |
static bool | useReverseProxy () |
static ProxyType | proxyType () |
static ProxyAuthMode | proxyAuthMode () |
static QString | noProxyFor () |
static QString | proxyFor (const QString &protocol) |
static QString | proxyForURL (const KURL &url) |
static void | badProxy (const QString &proxy) |
static QString | proxyConfigScript () |
static bool | useCache () |
static int | maxCacheAge () |
static int | maxCacheSize () |
static QString | cacheDir () |
static KIO::CacheControl | cacheControl () |
static bool | autoResume () |
static bool | markPartial () |
static int | minimumKeepSize () |
static bool | persistentProxyConnection () |
static bool | persistentConnections () |
static void | reparseConfiguration () |
static QString | slaveProtocol (const KURL &url, QString &proxy) |
static KConfig * | config () |
Detailed Description
Provides information about I/O (Internet, etc.) settings chosen/set by the end user.
KProtocolManager has a heap of static functions that allows only read access to KDE's IO related settings. These include proxy, cache, file transfer resumption, timeout and user-agent related settings.
The information provided by this class is generic enough to be applicable to any application that makes use of KDE's IO sub-system. Note that this mean the proxy, timeout etc. settings are saved in a separate user-specific config file and not in the config file of the application.
Original author:
- Author:
- Torben Weis <weis@kde.org>
- Author:
- Waldo Bastain <bastain@kde.org>
Dawit Alemayehu <adawit@kde.org>
- See also:
- KPAC
Definition at line 54 of file kprotocolmanager.h.
Member Enumeration Documentation
|
Types of proxy configuration.
Definition at line 157 of file kprotocolmanager.h. |
|
Proxy authorization modes.
Definition at line 178 of file kprotocolmanager.h. |
Member Function Documentation
|
Returns the default user-agent string.
Definition at line 429 of file kprotocolmanager.cpp. Referenced by userAgentForHost(). |
|
Returns the default user-agent value.
Definition at line 435 of file kprotocolmanager.cpp. References KGlobal::locale(). |
|
Returns the userAgent string configured for the specified host. If hostname is not found or is empty (i.e. "" or QString::null) this function will return the default user agent.
Definition at line 413 of file kprotocolmanager.cpp. References defaultUserAgent(). |
|
Returns the preferred timeout value for reading from remote connections in seconds.
Definition at line 112 of file kprotocolmanager.cpp. References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns the preferred timeout value for remote connections in seconds.
Definition at line 120 of file kprotocolmanager.cpp. References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns the preferred timeout value for proxy connections in seconds.
Definition at line 128 of file kprotocolmanager.cpp. References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns the preferred response timeout value for remote connecting in seconds.
Definition at line 136 of file kprotocolmanager.cpp. References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns whether or not the user specified the use of proxy server to make connections.
Definition at line 146 of file kprotocolmanager.cpp. References proxyType(). Referenced by slaveProtocol(). |
|
Returns whether or not the the proxy server lookup should be reversed or not.
Definition at line 151 of file kprotocolmanager.cpp. References KConfigBase::readBoolEntry(), and KConfigBase::setGroup(). Referenced by slaveProtocol(). |
|
Returns the type of proxy configuration that is used.
Definition at line 158 of file kprotocolmanager.cpp. References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). Referenced by noProxyFor(), proxyForURL(), slaveProtocol(), and useProxy(). |
|
Returns the way proxy authorization should be handled.
Definition at line 165 of file kprotocolmanager.cpp. References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns the strings for hosts that should contacted DIRECTLY, bypassing any proxy settings.
Definition at line 207 of file kprotocolmanager.cpp. References proxyType(), KConfigBase::readEntry(), and KConfigBase::setGroup(). Referenced by slaveProtocol(). |
|
Returns the proxy server address for a given protocol.
Definition at line 224 of file kprotocolmanager.cpp. References KConfigBase::readEntry(), and KConfigBase::setGroup(). Referenced by proxyForURL(). |
|
Returns the Proxy server address for a given URL If automatic proxy configuration is configured, KPAC is used to determine the proxy server, otherwise the return value of proxyFor for the URL's protocol is used. If an empty string is returned, the request is to be aborted, a return value of "DIRECT" requests a direct connection.
Definition at line 238 of file kprotocolmanager.cpp. References KURL::host(), KURL::protocol(), proxyFor(), proxyType(), and KURL::setProtocol(). Referenced by slaveProtocol(). |
|
Marks this proxy as bad (down). It will not be used for the next 30 minutes. (The script may supply an alternate proxy)
Definition at line 283 of file kprotocolmanager.cpp. |
|
Returns the URL of the script for automatic proxy configuration.
Definition at line 523 of file kprotocolmanager.cpp. References KConfigBase::readEntry(), and KConfigBase::setGroup(). |
|
Returns true/false to indicate whether a cache should be used.
Definition at line 174 of file kprotocolmanager.cpp. References KConfigBase::readBoolEntry(). |
|
Returns the maximum age in seconds cached files should be kept before they are deleted as necessary.
Definition at line 195 of file kprotocolmanager.cpp. References KConfigBase::readNumEntry(). |
|
Returns the maximum size that can be used for caching. By default this function returns the DEFAULT_MAX_CACHE_SIZE value as defined in http_slave_defaults.h. Not that the value returned is in bytes, hence a value of 5120 would mean 5 Kb.
Definition at line 201 of file kprotocolmanager.cpp. References KConfigBase::readNumEntry(). |
|
The directory which contains the cache files.
Definition at line 189 of file kprotocolmanager.cpp. References KGlobal::dirs(), and KConfigBase::readPathEntry(). |
|
Returns the Cache control directive to be used.
Definition at line 180 of file kprotocolmanager.cpp. References KIO::parseCacheControl(), and KConfigBase::readEntry(). |
|
Returns true if partial downloads should be automatically resumed.
Definition at line 502 of file kprotocolmanager.cpp. References KConfigBase::readBoolEntry(), and KConfigBase::setGroup(). |
|
Returns true if partial downloads should be marked with a ".part" extension.
Definition at line 487 of file kprotocolmanager.cpp. References KConfigBase::readBoolEntry(), and KConfigBase::setGroup(). |
|
Returns the minimum file size for keeping aborted downloads. Any data downloaded that does not meet this minimum requirement will simply be discarded. The default size is 5 KB.
Definition at line 494 of file kprotocolmanager.cpp. References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns true if proxy connections should be persistent.
Definition at line 516 of file kprotocolmanager.cpp. References KConfigBase::readBoolEntry(), and KConfigBase::setGroup(). |
|
Returns true if connections should be persistent.
Definition at line 509 of file kprotocolmanager.cpp. References KConfigBase::readBoolEntry(), and KConfigBase::setGroup(). |
|
Force a reload of the general config file of io-slaves ( kioslaverc).
Definition at line 78 of file kprotocolmanager.cpp. References KStaticDeleter< type >::destructObject(). |
|
Return the protocol to use in order to handle the given When a proxy is to be used, proxy contains the URL for the proxy.
Definition at line 329 of file kprotocolmanager.cpp. References endl(), kdDebug(), noProxyFor(), proxyForURL(), proxyType(), KURL::split(), useProxy(), and useReverseProxy(). |
The documentation for this class was generated from the following files: