Reorganizing file analysis source code.

This commit is contained in:
Jon Siwek 2013-02-14 16:07:42 -06:00
parent f04d189d3f
commit f8af42cf9a
14 changed files with 675 additions and 603 deletions

View file

@ -0,0 +1,33 @@
#ifndef FILE_ANALYSIS_INFOTIMER_H
#define FILE_ANALYSIS_INFOTIMER_H
#include "Timer.h"
#include <string>
namespace file_analysis {
/**
* Timer to periodically check if file analysis for a given file is inactive.
*/
class InfoTimer : public Timer {
public:
InfoTimer(double t, const string& id, double interval)
: Timer(t + interval, TIMER_FILE_ANALYSIS_INACTIVITY), file_id(id) {}
~InfoTimer() {}
/**
* Check inactivity of file_analysis::Info corresponding to #file_id,
* reschedule if active, else call file_analysis::Manager::Timeout.
*/
void Dispatch(double t, int is_expire);
protected:
string file_id;
};
} // namespace file_analysis
#endif