summaryrefslogtreecommitdiffstats
path: root/src/svnqt/cache/LogCache.h
blob: 5e43b4052163a18d28e44522427285d388e25687 (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
#ifndef _LOG_CACHE_HPP
#define _LOG_CACHE_HPP

#include <tqstring.h>
#include <tqdir.h>
#include <tqmutex.h>

#include "svnqt/svnqt_defines.h"
#include "svnqt/shared_pointer.h"

namespace svn {
    namespace cache {

        class LogCacheData;

        class SVNTQT_EXPORT LogCache
        {
        private:
            svn::SharedPointer<LogCacheData> m_CacheData;

        protected:
            LogCache();
            static LogCache* mSelf;
            TQString m_BasePath;
            static TQString s_CACHE_FOLDER;
            void setupCachePath();
            void setupMainDb();

        public:
            ///! should used for testing only!
            LogCache(const TQString&aBasePath);
            virtual ~LogCache();
            static LogCache* self();
            TQDataBase reposDb(const TQString&aRepository);
            TQStringList cachedRepositories()const;

            bool valid()const;
        };
    }
}

#endif