Add new function flavor called a "hook".

This new flavor of function behaves like a "synchronous event".
See documentation for more details on usage.
This commit is contained in:
Jon Siwek 2012-11-15 13:45:13 -06:00
parent 5508a5bb80
commit e0fb9eb2b2
30 changed files with 476 additions and 79 deletions

View file

@ -327,7 +327,7 @@ bool Manager::CreateStream(EnumVal* id, RecordVal* sval)
// Make sure the event is prototyped as expected.
FuncType* etype = event->FType()->AsFuncType();
if ( ! etype->IsEvent() )
if ( etype->Flavor() != FUNC_FLAVOR_EVENT )
{
reporter->Error("stream event is a function, not an event");
return false;