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");
829QString KProtocolManager::userAgentForApplication( const QString &appName, const QString& appVersion,
873 // try calling GetVersionEx using the OSVERSIONINFOEX, if that fails, try using the OSVERSIONINFO
1161KProtocolInfo::FileNameUsedForCopying KProtocolManager::fileNameUsedForCopying( const KUrl &url )
1197 return KIO::SlaveConfig::self()->configData(url.scheme(), url.host(), QLatin1String("Charset"));
QString readPathEntry(const char *key, const QString &aDefault) const
QString readEntry(const char *key, const char *aDefault=0) const
NoGlobals
MetaData configData(const QString &protocol, const QString &host)
Query slave configuration for slaves of type protocol when dealing with host.
Definition: slaveconfig.cpp:187
QStringList languageList() const
QString language() const
KService::Ptr preferredService(const QString &mimeType, const QString &genericServiceType=QString::fromLatin1("Application"))
static KMimeTypeTrader * self()
static KProtocolInfoFactory * self()
KProtocolInfo::Ptr findProtocol(const QString &protocol)
KProtocolInfo::List allProtocols() const
static bool supportsDeleting(const KUrl &url)
Returns whether the protocol can delete files/objects.
Definition: kprotocolmanager.cpp:1078
static bool supportsWriting(const KUrl &url)
Returns whether the protocol can store data to URLs.
Definition: kprotocolmanager.cpp:1060
static bool useCache()
Returns true/false to indicate whether a cache should be used.
Definition: kprotocolmanager.cpp:326
static bool getSystemNameVersionAndMachine(QString &systemName, QString &systemVersion, QString &machine)
Definition: kprotocolmanager.cpp:861
static QString proxyFor(const QString &protocol)
Returns the proxy server address for a given protocol.
Definition: kprotocolmanager.cpp:374
static bool useReverseProxy()
Returns whether or not the proxy server lookup should be reversed or not.
Definition: kprotocolmanager.cpp:306
static int proxyConnectTimeout()
Returns the preferred timeout value for proxy connections in seconds.
Definition: kprotocolmanager.cpp:285
static bool canDeleteRecursive(const KUrl &url)
Returns whether the protocol can recursively delete directories by itself.
Definition: kprotocolmanager.cpp:1152
static bool supportsReading(const KUrl &url)
Returns whether the protocol can retrieve data from URLs.
Definition: kprotocolmanager.cpp:1051
static bool canCopyFromFile(const KUrl &url)
Returns whether the protocol can copy files/objects directly from the filesystem itself.
Definition: kprotocolmanager.cpp:1114
static bool supportsMakeDir(const KUrl &url)
Returns whether the protocol can create directories/folders.
Definition: kprotocolmanager.cpp:1069
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:1161
static bool canRenameToFile(const KUrl &url)
Returns whether the protocol can rename (i.e.
Definition: kprotocolmanager.cpp:1143
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:1005
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:1014
static bool supportsOpening(const KUrl &url)
Returns whether the protocol can be opened using KIO::open(const KUrl&).
Definition: kprotocolmanager.cpp:1105
static QString cacheDir()
The directory which contains the cache files.
Definition: kprotocolmanager.cpp:339
static bool supportsListing(const KUrl &url)
Returns whether the protocol can list files/objects.
Definition: kprotocolmanager.cpp:1033
static KIO::CacheControl cacheControl()
Returns the Cache control directive to be used.
Definition: kprotocolmanager.cpp:331
static bool persistentProxyConnection()
Returns true if proxy connections should be persistent.
Definition: kprotocolmanager.cpp:979
static QString proxyConfigScript()
Returns the URL of the script for automatic proxy configuration.
Definition: kprotocolmanager.cpp:984
static bool canCopyToFile(const KUrl &url)
Returns whether the protocol can copy files/objects directly to the filesystem itself.
Definition: kprotocolmanager.cpp:1124
static bool supportsLinking(const KUrl &url)
Returns whether the protocol can create links between files/objects.
Definition: kprotocolmanager.cpp:1087
static QString defaultMimetype(const KUrl &url)
Returns default mimetype for this URL based on the protocol.
Definition: kprotocolmanager.cpp:1170
static QString protocolForArchiveMimetype(const QString &mimeType)
Returns which protocol handles this mimetype, if it's an archive mimetype.
Definition: kprotocolmanager.cpp:1179
static QStringList listing(const KUrl &url)
Returns the list of fields this protocol returns when listing The current possibilities are Name,...
Definition: kprotocolmanager.cpp:1042
static void badProxy(const QString &proxy)
Marks this proxy as bad (down).
Definition: kprotocolmanager.cpp:513
static bool persistentConnections()
Returns true if connections should be persistent.
Definition: kprotocolmanager.cpp:974
static bool useProxy()
Returns whether or not the user specified the use of proxy server to make connections.
Definition: kprotocolmanager.cpp:301
static ProxyAuthMode proxyAuthMode()
Returns the way proxy authorization should be handled.
Definition: kprotocolmanager.cpp:318
static bool isSourceProtocol(const KUrl &url)
Returns whether the protocol can act as a source protocol.
Definition: kprotocolmanager.cpp:1024
static int maxCacheSize()
Returns the maximum size that can be used for caching.
Definition: kprotocolmanager.cpp:349
static bool canRenameFromFile(const KUrl &url)
Returns whether the protocol can rename (i.e.
Definition: kprotocolmanager.cpp:1133
static QString userAgentForApplication(const QString &appName, const QString &appVersion, const QStringList &extraInfo=QStringList())
Returns the application's user-agent string.
Definition: kprotocolmanager.cpp:829
static int connectTimeout()
Returns the preferred timeout value for remote connections in seconds.
Definition: kprotocolmanager.cpp:278
static bool autoResume()
Returns true if partial downloads should be automatically resumed.
Definition: kprotocolmanager.cpp:969
static bool markPartial()
Returns true if partial downloads should be marked with a ".part" extension.
Definition: kprotocolmanager.cpp:958
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,...
Definition: kprotocolmanager.cpp:525
static QString acceptLanguagesHeader()
Return Accept-Languages header built up according to user's desktop language settings.
Definition: kprotocolmanager.cpp:893
static QString userAgentForHost(const QString &hostname)
Returns the user-agent string configured for the specified host.
Definition: kprotocolmanager.cpp:615
static QStringList proxiesForUrl(const KUrl &url)
Returns all the possible proxy server addresses for url.
Definition: kprotocolmanager.cpp:458
static int minimumKeepSize()
Returns the minimum file size for keeping aborted downloads.
Definition: kprotocolmanager.cpp:963
static QString proxyForUrl(const KUrl &url)
Returns the Proxy server address for a given URL.
Definition: kprotocolmanager.cpp:394
static void reparseConfiguration()
Force a reload of the general config file of io-slaves ( kioslaverc).
Definition: kprotocolmanager.cpp:232
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 int responseTimeout()
Returns the preferred response timeout value for remote connecting in seconds.
Definition: kprotocolmanager.cpp:292
static QString noProxyFor()
Returns the strings for hosts that should contacted DIRECTLY, bypassing any proxy settings.
Definition: kprotocolmanager.cpp:354
static int readTimeout()
Returns the preferred timeout value for reading from remote connections in seconds.
Definition: kprotocolmanager.cpp:271
static bool supportsMoving(const KUrl &url)
Returns whether the protocol can move files/objects between different locations.
Definition: kprotocolmanager.cpp:1096
static ProxyType proxyType()
Returns the type of proxy configuration that is used.
Definition: kprotocolmanager.cpp:312
static QString charsetFor(const KUrl &url)
Returns the charset to use for the specified url.
Definition: kprotocolmanager.cpp:1195
static QString defaultUserAgent()
Returns the default user-agent string used for web browsing.
Definition: kprotocolmanager.cpp:631
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
void setProtocol(const QString &proto)
bool hasHost() const
static List split(const KUrl &_url)
QString protocol() const
bool hasSubUrl() const
void setUser(const QString &user)
const char header[]
#define K_GLOBAL_STATIC(TYPE, NAME)
#define kDebug
KAutostart::StartPhase readEntry(const KConfigGroup &group, const char *key, const KAutostart::StartPhase &aDefault)
static QString defaultUserAgentFromPreferredService()
Definition: kprotocolmanager.cpp:637
static void extractProxyCacheKeyFromUrl(const KUrl &u, QString *key)
Definition: kprotocolmanager.cpp:536
static QString adjustProtocol(const QString &scheme)
Definition: kprotocolmanager.cpp:363
static KProtocolInfo::Ptr findProtocol(const KUrl &url)
Definition: kprotocolmanager.cpp:991
static QStringList getSystemProxyFor(const KUrl &url)
Definition: kprotocolmanager.cpp:404
static bool revmatch(const char *host, const char *nplist)
Definition: kprotocolmanager.cpp:67
const QString & staticQString(const char *str)
KStandardDirs * dirs()
KLocale * locale()
KSharedConfigPtr config()
void lookupHost(const QString &hostName, QObject *receiver, const char *member)
Definition: hostinfo.cpp:240
KIO::CacheControl parseCacheControl(const QString &cacheControl)
Parses the string representation of the cache control option.
Definition: global.cpp:1204
group
KGuiItem ok()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.