mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +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.
|
// Initialize the database.
|
||||||
tdb2.set_location (data_dir);
|
tdb2.set_location (data_dir);
|
||||||
|
|
||||||
/*
|
// First opportunity to run a hook script.
|
||||||
// Hook system init, plus post-start event occurring at the first possible
|
|
||||||
// moment after hook initialization.
|
|
||||||
hooks.initialize ();
|
hooks.initialize ();
|
||||||
hooks.trigger ("on-launch");
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (const std::string& message)
|
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.
|
// TODO Time the hook runs.
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -35,6 +35,8 @@ public:
|
||||||
Hooks (const Hooks&); // Deliberately unimplemented
|
Hooks (const Hooks&); // Deliberately unimplemented
|
||||||
Hooks& operator= (const Hooks&); // Deliberately unimplemented
|
Hooks& operator= (const Hooks&); // Deliberately unimplemented
|
||||||
|
|
||||||
|
void initialize ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue