blob: 7cb97526080bf0666d556bf09a35b47d5abe9f4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/****************************************************************************
** $Id: .emacs,v 1.3 2006/02/20 15:06:53 gis Exp $
**
** Created : 2006
**
** Copyright (C) 2006 Carsten Pfeiffer <[email protected]>
**
****************************************************************************/
#ifndef FILECACHE_H
#define FILECACHE_H
#include <tqcache.h>
#include "kuickfile.h"
class KTempDir;
class FileCache
{
public:
static FileCache * self();
static void shutdown();
KuickFile * getFile( const KURL& url );
void setLimit( int numFiles );
int getLimit() const { return m_limit; }
/**
* @return the temporary directory or TQString::null if none available
*/
TQString tempDir();
private:
static FileCache *s_self;
FileCache();
~FileCache();
KTempDir * createTempDir();
TQCache<KuickFile> m_files;
int m_limit;
KTempDir *m_tempDir;
};
#endif // FILECACHE_H
|