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 { NoProxy, ManualProxy, PACProxy, WPADProxy, EnvVarProxy } |
enum | ProxyAuthMode { Prompt, Automatic } |
Static Public Member Functions | |
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 | proxyFor (const QString &protocol) |
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) |
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. Referenced by proxyForURL(), and proxyType(). |
|
Proxy authorization modes.
Referenced by proxyAuthMode(). |
Member Function Documentation
|
Returns the default user-agent string.
Referenced by userAgentForHost(). |
|
Returns the default user-agent value.
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.
References defaultUserAgent(), QString::isEmpty(), and QString::lower(). |
|
Returns the preferred timeout value for reading from remote connections in seconds.
References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns the preferred timeout value for remote connections in seconds.
References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns the preferred timeout value for proxy connections in seconds.
References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns the preferred response timeout value for remote connecting in seconds.
References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns whether or not the user specified the use of proxy server to make connections.
References proxyType(). Referenced by slaveProtocol(). |
|
Returns whether or not the the proxy server lookup should be reversed or not.
References KConfigBase::readBoolEntry(), and KConfigBase::setGroup(). Referenced by slaveProtocol(). |
|
Returns the type of proxy configuration that is used.
References ProxyType, KConfigBase::readNumEntry(), and KConfigBase::setGroup(). Referenced by noProxyFor(), proxyForURL(), slaveProtocol(), and useProxy(). |
|
Returns the way proxy authorization should be handled.
References ProxyAuthMode, KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns the strings for hosts that should contacted DIRECTLY, bypassing any proxy settings.
References QString::fromLocal8Bit(), QString::local8Bit(), proxyType(), KConfigBase::readEntry(), and KConfigBase::setGroup(). 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.
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)
|
|
Returns the URL of the script for automatic proxy configuration.
References KConfigBase::readEntry(), and KConfigBase::setGroup(). |
|
Returns true/false to indicate whether a cache should be used.
References KConfigBase::readBoolEntry(). |
|
Returns the maximum age in seconds cached files should be kept before they are deleted as necessary.
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.
References KConfigBase::readNumEntry(). |
|
The directory which contains the cache files.
References KConfigBase::readPathEntry(). |
|
Returns the Cache control directive to be used.
References QString::isEmpty(), KIO::parseCacheControl(), and KConfigBase::readEntry(). |
|
Returns true if partial downloads should be automatically resumed.
References KConfigBase::readBoolEntry(), and KConfigBase::setGroup(). |
|
Returns true if partial downloads should be marked with a ".part" extension.
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.
References KConfigBase::readNumEntry(), and KConfigBase::setGroup(). |
|
Returns true if proxy connections should be persistent.
References KConfigBase::readBoolEntry(), and KConfigBase::setGroup(). |
|
Returns true if connections should be persistent.
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. |
|
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.
References endl(), QValueList::fromLast(), KURL::hasSubURL(), KURL::host(), QString::isEmpty(), kdDebug(), 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: