tdeio/tdeio
tdeprotocolmanager.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __kprotocolmanager_h__
00021 #define __kprotocolmanager_h__
00022
00023 #include <tqstringlist.h>
00024
00025 #include <tdeapplication.h>
00026 #include <tdeio/global.h>
00027
00029 #define DEFAULT_USERAGENT_STRING ""
00030
00031 class TDEConfig;
00032
00054 class TDEIO_EXPORT KProtocolManager
00055 {
00056 public:
00057
00058
00059
00060
00061
00067 static TQString defaultUserAgent();
00068
00080 static TQString defaultUserAgent(const TQString &keys);
00081
00093 static TQString userAgentForHost( const TQString &hostname );
00094
00095
00096
00097
00098
00105 static int readTimeout();
00106
00113 static int connectTimeout();
00114
00121 static int proxyConnectTimeout();
00122
00129 static int responseTimeout();
00130
00131
00132
00133
00134
00140 static bool useProxy();
00141
00156 static bool useReverseProxy();
00157
00166 enum ProxyType
00167 {
00168 NoProxy,
00169 ManualProxy,
00170 PACProxy,
00171 WPADProxy,
00172 EnvVarProxy
00173 };
00174
00180 static ProxyType proxyType();
00181
00194 enum ProxyAuthMode
00195 {
00196 Prompt,
00197 Automatic
00198 };
00199
00205 static ProxyAuthMode proxyAuthMode();
00206
00216 static TQString noProxyFor();
00217
00226 static TQString noProxyForRaw();
00227
00239 static TQString proxyFor( const TQString& protocol );
00240
00257 static TQString proxyForURL( const KURL& url );
00258
00264 static void badProxy( const TQString & proxy );
00265
00270 static TQString proxyConfigScript();
00271
00272
00273
00274
00275
00282 static bool useCache();
00283
00290 static int maxCacheAge();
00291
00302 static int maxCacheSize();
00303
00308 static TQString cacheDir();
00309
00314 static TDEIO::CacheControl cacheControl();
00315
00316
00317
00318
00324 static bool autoResume();
00325
00331 static bool markPartial();
00332
00343 static int minimumKeepSize();
00344
00345
00346
00352 static bool persistentProxyConnection();
00353
00358 static bool persistentConnections();
00359
00360
00361
00362
00367 static void reparseConfiguration();
00368
00379 static TQString slaveProtocol(const KURL &url, TQString &proxy);
00380
00385 static TDEConfig *config();
00386 private:
00387 static TDEConfig *http_config();
00388 };
00389 #endif