mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
Adapting plugin tests to use the new split Plugin.{h,cc} structure
that init-plugin now generates. Also adding new test that makes sure the the skeleton created by init-plugin compiles on its own withoyt any further changes.
This commit is contained in:
parent
2a49932911
commit
ca1b882761
7 changed files with 98 additions and 82 deletions
31
testing/btest/plugins/hooks-plugin/src/Plugin.h
Normal file
31
testing/btest/plugins/hooks-plugin/src/Plugin.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
|
||||
#ifndef BRO_PLUGIN_Demo_Hooks
|
||||
#define BRO_PLUGIN_Demo_Hooks
|
||||
|
||||
#include <plugin/Plugin.h>
|
||||
|
||||
namespace plugin {
|
||||
namespace Demo_Hooks {
|
||||
|
||||
class Plugin : public ::plugin::Plugin
|
||||
{
|
||||
protected:
|
||||
virtual int HookLoadFile(const std::string& file, const std::string& ext);
|
||||
virtual Val* HookCallFunction(const Func* func, val_list* args);
|
||||
virtual bool HookQueueEvent(Event* event);
|
||||
virtual void HookDrainEvents();
|
||||
virtual void HookUpdateNetworkTime(double network_time);
|
||||
virtual void HookBroObjDtor(void* obj);
|
||||
virtual void MetaHookPre(HookType hook, const HookArgumentList& args);
|
||||
virtual void MetaHookPost(HookType hook, const HookArgumentList& args, HookArgument result);
|
||||
|
||||
// Overridden from plugin::Plugin.
|
||||
virtual plugin::Configuration Configure();
|
||||
};
|
||||
|
||||
extern Plugin plugin;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue