mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Hooks
- Gutted the Hooks object. - Commented out on-launch and on-exit triggers.
This commit is contained in:
parent
7f3e42e4e1
commit
bfb19e0a64
3 changed files with 5 additions and 170 deletions
32
src/Hooks.h
32
src/Hooks.h
|
@ -27,25 +27,6 @@
|
|||
#ifndef INCLUDED_HOOKS
|
||||
#define INCLUDED_HOOKS
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
// Hook class representing a single hook, which is just a three-way map.
|
||||
class Hook
|
||||
{
|
||||
public:
|
||||
Hook ();
|
||||
Hook (const std::string&, const std::string&, const std::string&);
|
||||
Hook (const Hook&);
|
||||
Hook& operator= (const Hook&);
|
||||
|
||||
public:
|
||||
std::string _event;
|
||||
std::string _file;
|
||||
std::string _function;
|
||||
};
|
||||
|
||||
// Hooks class for managing the loading and calling of hook functions.
|
||||
class Hooks
|
||||
{
|
||||
public:
|
||||
|
@ -54,20 +35,7 @@ public:
|
|||
Hooks (const Hooks&); // Deliberately unimplemented
|
||||
Hooks& operator= (const Hooks&); // Deliberately unimplemented
|
||||
|
||||
void initialize ();
|
||||
|
||||
bool trigger (const std::string&); // Program
|
||||
bool trigger (const std::string&, Task&); // Task
|
||||
|
||||
private:
|
||||
bool validProgramEvent (const std::string&);
|
||||
bool validTaskEvent (const std::string&);
|
||||
|
||||
private:
|
||||
std::vector <Hook> _all; // All current hooks.
|
||||
|
||||
std::vector <std::string> _validProgramEvents;
|
||||
std::vector <std::string> _validTaskEvents;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue