mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
- Added all source code.
This commit is contained in:
parent
7f8fc1182d
commit
b5be083d88
27 changed files with 7842 additions and 0 deletions
47
src/TDB.h
Normal file
47
src/TDB.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright 2007, 2008, Paul Beckingham. All rights reserved.
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef INCLUDED_TDB
|
||||
#define INCLUDED_TDB
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "T.h"
|
||||
|
||||
class TDB
|
||||
{
|
||||
public:
|
||||
TDB ();
|
||||
~TDB ();
|
||||
|
||||
void dataDirectory (const std::string&);
|
||||
bool allT (std::vector <T>&) const;
|
||||
bool pendingT (std::vector <T>&) const;
|
||||
bool allPendingT (std::vector <T>&) const;
|
||||
bool completedT (std::vector <T>&) const;
|
||||
bool allCompletedT (std::vector <T>&) const;
|
||||
bool deleteT (const T&) const;
|
||||
bool completeT (const T&) const;
|
||||
bool addT (const T&) const;
|
||||
bool modifyT (const T&) const;
|
||||
bool logRead (std::vector <std::string>&) const;
|
||||
bool logCommand (int, char**) const;
|
||||
int gc () const;
|
||||
|
||||
private:
|
||||
bool lock (FILE*) const;
|
||||
bool overwritePending (std::vector <T>&) const;
|
||||
bool writePending (const T&) const;
|
||||
bool writeCompleted (const T&) const;
|
||||
bool readLockedFile (const std::string&, std::vector <std::string>&) const;
|
||||
|
||||
private:
|
||||
std::string mPendingFile;
|
||||
std::string mCompletedFile;
|
||||
std::string mLogFile;
|
||||
};
|
||||
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////
|
Loading…
Add table
Add a link
Reference in a new issue