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
void clear()
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
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
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
QString user() const
static void badProxy(const QString &proxy)
Marks this proxy as bad (down).
Definition: kprotocolmanager.cpp:513
void setPort(int port)
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
quint16 port() const
bool hasHost() const
QPair< QHostAddress, int > parseSubnet(const QString &subnet)
#define K_GLOBAL_STATIC(TYPE, NAME)
Definition: netaccess.h:36
static int maxCacheSize()
Returns the maximum size that can be used for caching.
Definition: kprotocolmanager.cpp:349
QString host() const
void removeAt(int i)
KStandardDirs * dirs()
bool contains(const QString &str, Qt::CaseSensitivity cs) const
QString simplified() const
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
QString join(const QString &separator) const
QString & remove(int position, int n)
int port() const
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void chop(int n)
bool isEmpty() const
static bool canRenameToFile(const KUrl &url)
Returns whether the protocol can rename (i.e.
Definition: kprotocolmanager.cpp:1142
QDBusMessage call(const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
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
bool supportsSsl()
KSharedConfigPtr config()
unsigned int versionRelease()
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
void clear()
void setUser(const QString &user)
QString hostName() const
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)
QString number(int n, int base)
int count(const T &value) const
QString fromLocal8Bit(const char *str, int size)
QString applicationVersion()
QString & insert(int position, QChar ch)
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
QNetworkProxy::ProxyType type() const
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
int toInt(bool *ok, int base) const
bool isEmpty() const
Definition: kprotocolmanager.h:199
bool isEmpty() const
QString trimmed() const
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
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
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)
T & first()
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
QString scheme() const
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
QString right(int n) const
KIO::CacheControl parseCacheControl(const QString &cacheControl)
Parses the string representation of the cache control option.
Definition: global.cpp:1204
iterator end()
QString toLower() const
QByteArray toLocal8Bit() const
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
bool contains(QChar ch, Qt::CaseSensitivity cs) const
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
QString & replace(int position, int n, QChar after)
static QString proxyConfigScript()
Returns the URL of the script for automatic proxy configuration.
Definition: kprotocolmanager.cpp:983
QStringList languageList() const
bool isValid() const
QByteArray toLatin1() const
static QString cacheDir()
The directory which contains the cache files.
Definition: kprotocolmanager.cpp:339
QString mid(int position, int n) const
QList< QHostAddress > addresses() const
FileNameUsedForCopying
static ProxyType proxyType()
Returns the type of proxy configuration that is used.
Definition: kprotocolmanager.cpp:312
void insert(int i, const T &value)
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
QList< QNetworkProxy > systemProxyForQuery(const QNetworkProxyQuery &query)
T & last()
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
int length() const
static int proxyConnectTimeout()
Returns the preferred timeout value for proxy connections in seconds.
Definition: kprotocolmanager.cpp:285
QString left(int n) const
QString fromLatin1(const char *str, int size)
int indexOf(const QRegExp &rx, int from) const
static bool persistentConnections()
Returns true if connections should be persistent.
Definition: kprotocolmanager.cpp:973
void setHost(const QString &host)
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
QDBusPendingCall asyncCall(const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
int compare(const QString &other) const
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
iterator begin()
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"))
QString applicationName()
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.