KProtocolManager Class Reference
#include <kprotocolmanager.h>
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.
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 | noProxyForRaw () |
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 () |
Member Enumeration Documentation
|
Proxy authorization modes.
Definition at line 194 of file kprotocolmanager.h. |
|
Types of proxy configuration.
Definition at line 166 of file kprotocolmanager.h. |
Member Function Documentation
|
Returns true if partial downloads should be automatically resumed.
Definition at line 523 of file kprotocolmanager.cpp. |
|
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 Cache control directive to be used.
Definition at line 180 of file kprotocolmanager.cpp. |
|
The directory which contains the cache files.
Definition at line 189 of file kprotocolmanager.cpp. |
|
Returns the preferred timeout value for remote connections in seconds.
Definition at line 120 of file kprotocolmanager.cpp. |
|
Returns the default user-agent value.
Definition at line 440 of file kprotocolmanager.cpp. |
|
Returns the default user-agent string.
Definition at line 434 of file kprotocolmanager.cpp. |
|
Returns true if partial downloads should be marked with a ".part" extension.
Definition at line 508 of file kprotocolmanager.cpp. |
|
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. |
|
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. |
|
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 515 of file kprotocolmanager.cpp. |
|
Returns a comma-separated list of hostnames or partial host-names that should bypass any proxy settings.
This function as well as useReverseProxy only apply when proxyType is
Definition at line 215 of file kprotocolmanager.cpp. |
|
Same as above except the environment variable name is returned instead of the variable value when proxyType is
Definition at line 207 of file kprotocolmanager.cpp. |
|
Returns true if connections should be persistent.
Definition at line 530 of file kprotocolmanager.cpp. |
|
Returns true if proxy connections should be persistent.
Definition at line 537 of file kprotocolmanager.cpp. |
|
Returns the way proxy authorization should be handled.
Definition at line 165 of file kprotocolmanager.cpp. |
|
Returns the URL of the script for automatic proxy configuration.
Definition at line 544 of file kprotocolmanager.cpp. |
|
Returns the preferred timeout value for proxy connections in seconds.
Definition at line 128 of file kprotocolmanager.cpp. |
|
Returns the proxy server address for a given protocol. NOTE: This function does not take the useReverseProxy() settings into account.
Definition at line 224 of file kprotocolmanager.cpp. |
|
Returns the proxy server address for a given URL. If proxyType returns Automatic, an external service called KPAC (a kded module) is used to determine the proxy server. Otherwise, proxyFor is invoked to determine whether the URL needs to be routed through a proxy server. NOTE: This function does not take the useReverseProxy() or the noProxyFor() settings into account.
Definition at line 238 of file kprotocolmanager.cpp. |
|
Returns the type of proxy configuration that is used.
Definition at line 158 of file kprotocolmanager.cpp. |
|
Returns the preferred timeout value for reading from remote connections in seconds.
Definition at line 112 of file kprotocolmanager.cpp. |
|
Force a reload of the general config file of io-slaves ( kioslaverc).
Definition at line 78 of file kprotocolmanager.cpp. |
|
Returns the preferred response timeout value for remote connecting in seconds.
Definition at line 136 of file kprotocolmanager.cpp. |
|
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. |
|
Returns true/false to indicate whether a cache should be used.
Definition at line 174 of file kprotocolmanager.cpp. |
|
Returns true if the user specified a proxy server to make connections.
Definition at line 146 of file kprotocolmanager.cpp. |
|
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 418 of file kprotocolmanager.cpp. |
|
Returns true if the proxy settings should apply to the list returned by noProxyFor. Normally addresses listed in the noProxyFor list are not routed through a proxy server. However, if this function returns true, then all addresses listed in the noProxyFor list are to be routed through a proxy server where as those that are not should bypass it.
This function as well as noProxyFor only apply when proxyType is
Definition at line 151 of file kprotocolmanager.cpp. |
The documentation for this class was generated from the following files: