KIO
Go to the documentation of this file.
23 #include <QtCore/QCoreApplication>
24 #include <QtCore/QPair>
25 #include <QtCore/QString>
30 #include <ksslconfig.h>
48 #define MAX_ENTRIES 32
53 typedef QList<KSSLCSession> KSSLCSessions;
55 static KSSLCSessions *sessions = 0L;
62 static void cleanupKSSLCSessions() {
68 sessions =
new KSSLCSessions;
69 qAddPostRoutine(cleanupKSSLCSessions);
76 if (!sessions)
return QString();
79 for (
int i = 0; i < sessions->size(); ++i) {
80 if (sessions->at(i).first == key) {
81 QString snd = sessions->at(i).second;
82 sessions->prepend(sessions->takeAt(i));
89 kDebug(7029) <<
"Negative caching " <<key;
90 if (sessions->count() >=
MAX_ENTRIES) sessions->removeLast();
91 sessions->prepend(
new KSSLCSession(key,
QString()));
101 if (!sessions) setup();
103 KSSLCSessions::iterator it = sessions->begin();
105 while ( it != sessions->end() ) {
106 if ( it->first == key )
111 if (it != sessions->end()) {
112 it->second = session;
115 sessions->removeLast();
116 sessions->prepend(KSSLCSession(key, session));
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 22:00:57 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.