More refactoring in prep for a real design.
This commit is contained in:
parent
b9e9119832
commit
e35536c7e3
10 changed files with 229 additions and 186 deletions
20
watcher.hpp
Normal file
20
watcher.hpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
#include <efsw/efsw.hpp>
|
||||
#include <git2.h>
|
||||
#include <string> // for operator+, to_string
|
||||
|
||||
class UpdateListener : public efsw::FileWatchListener {
|
||||
public:
|
||||
bool changes = false;
|
||||
git_repository* repo = nullptr;
|
||||
|
||||
UpdateListener(git_repository *r) : repo(r) {};
|
||||
|
||||
void handleFileAction(efsw::WatchID watchid,
|
||||
const std::string& dir,
|
||||
const std::string& filename,
|
||||
efsw::Action action,
|
||||
std::string oldFilename) override;
|
||||
|
||||
void reset_state();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue