http_cache_cleaner.cpp File Reference
#include <cstring>#include <time.h>#include <stdlib.h>#include <zlib.h>#include <QtCore/QDir>#include <QtCore/QString>#include <QtCore/QTime>#include <QtDBus/QtDBus>#include <QtNetwork/QLocalServer>#include <QtNetwork/QLocalSocket>#include <kcmdlineargs.h>#include <kcomponentdata.h>#include <kdatetime.h>#include <kdebug.h>#include <kglobal.h>#include <klocale.h>#include <kprotocolmanager.h>#include <kstandarddirs.h>#include <unistd.h>
Go to the source code of this file.
Enumerations | |
| enum | CacheCleanerCommand { InvalidCommand = 0, CreateFileNotificationCommand, UpdateFileCommand } |
| enum | OperationMode { CleanCache = 0, DeleteCache, FileInfo } |
Functions | |
| bool | CacheFileInfoPtrLessThan (const CacheFileInfo *cf1, const CacheFileInfo *cf2) |
| static QString | dateString (qint64 date) |
| static QString | filenameFromUrl (const QByteArray &url) |
| static QString | filePath (const QString &baseName) |
| int | kdemain (int argc, char **argv) |
| uint | qHash (const CacheIndex &ci) |
| static bool | readBinaryHeader (const QByteArray &d, CacheFileInfo *fi) |
| static bool | readCacheFile (const QString &baseName, CacheFileInfo *fi, OperationMode mode) |
| static CacheCleanerCommand | readCommand (const QByteArray &cmd, CacheFileInfo *fi) |
| static bool | readLineChecked (QIODevice *dev, QByteArray *line) |
| static bool | readTextHeader (QFile *file, CacheFileInfo *fi, OperationMode mode) |
| static void | removeOldFiles () |
| static bool | timeSizeFits (qint64 intTime) |
Variables | |
| static const char | appFullName [] = "org.kde.kio_http_cache_cleaner" |
| static const char | appName [] = "kio_http_cache_cleaner" |
| time_t | g_currentDate |
| int | g_maxCacheAge |
| qint64 | g_maxCacheSize |
| static const int | s_hashedUrlBits = 160 |
| static const int | s_hashedUrlBytes = s_hashedUrlBits / 8 |
| static const int | s_hashedUrlNibbles = s_hashedUrlBits / 4 |
| static const char | version [] = "A\n" |
Enumeration Type Documentation
| enum CacheCleanerCommand |
Definition at line 265 of file http_cache_cleaner.cpp.
| enum OperationMode |
Definition at line 158 of file http_cache_cleaner.cpp.
Function Documentation
| bool CacheFileInfoPtrLessThan | ( | const CacheFileInfo * | cf1, |
| const CacheFileInfo * | cf2 | ||
| ) |
Definition at line 153 of file http_cache_cleaner.cpp.
Definition at line 87 of file http_cache_cleaner.cpp.
| static QString filenameFromUrl | ( | const QByteArray & | url | ) | [static] |
Definition at line 201 of file http_cache_cleaner.cpp.
Definition at line 208 of file http_cache_cleaner.cpp.
| int kdemain | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 725 of file http_cache_cleaner.cpp.
| uint qHash | ( | const CacheIndex & | ci | ) |
Definition at line 373 of file http_cache_cleaner.cpp.
| static bool readBinaryHeader | ( | const QByteArray & | d, |
| CacheFileInfo * | fi | ||
| ) | [static] |
Definition at line 171 of file http_cache_cleaner.cpp.
| static bool readCacheFile | ( | const QString & | baseName, |
| CacheFileInfo * | fi, | ||
| OperationMode | mode | ||
| ) | [static] |
Definition at line 271 of file http_cache_cleaner.cpp.
| static CacheCleanerCommand readCommand | ( | const QByteArray & | cmd, |
| CacheFileInfo * | fi | ||
| ) | [static] |
Definition at line 379 of file http_cache_cleaner.cpp.
Definition at line 217 of file http_cache_cleaner.cpp.
| static bool readTextHeader | ( | QFile * | file, |
| CacheFileInfo * | fi, | ||
| OperationMode | mode | ||
| ) | [static] |
Definition at line 229 of file http_cache_cleaner.cpp.
| static void removeOldFiles | ( | ) | [static] |
Definition at line 604 of file http_cache_cleaner.cpp.
Definition at line 164 of file http_cache_cleaner.cpp.
Variable Documentation
const char appFullName[] = "org.kde.kio_http_cache_cleaner" [static] |
Definition at line 55 of file http_cache_cleaner.cpp.
const char appName[] = "kio_http_cache_cleaner" [static] |
Definition at line 56 of file http_cache_cleaner.cpp.
| time_t g_currentDate |
Definition at line 51 of file http_cache_cleaner.cpp.
| int g_maxCacheAge |
Definition at line 52 of file http_cache_cleaner.cpp.
Definition at line 53 of file http_cache_cleaner.cpp.
const int s_hashedUrlBits = 160 [static] |
Definition at line 61 of file http_cache_cleaner.cpp.
const int s_hashedUrlBytes = s_hashedUrlBits / 8 [static] |
Definition at line 63 of file http_cache_cleaner.cpp.
const int s_hashedUrlNibbles = s_hashedUrlBits / 4 [static] |
Definition at line 62 of file http_cache_cleaner.cpp.
const char version[] = "A\n" [static] |
Definition at line 65 of file http_cache_cleaner.cpp.
KDE 4.6 API Reference