1#ifndef SRC_SCANNER_LIB_SCANNER_H_
2#define SRC_SCANNER_LIB_SCANNER_H_
32 std::size_t num_threads);
54 std::promise<void>& producer_promise);
Defines the contract for a component that can hash a file's content.
Definition interfaces.h:18
Defines the contract for a database of malicious signatures.
Definition interfaces.h:35
Defines the contract for a component that logs malicious detections.
Definition interfaces.h:64
Defines the primary contract for the file scanning engine.
Definition interfaces.h:83
The concrete, internal implementation of the IScanner interface.
Definition scanner.h:22
std::atomic< std::uint64_t > errors_
Definition scanner.h:74
std::atomic< std::uint64_t > malicious_files_detected_
Definition scanner.h:73
void ProducerTask(const std::filesystem::path &scan_path, ThreadPool &pool, std::promise< void > &producer_promise)
The task executed by the producer thread.
Definition scanner.cpp:36
std::size_t num_threads_
Definition scanner.h:70
ILogger & logger_
Definition scanner.h:68
void ConsumerTask(const std::filesystem::path &path)
The task executed by consumer threads in the pool.
Definition scanner.cpp:20
IHashDatabase & db_
Definition scanner.h:67
std::atomic< std::uint64_t > total_files_processed_
Definition scanner.h:72
IFileHasher & hasher_
Definition scanner.h:69
ScanResult Scan(const std::filesystem::path &scan_path) override
Scans the specified directory.
Definition scanner.cpp:60
Manages a pool of worker threads to execute tasks concurrently.
Definition thread_pool.h:26
Holds the final statistics of a completed scan operation.
Definition domain.h:18