C and Python API + Smarter account-based wait times
This commit is contained in:
1 parent
35c568333d
commit
10badb282c
18 files changed
+2204
-429
No files matched your search
+2
-9
@@ -12,6 +12,7 @@
|
||||
#include "Database.h"
|
||||
#include "Display.h"
|
||||
#include "LineEditor.h"
|
||||
#include "Tracker.h"
|
||||
#include "Status.h"
|
||||
|
||||
// Interactive prompt: commands are typed live, one per line.
|
||||
@@ -39,8 +40,6 @@ private:
|
||||
void execute(const std::string& line);
|
||||
void refresh() const;
|
||||
void say(const std::string& message);
|
||||
void setAccountWait(const std::string& account, std::time_t until);
|
||||
void noteAccountWait(const std::string& taskName);
|
||||
void flushMessages();
|
||||
bool endOfInput(); // true if the program should exit
|
||||
|
||||
@@ -48,13 +47,6 @@ private:
|
||||
// Asks until the reply is valid (y / n, and c when allowed). nullopt if input closed.
|
||||
std::optional<Answer> ask(const std::string& question, bool allowCancel) const;
|
||||
|
||||
// Helpers
|
||||
static void requireName(const std::string& name);
|
||||
static Status parseStatusFrom(const Args& args, std::size_t from);
|
||||
static bool isBareWait(const Args& args, std::size_t from);
|
||||
std::optional<std::time_t> runningWait(const std::string& account) const;
|
||||
void makeTaskFollowAccount(const TaskRow& task);
|
||||
|
||||
// Account commands
|
||||
bool cmdAccAdd(const Args& args);
|
||||
bool cmdAccDel(const Args& args);
|
||||
@@ -92,6 +84,7 @@ private:
|
||||
Database& db_;
|
||||
Display& display_;
|
||||
Config& config_;
|
||||
Tracker tracker_;
|
||||
std::vector<Command> commands_;
|
||||
std::vector<CommandSpec> specs_;
|
||||
Completer completer_;
|
||||
|
||||
Reference in new issue
Block a user