diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bd9e6617827818fd043452c08c606f07b78014a0 (patch) | |
tree | 425bb4c3168f9c02f10150f235d2cb998dcc6108 /kbugbuster/backend/bugcache.h | |
download | tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbugbuster/backend/bugcache.h')
-rw-r--r-- | kbugbuster/backend/bugcache.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/kbugbuster/backend/bugcache.h b/kbugbuster/backend/bugcache.h new file mode 100644 index 00000000..af1aed11 --- /dev/null +++ b/kbugbuster/backend/bugcache.h @@ -0,0 +1,47 @@ +#ifndef BUGCACHE_H +#define BUGCACHE_H + +class KSimpleConfig; + +#include "package.h" +#include "bug.h" +#include "bugdetails.h" + +class BugCache +{ + public: + BugCache( const QString &id ); + ~BugCache(); + + void savePackageList( const Package::List &pkgs ); + Package::List loadPackageList(); + void invalidatePackageList(); + + void saveBugList( const Package &pkg, const QString &component, const Bug::List & ); + Bug::List loadBugList( const Package &pkg, const QString &component, bool disconnected ); + void invalidateBugList( const Package &pkg, const QString &component ); + + void saveBugDetails( const Bug &bug, const BugDetails & ); + BugDetails loadBugDetails( const Bug &bug ); + void invalidateBugDetails( const Bug &bug ); + bool hasBugDetails( const Bug& bug ) const; + + void clear(); + + private: + void init(); + + void writePerson( KSimpleConfig *file, const QString &key, + const Person &p ); + struct Person readPerson (KSimpleConfig *file, const QString &key ); + + QString mId; + + KSimpleConfig *m_cachePackages; + KSimpleConfig *m_cacheBugs; + + QString mCachePackagesFileName; + QString mCacheBugsFileName; +}; + +#endif |