- Added Hooks::list method to provide a list of known hooks.
This commit is contained in:
Paul Beckingham 2014-05-17 14:20:46 -04:00
parent e660f61cd2
commit 0ffc95e312
2 changed files with 8 additions and 0 deletions

View file

@ -271,6 +271,12 @@ void Hooks::onModify (const Task& before, Task& after)
context.timer_hooks.stop ();
}
////////////////////////////////////////////////////////////////////////////////
std::vector <std::string> Hooks::list ()
{
return _scripts;
}
////////////////////////////////////////////////////////////////////////////////
std::vector <std::string> Hooks::scripts (const std::string& event)
{

View file

@ -45,6 +45,8 @@ public:
void onAdd (Task&);
void onModify (const Task&, Task&);
std::vector <std::string> list ();
private:
std::vector <std::string> scripts (const std::string&);
int execute (const std::string&, const std::string&, std::string&);