mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Cleanup of plugin component API.
- Move more functionality into base class. - Remove cctors and assignment operators (weren't actually needed anymore) - Switch from const char* to std::string.
This commit is contained in:
parent
e9413c9361
commit
987452beff
18 changed files with 114 additions and 216 deletions
|
@ -351,7 +351,7 @@ void Manager::GetFileHandle(analyzer::Tag tag, Connection* c, bool is_orig)
|
|||
return;
|
||||
|
||||
DBG_LOG(DBG_FILE_ANALYSIS, "Raise get_file_handle() for protocol analyzer %s",
|
||||
analyzer_mgr->GetComponentName(tag));
|
||||
analyzer_mgr->GetComponentName(tag).c_str());
|
||||
|
||||
EnumVal* tagval = tag.AsEnumVal();
|
||||
Ref(tagval);
|
||||
|
@ -398,12 +398,12 @@ Analyzer* Manager::InstantiateAnalyzer(Tag tag, RecordVal* args, File* f) const
|
|||
if ( ! c->Factory() )
|
||||
{
|
||||
reporter->InternalWarning("file analyzer %s cannot be instantiated "
|
||||
"dynamically", c->CanonicalName());
|
||||
"dynamically", c->CanonicalName().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
DBG_LOG(DBG_FILE_ANALYSIS, "Instantiate analyzer %s for file %s",
|
||||
GetComponentName(tag), f->id.c_str());
|
||||
GetComponentName(tag).c_str(), f->id.c_str());
|
||||
|
||||
Analyzer* a = c->Factory()(args, f);
|
||||
|
||||
|
@ -445,7 +445,7 @@ bool Manager::RegisterAnalyzerForMIMEType(Tag tag, const string& mtype)
|
|||
TagSet* l = LookupMIMEType(mtype, true);
|
||||
|
||||
DBG_LOG(DBG_FILE_ANALYSIS, "Register analyzer %s for MIME type %s",
|
||||
GetComponentName(tag), mtype.c_str());
|
||||
GetComponentName(tag).c_str(), mtype.c_str());
|
||||
|
||||
l->insert(tag);
|
||||
return true;
|
||||
|
@ -466,7 +466,7 @@ bool Manager::UnregisterAnalyzerForMIMEType(Tag tag, const string& mtype)
|
|||
TagSet* l = LookupMIMEType(mtype, true);
|
||||
|
||||
DBG_LOG(DBG_FILE_ANALYSIS, "Unregister analyzer %s for MIME type %s",
|
||||
GetComponentName(tag), mtype.c_str());
|
||||
GetComponentName(tag).c_str(), mtype.c_str());
|
||||
|
||||
l->erase(tag);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue