KIO
kprotocolmanager.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KPROTOCOLMANAGER_H
00022 #define KPROTOCOLMANAGER_H
00023
00024 #include <QtCore/QStringList>
00025
00026 #include <kio/global.h>
00027 #include "kprotocolinfo.h"
00028
00029 class KSharedConfig;
00030 template<class T>
00031 class KSharedPtr;
00032 typedef KSharedPtr<KSharedConfig> KSharedConfigPtr;
00033 namespace KIO
00034 {
00035 class SlaveConfigPrivate;
00036 }
00037
00059 class KIO_EXPORT KProtocolManager
00060 {
00061 public:
00062
00063
00064
00065
00066
00072 static QString defaultUserAgent();
00073
00086 static QString defaultUserAgent(const QString &keys);
00087
00102 static QString userAgentForApplication( const QString &appName, const QString& appVersion,
00103 const QStringList& extraInfo = QStringList() );
00104
00116 static QString userAgentForHost( const QString &hostname );
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130 static bool getSystemNameVersionAndMachine(
00131 QString& systemName, QString& systemVersion, QString& machine );
00132
00133
00134
00135
00136
00143 static int readTimeout();
00144
00151 static int connectTimeout();
00152
00159 static int proxyConnectTimeout();
00160
00167 static int responseTimeout();
00168
00169
00170
00171
00172
00178 static bool useProxy();
00179
00185 static bool useReverseProxy();
00186
00195 enum ProxyType
00196 {
00197 NoProxy,
00198 ManualProxy,
00199 PACProxy,
00200 WPADProxy,
00201 EnvVarProxy
00202 };
00203
00208 static ProxyType proxyType();
00209
00216 enum ProxyAuthMode
00217 {
00218 Prompt,
00219 Automatic
00220 };
00221
00228 static ProxyAuthMode proxyAuthMode();
00229
00236 static QString noProxyFor();
00237
00246 static QString proxyFor( const QString& protocol );
00247
00260 static QString proxyForUrl( const KUrl& url );
00261
00267 static void badProxy( const QString & proxy );
00268
00273 static QString proxyConfigScript();
00274
00275
00276
00277
00278
00285 static bool useCache();
00286
00293 static int maxCacheAge();
00294
00305 static int maxCacheSize();
00306
00311 static QString cacheDir();
00312
00317 static KIO::CacheControl cacheControl();
00318
00319
00320
00321
00327 static bool autoResume();
00328
00334 static bool markPartial();
00335
00346 static int minimumKeepSize();
00347
00348
00349
00354 static bool persistentProxyConnection();
00355
00360 static bool persistentConnections();
00361
00362
00363
00364
00380 static bool supportsListing( const KUrl &url );
00381
00391 static bool supportsReading( const KUrl &url );
00392
00402 static bool supportsWriting( const KUrl &url );
00403
00413 static bool supportsMakeDir( const KUrl &url );
00414
00424 static bool supportsDeleting( const KUrl &url );
00425
00435 static bool supportsLinking( const KUrl &url );
00436
00447 static bool supportsMoving( const KUrl &url );
00448
00458 static bool supportsOpening( const KUrl &url );
00459
00472 static bool canCopyFromFile( const KUrl &url );
00473
00486 static bool canCopyToFile( const KUrl &url );
00487
00500 static bool canRenameFromFile( const KUrl &url );
00501
00514 static bool canRenameToFile( const KUrl &url );
00515
00527 static bool canDeleteRecursive( const KUrl &url );
00528
00544 static KProtocolInfo::FileNameUsedForCopying fileNameUsedForCopying( const KUrl &url );
00545
00554 static QString defaultMimetype( const KUrl& url );
00555
00566 static KProtocolInfo::Type inputType( const KUrl &url );
00567
00578 static KProtocolInfo::Type outputType( const KUrl &url );
00579
00592 static QStringList listing( const KUrl &url );
00593
00594
00608 static bool isSourceProtocol( const KUrl &url );
00609
00621 static QString protocolForArchiveMimetype( const QString& mimeType );
00622
00623
00624
00625
00630 static void reparseConfiguration();
00631
00642 static QString slaveProtocol(const KUrl &url, QString &proxy);
00643
00649 static QString acceptLanguagesHeader();
00650
00651 private:
00652 friend class KIO::SlaveConfigPrivate;
00653
00658 KDE_NO_EXPORT static KSharedConfigPtr config();
00659 };
00660 #endif