kio Library API Documentation

kprotocolmanager.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 1999 Torben Weis <weis@kde.org> 00003 Copyright (C) 2000- Waldo Bastain <bastain@kde.org> 00004 Copyright (C) 2000- Dawit Alemayehu <adawit@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License version 2 as published by the Free Software Foundation. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 00019 */ 00020 #ifndef __kprotocolmanager_h__ 00021 #define __kprotocolmanager_h__ 00022 00023 #include <qstringlist.h> 00024 00025 #include <kapplication.h> 00026 #include <kio/global.h> 00027 00029 #define DEFAULT_USERAGENT_STRING "" 00030 00031 class KConfig; 00032 00054 class KIO_EXPORT KProtocolManager 00055 { 00056 public: 00057 00058 00059 /*=========================== USER-AGENT SETTINGS ===========================*/ 00060 00061 00067 static QString defaultUserAgent(); 00068 00080 static QString defaultUserAgent(const QString &keys); 00081 00093 static QString userAgentForHost( const QString &hostname ); 00094 00095 00096 /*=========================== TIMEOUT CONFIG ================================*/ 00097 00098 00105 static int readTimeout(); 00106 00113 static int connectTimeout(); 00114 00121 static int proxyConnectTimeout(); 00122 00129 static int responseTimeout(); 00130 00131 00132 /*=============================== PROXY CONFIG ==============================*/ 00133 00134 00140 static bool useProxy(); 00141 00147 static bool useReverseProxy(); 00148 00157 enum ProxyType 00158 { 00159 NoProxy, 00160 ManualProxy, 00161 PACProxy, 00162 WPADProxy, 00163 EnvVarProxy 00164 }; 00165 00170 static ProxyType proxyType(); 00171 00178 enum ProxyAuthMode 00179 { 00180 Prompt, 00181 Automatic 00182 }; 00183 00190 static ProxyAuthMode proxyAuthMode(); 00191 00198 static QString noProxyFor(); 00199 00208 static QString proxyFor( const QString& protocol ); 00209 00222 static QString proxyForURL( const KURL& url ); 00223 00229 static void badProxy( const QString & proxy ); 00230 00235 static QString proxyConfigScript(); 00236 00237 00238 /*========================== CACHE CONFIG ===================================*/ 00239 00240 00247 static bool useCache(); 00248 00255 static int maxCacheAge(); 00256 00267 static int maxCacheSize(); // Maximum cache size in Kb. 00268 00273 static QString cacheDir(); 00274 00279 static KIO::CacheControl cacheControl(); 00280 00281 00282 /*============================ DOWNLOAD CONFIG ==============================*/ 00283 00289 static bool autoResume(); 00290 00296 static bool markPartial(); 00297 00308 static int minimumKeepSize(); 00309 00310 00311 /*============================ NETWORK CONNECTIONS ==========================*/ 00317 static bool persistentProxyConnection(); 00318 00323 static bool persistentConnections(); 00324 00325 /*=============================== OTHERS ====================================*/ 00326 00327 00332 static void reparseConfiguration(); 00333 00344 static QString slaveProtocol(const KURL &url, QString &proxy); 00345 00350 static KConfig *config(); 00351 private: 00352 static KConfig *http_config(); 00353 }; 00354 #endif
KDE Logo
This file is part of the documentation for kio Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 14 00:20:28 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003