All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Brief description of class still missing. More...
#include <HttpProxyList.h>
Signals | |
| void | ready () |
Public Member Functions | |
| const HttpProxy & | at (int index) |
| void | collect () |
| int | count () const |
| HttpProxyList (const QString &testUrl, QObject *parent=0) | |
| bool | isReady () const |
| void | printDebug (const QString &s, bool list=false) const |
| const QUrl & | testUrl () const |
| ~HttpProxyList () | |
Brief description of class still missing.
Full description of class still missing
| QGpGuiTools::HttpProxyList::HttpProxyList | ( | const QString & | testUrl, |
| QObject * | parent = 0 |
||
| ) |
testUrl is used for solving PAC scripts. It must corresponds to the expected host name of all requests to be sent to HttpAccess.
| const HttpProxy& QGpGuiTools::HttpProxyList::at | ( | int | index | ) | [inline] |
{return _proxies[index];}
| void QGpGuiTools::HttpProxyList::collect | ( | ) |
References TRACE.
Referenced by QGpGuiTools::HttpAccess::HttpAccess().
{
TRACE;
QString proxy=getenv("http_proxy");
if(proxy.isEmpty()) {
_proxies.append(HttpProxy());
} else {
_proxies.append(HttpProxy(proxy));
}
//printDebug("environment:\n", true);
// TODO: check with Google Chromium for all platforms
firefoxProxies();
//printDebug("firefox:\n", true);
#if defined Q_WS_X11
kdeProxies();
//printDebug("kde:\n", true);
#elif defined Q_WS_WIN
internetExplorerProxies();
//printDebug("ie:\n", true);
#elif defined Q_WS_MAC
macProxies();
//printDebug("mac:\n", true);
#endif
// Add other proxy sources supported directly by Qt
systemProxies();
//printDebug("system:\n", true);
if(_replies.isEmpty()) { // No script or auto
sort();
}
}
| int QGpGuiTools::HttpProxyList::count | ( | ) | const [inline] |
{return _proxies.count();}
| bool QGpGuiTools::HttpProxyList::isReady | ( | ) | const [inline] |
{return _replies.isEmpty();}
| void QGpGuiTools::HttpProxyList::printDebug | ( | const QString & | msg, |
| bool | list = false |
||
| ) | const |
For debug, prints the list of available proxies.
References TRACE.
{
TRACE;
QDir d=QDir::temp();
QFile f(d.absoluteFilePath("geopsy.org.%1.%2.proxy.debug")
.arg(CoreApplication::applicationName())
.arg(QCoreApplication::applicationPid()));
if(f.open(QIODevice::Append)) {
QTextStream s(&f);
s << msg;
if(list) {
for(QList<HttpProxy>::ConstIterator it=_proxies.begin();it!=_proxies.end();it++) {
it->printDebug(s);
}
}
}
}
| void QGpGuiTools::HttpProxyList::ready | ( | ) | [signal] |
| const QUrl& QGpGuiTools::HttpProxyList::testUrl | ( | ) | const [inline] |
{return _testUrl;}