KIO
kprotocolmanager.cpp
Go to the documentation of this file.
92 if ( nptr[-1]=='/' && hptr == host ) // "bugs.kde.org" vs "http://bugs.kde.org", the config UI says URLs are ok
160 const bool useRevProxy = ((type == KProtocolManager::ManualProxy) && KProtocolManager::useReverseProxy());
161 const bool useNoProxyList = (type == KProtocolManager::ManualProxy || type == KProtocolManager::EnvVarProxy);
617 const QString sendUserAgent = KIO::SlaveConfig::self()->configData("http", hostname.toLower(), "SendUserAgent").toLower();
621 const QString useragent = KIO::SlaveConfig::self()->configData("http", hostname.toLower(), "UserAgent");
633 const QString modifiers = KIO::SlaveConfig::self()->configData("http", QString(), "UserAgentKeys");
828 QString KProtocolManager::userAgentForApplication( const QString &appName, const QString& appVersion,
872 // try calling GetVersionEx using the OSVERSIONINFOEX, if that fails, try using the OSVERSIONINFO
1160 KProtocolInfo::FileNameUsedForCopying KProtocolManager::fileNameUsedForCopying( const KUrl &url )
1196 return KIO::SlaveConfig::self()->configData(url.scheme(), url.host(), QLatin1String("Charset"));
static bool supportsLinking(const KUrl &url)
Returns whether the protocol can create links between files/objects.
Definition: kprotocolmanager.cpp:1086
static bool persistentProxyConnection()
Returns true if proxy connections should be persistent.
Definition: kprotocolmanager.cpp:978
static QString proxyFor(const QString &protocol)
Returns the proxy server address for a given protocol.
Definition: kprotocolmanager.cpp:374
QString readPathEntry(const QString &pKey, const QString &aDefault) const
MetaData configData(const QString &protocol, const QString &host)
Query slave configuration for slaves of type protocol when dealing with host.
Definition: slaveconfig.cpp:187
Definition: kprotocolmanager.h:197
static QString adjustProtocol(const QString &scheme)
Definition: kprotocolmanager.cpp:363
const char header[]
static List split(const QString &_url)
static bool canDeleteRecursive(const KUrl &url)
Returns whether the protocol can recursively delete directories by itself.
Definition: kprotocolmanager.cpp:1151
static void reparseConfiguration()
Force a reload of the general config file of io-slaves ( kioslaverc).
Definition: kprotocolmanager.cpp:232
static KProtocolInfo::Type inputType(const KUrl &url)
Returns whether the protocol should be treated as a filesystem or as a stream when reading from it...
Definition: kprotocolmanager.cpp:1004
static void badProxy(const QString &proxy)
Marks this proxy as bad (down).
Definition: kprotocolmanager.cpp:513
static QString noProxyFor()
Returns the strings for hosts that should contacted DIRECTLY, bypassing any proxy settings...
Definition: kprotocolmanager.cpp:354
static bool isKnownProtocol(const KUrl &url)
static QString userAgentForHost(const QString &hostname)
Returns the user-agent string configured for the specified host.
Definition: kprotocolmanager.cpp:615
bool hasHost() const
#define K_GLOBAL_STATIC(TYPE, NAME)
static int maxCacheSize()
Returns the maximum size that can be used for caching.
Definition: kprotocolmanager.cpp:349
QVariant property(const QString &_name, QVariant::Type t) const
KStandardDirs * dirs()
static KProtocolInfo::Ptr findProtocol(const KUrl &url)
Definition: kprotocolmanager.cpp:990
KConfigGroup group(const QByteArray &group)
static void extractProxyCacheKeyFromUrl(const KUrl &u, QString *key)
Definition: kprotocolmanager.cpp:536
void lookupHost(const QString &hostName, QObject *receiver, const char *member)
Definition: hostinfo.cpp:240
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static bool canRenameToFile(const KUrl &url)
Returns whether the protocol can rename (i.e.
Definition: kprotocolmanager.cpp:1142
static QString userAgentForApplication(const QString &appName, const QString &appVersion, const QStringList &extraInfo=QStringList())
Returns the application's user-agent string.
Definition: kprotocolmanager.cpp:828
static bool useProxy()
Returns whether or not the user specified the use of proxy server to make connections.
Definition: kprotocolmanager.cpp:301
KSharedConfigPtr config()
unsigned int versionRelease()
void setUser(const QString &user)
static bool useCache()
Returns true/false to indicate whether a cache should be used.
Definition: kprotocolmanager.cpp:326
static KProtocolInfoFactory * self()
void setProtocol(const QString &proto)
static int responseTimeout()
Returns the preferred response timeout value for remote connecting in seconds.
Definition: kprotocolmanager.cpp:292
static int readTimeout()
Returns the preferred timeout value for reading from remote connections in seconds.
Definition: kprotocolmanager.cpp:271
static bool supportsDeleting(const KUrl &url)
Returns whether the protocol can delete files/objects.
Definition: kprotocolmanager.cpp:1077
static KProtocolInfo::Type outputType(const KUrl &url)
Returns whether the protocol should be treated as a filesystem or as a stream when writing to it...
Definition: kprotocolmanager.cpp:1013
static bool useReverseProxy()
Returns whether or not the proxy server lookup should be reversed or not.
Definition: kprotocolmanager.cpp:306
static QString protocolForArchiveMimetype(const QString &mimeType)
Returns which protocol handles this mimetype, if it's an archive mimetype.
Definition: kprotocolmanager.cpp:1178
QString protocol() const
Definition: kprotocolmanager.h:199
static bool supportsMakeDir(const KUrl &url)
Returns whether the protocol can create directories/folders.
Definition: kprotocolmanager.cpp:1068
static QStringList listing(const KUrl &url)
Returns the list of fields this protocol returns when listing The current possibilities are Name...
Definition: kprotocolmanager.cpp:1041
static KMimeTypeTrader * self()
static QString defaultMimetype(const KUrl &url)
Returns default mimetype for this URL based on the protocol.
Definition: kprotocolmanager.cpp:1169
static QString proxiedBy(const QString &protocol)
QString language() const
static QString protocolClass(const QString &protocol)
static bool canCopyFromFile(const KUrl &url)
Returns whether the protocol can copy files/objects directly from the filesystem itself.
Definition: kprotocolmanager.cpp:1113
KProtocolInfo::Ptr findProtocol(const QString &protocol)
static int connectTimeout()
Returns the preferred timeout value for remote connections in seconds.
Definition: kprotocolmanager.cpp:278
unsigned int versionMinor()
static QString defaultUserAgent()
Returns the default user-agent string used for web browsing.
Definition: kprotocolmanager.cpp:631
static QString charsetFor(const KUrl &url)
Returns the charset to use for the specified url.
Definition: kprotocolmanager.cpp:1194
KIO::CacheControl parseCacheControl(const QString &cacheControl)
Parses the string representation of the cache control option.
Definition: global.cpp:1204
static QString proxyForUrl(const KUrl &url)
Returns the Proxy server address for a given URL.
Definition: kprotocolmanager.cpp:394
static bool supportsReading(const KUrl &url)
Returns whether the protocol can retrieve data from URLs.
Definition: kprotocolmanager.cpp:1050
static bool canCopyToFile(const KUrl &url)
Returns whether the protocol can copy files/objects directly to the filesystem itself.
Definition: kprotocolmanager.cpp:1123
KGuiItem ok()
unsigned int versionMajor()
static QString defaultUserAgentFromPreferredService()
Definition: kprotocolmanager.cpp:637
static bool revmatch(const char *host, const char *nplist)
Definition: kprotocolmanager.cpp:67
KLocale * locale()
KProtocolInfo::List allProtocols() const
static QString slaveProtocol(const KUrl &url, QString &proxy)
Return the protocol to use in order to handle the given url It's usually the same, except that FTP, when handled by a proxy, needs an HTTP ioslave.
Definition: kprotocolmanager.cpp:525
static QString proxyConfigScript()
Returns the URL of the script for automatic proxy configuration.
Definition: kprotocolmanager.cpp:983
QStringList languageList() const
static QString cacheDir()
The directory which contains the cache files.
Definition: kprotocolmanager.cpp:339
FileNameUsedForCopying
static ProxyType proxyType()
Returns the type of proxy configuration that is used.
Definition: kprotocolmanager.cpp:312
static int minimumKeepSize()
Returns the minimum file size for keeping aborted downloads.
Definition: kprotocolmanager.cpp:962
static bool autoResume()
Returns true if partial downloads should be automatically resumed.
Definition: kprotocolmanager.cpp:968
static bool getSystemNameVersionAndMachine(QString &systemName, QString &systemVersion, QString &machine)
Definition: kprotocolmanager.cpp:860
static QStringList getSystemProxyFor(const KUrl &url)
Definition: kprotocolmanager.cpp:404
static ProxyAuthMode proxyAuthMode()
Returns the way proxy authorization should be handled.
Definition: kprotocolmanager.cpp:318
bool hasSubUrl() const
static int proxyConnectTimeout()
Returns the preferred timeout value for proxy connections in seconds.
Definition: kprotocolmanager.cpp:285
static bool persistentConnections()
Returns true if connections should be persistent.
Definition: kprotocolmanager.cpp:973
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
static bool isSourceProtocol(const KUrl &url)
Returns whether the protocol can act as a source protocol.
Definition: kprotocolmanager.cpp:1023
static bool supportsListing(const KUrl &url)
Returns whether the protocol can list files/objects.
Definition: kprotocolmanager.cpp:1032
const QString & staticQString(const char *str)
static bool markPartial()
Returns true if partial downloads should be marked with a ".part" extension.
Definition: kprotocolmanager.cpp:957
static QString acceptLanguagesHeader()
Return Accept-Languages header built up according to user's desktop language settings.
Definition: kprotocolmanager.cpp:892
static int maxCacheAge()
Returns the maximum age in seconds cached files should be kept before they are deleted as necessary...
Definition: kprotocolmanager.cpp:344
static KIO::CacheControl cacheControl()
Returns the Cache control directive to be used.
Definition: kprotocolmanager.cpp:331
static bool supportsMoving(const KUrl &url)
Returns whether the protocol can move files/objects between different locations.
Definition: kprotocolmanager.cpp:1095
static KProtocolInfo::FileNameUsedForCopying fileNameUsedForCopying(const KUrl &url)
This setting defines the strategy to use for generating a filename, when copying a file or directory ...
Definition: kprotocolmanager.cpp:1160
static bool canRenameFromFile(const KUrl &url)
Returns whether the protocol can rename (i.e.
Definition: kprotocolmanager.cpp:1132
T readEntry(const QString &key, const T &aDefault) const
static bool supportsOpening(const KUrl &url)
Returns whether the protocol can be opened using KIO::open(const KUrl&).
Definition: kprotocolmanager.cpp:1104
static bool supportsWriting(const KUrl &url)
Returns whether the protocol can store data to URLs.
Definition: kprotocolmanager.cpp:1059
static QStringList proxiesForUrl(const KUrl &url)
Returns all the possible proxy server addresses for url.
Definition: kprotocolmanager.cpp:458
KService::Ptr preferredService(const QString &mimeType, const QString &genericServiceType=QString::fromLatin1("Application"))
bool showInKDE() const
Definition: netaccess.h:36
QString number(KIO::filesize_t size)
Converts a size to a string representation Not unlike QString::number(...)
Definition: global.cpp:63
QStringList list(const QString &fileClass)
Returns a list of directories associated with this file-class.
Definition: krecentdirs.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.