Refactor how file analysis actions are tracked.

The Info record now uses a "table[ActionArgs] of ActionResults", which
allows for simultaneous actions of a given type as long as other args
(fields in the ActionArgs record) are different.
This commit is contained in:
Jon Siwek 2013-02-25 16:35:42 -06:00
parent 4b30cc2e24
commit 691622b3aa
13 changed files with 233 additions and 158 deletions

View file

@ -73,17 +73,18 @@ public:
bool PostponeTimeout(const FileID& file_id) const;
/**
* Attaches an action to the file identifier. Only one action of a given
* type can be attached per file identifier at a time.
* Attaches an action to the file identifier. Multiple actions of a given
* type can be attached per file identifier at a time as long as the
* arguments differ.
* @return true if the action was attached, else false.
*/
bool AddAction(const FileID& file_id, EnumVal* act, RecordVal* args) const;
bool AddAction(const FileID& file_id, RecordVal* args) const;
/**
* Removes an action for a given file identifier.
* @return true if the action was removed, else false.
*/
bool RemoveAction(const FileID& file_id, EnumVal* act) const;
bool RemoveAction(const FileID& file_id, const RecordVal* args) const;
/**
* Calls the \c FileAnalysis::policy hook.