KProtocolManager Class Reference
Provides information about I/O (Internet, etc.) settings chosen/set by the end user. More...
#include <kprotocolmanager.h>
Public Types | |
enum | ProxyType |
enum | ProxyAuthMode |
Static Public Methods | |
QString | defaultUserAgent () |
QString | defaultUserAgent (const QString &keys) |
QString | userAgentForHost (const QString &hostname) |
int | readTimeout () |
int | connectTimeout () |
int | proxyConnectTimeout () |
int | responseTimeout () |
bool | useProxy () |
bool | useReverseProxy () |
ProxyType | proxyType () |
ProxyAuthMode | proxyAuthMode () |
QString | noProxyFor () |
QString | proxyForURL (const KURL &url) |
void | badProxy (const QString &proxy) |
QString | proxyConfigScript () |
bool | useCache () |
int | maxCacheAge () |
int | maxCacheSize () |
QString | cacheDir () |
KIO::CacheControl | cacheControl () |
bool | autoResume () |
bool | markPartial () |
int | minimumKeepSize () |
bool | persistentProxyConnection () |
bool | persistentConnections () |
void | reparseConfiguration () |
QString | slaveProtocol (const KURL &url, QString &proxy) |
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. Referenced by proxyForURL(), and proxyType(). |
|
Proxy authorization modes.
Definition at line 178 of file kprotocolmanager.h. Referenced by proxyAuthMode(). |
Member Function Documentation
|
Returns the default user-agent string.
Definition at line 408 of file kprotocolmanager.cpp. Referenced by userAgentForHost(). |
|
Returns the default user-agent value.
Definition at line 414 of file kprotocolmanager.cpp. References QString::arg(), QString::contains(), QString::fromLatin1(), QString::isEmpty(), QStringList::join(), KLocale::languageList(), KGlobal::locale(), and QString::lower(). |
|
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 396 of file kprotocolmanager.cpp. References defaultUserAgent(), QString::isEmpty(), and QString::lower(). |
|
Returns the preferred timeout value for reading from remote connections in seconds.
Definition at line 115 of file kprotocolmanager.cpp. |
|
Returns the preferred timeout value for remote connections in seconds.
Definition at line 123 of file kprotocolmanager.cpp. Referenced by KIO::rawErrorDetail(). |
|
Returns the preferred timeout value for proxy connections in seconds.
Definition at line 131 of file kprotocolmanager.cpp. Referenced by KIO::rawErrorDetail(). |
|
Returns the preferred response timeout value for remote connecting in seconds.
Definition at line 139 of file kprotocolmanager.cpp. Referenced by KIO::rawErrorDetail(). |
|
Returns whether or not the user specified the use of proxy server to make connections.
Definition at line 149 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 154 of file kprotocolmanager.cpp. Referenced by slaveProtocol(). |
|
Returns the type of proxy configuration that is used.
Definition at line 161 of file kprotocolmanager.cpp. References ProxyType. Referenced by noProxyFor(), proxyForURL(), slaveProtocol(), and useProxy(). |
|
Returns the way proxy authorization should be handled.
Definition at line 168 of file kprotocolmanager.cpp. References ProxyAuthMode. |
|
Returns the strings for hosts that should contacted DIRECTLY, bypassing any proxy settings.
Definition at line 210 of file kprotocolmanager.cpp. References QString::fromLocal8Bit(), QString::local8Bit(), and proxyType(). Referenced by slaveProtocol(). |
|
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 236 of file kprotocolmanager.cpp. References QString::fromLatin1(), QString::fromLocal8Bit(), KURL::host(), QString::isEmpty(), QString::local8Bit(), KURL::protocol(), proxyType(), ProxyType, and QString::startsWith(). 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 266 of file kprotocolmanager.cpp. |
|
Returns the URL of the script for automatic proxy configuration.
Definition at line 502 of file kprotocolmanager.cpp. |
|
Returns true/false to indicate whether a cache should be used.
Definition at line 177 of file kprotocolmanager.cpp. |
|
Returns the maximum age in seconds cached files should be kept before they are deleted as necessary.
Definition at line 198 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 204 of file kprotocolmanager.cpp. |
|
The directory which contains the cache files.
Definition at line 192 of file kprotocolmanager.cpp. References KGlobal::dirs(). |
|
Returns the Cache control directive to be used.
Definition at line 183 of file kprotocolmanager.cpp. References QString::isEmpty(), and KIO::parseCacheControl(). |
|
Returns true if partial downloads should be automatically resumed.
Definition at line 481 of file kprotocolmanager.cpp. Referenced by KIO::FileCopyJob::slotCanResume(). |
|
Returns true if partial downloads should be marked with a ".part" extension.
Definition at line 466 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 473 of file kprotocolmanager.cpp. |
|
Returns true if proxy connections should be persistent.
Definition at line 495 of file kprotocolmanager.cpp. |
|
Returns true if connections should be persistent.
Definition at line 488 of file kprotocolmanager.cpp. |
|
Force a reload of the general config file of io-slaves ( kioslaverc).
Definition at line 80 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 312 of file kprotocolmanager.cpp. References KURL::hasSubURL(), KURL::host(), QString::isEmpty(), QString::latin1(), QString::lower(), noProxyFor(), QString::number(), KURL::port(), KURL::protocol(), proxyForURL(), proxyType(), KURL::split(), QString::startsWith(), QString::stripWhiteSpace(), useProxy(), and useReverseProxy(). |
The documentation for this class was generated from the following files: