mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Hooks
- Added ::initialize method.
This commit is contained in:
parent
bfb19e0a64
commit
6cff8d9ff6
3 changed files with 9 additions and 5 deletions
|
@ -221,12 +221,8 @@ int Context::initialize (int argc, const char** argv)
|
|||
// Initialize the database.
|
||||
tdb2.set_location (data_dir);
|
||||
|
||||
/*
|
||||
// Hook system init, plus post-start event occurring at the first possible
|
||||
// moment after hook initialization.
|
||||
// First opportunity to run a hook script.
|
||||
hooks.initialize ();
|
||||
hooks.trigger ("on-launch");
|
||||
*/
|
||||
}
|
||||
|
||||
catch (const std::string& message)
|
||||
|
|
|
@ -40,5 +40,11 @@ Hooks::~Hooks ()
|
|||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Hooks::initialize ()
|
||||
{
|
||||
// TODO Scan <rc.data.location>/hooks
|
||||
}
|
||||
|
||||
// TODO Time the hook runs.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -35,6 +35,8 @@ public:
|
|||
Hooks (const Hooks&); // Deliberately unimplemented
|
||||
Hooks& operator= (const Hooks&); // Deliberately unimplemented
|
||||
|
||||
void initialize ();
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue