• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIOSlave

  • sources
  • kde-4.12
  • kdelibs
  • kioslave
  • http
Enumerations | Functions | Variables
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>
Include dependency graph for http_cache_cleaner.cpp:

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
Enumerator
InvalidCommand 
CreateFileNotificationCommand 
UpdateFileCommand 

Definition at line 265 of file http_cache_cleaner.cpp.

enum OperationMode
Enumerator
CleanCache 
DeleteCache 
FileInfo 

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.

static QString dateString ( qint64  date)
static

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.

static QString filePath ( const QString &  baseName)
static

Definition at line 208 of file http_cache_cleaner.cpp.

int kdemain ( int  argc,
char **  argv 
)

Definition at line 728 of file http_cache_cleaner.cpp.

uint qHash ( const CacheIndex &  ci)

Definition at line 372 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 378 of file http_cache_cleaner.cpp.

static bool readLineChecked ( QIODevice *  dev,
QByteArray *  line 
)
static

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 607 of file http_cache_cleaner.cpp.

static bool timeSizeFits ( qint64  intTime)
static

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.

qint64 g_maxCacheSize

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.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIOSlave

Skip menu "KIOSlave"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal