Once you have checked a file, group of files or a memory region with one of the checking functions, you obviously want to know if viruses were found in them. For this, use the following function.
The kav_result_get_status function retrieves a status code indicating the result of KAVDaemon's check. Possible values returned by kav_result_get_status and their meanings are as follows:
This is a special value - it means that kav_result_get_status is called in a context where no check has been previously performed.
Checked objects are clean - they contain no viruses or suspicious objects.
Checking is not complete. The most likely reason for this status is that you asked KAVDaemon to check a file that does not exist.
Corrupted or mutated viruses were found in the checked objects.
Suspicious object were found. That is, KAVDaemon is not sure they really are viruses, but they looked suspicious to it.
Viruses were found in the checked objects.
Viruses were found in the checked objects, but KAVDaemon successfully cured them.
Viruses were found in the checked files, and KAVDaemon deleted them.
Corrupted objects (such as bad archives) were found.
You can also examine the textual report that KAVDaemon generates. For this, use the following functions:
The kav_result_get_report returns the report that KAVDaemon generated as a NULL-terminated string. You should not modify this tring. The kav_result_get_report_len returns the length of the report.
When you have examined the results of the check, you can delete the results from the session context to free up the memory allocated for them. For this, use the following function:
The kav_reset function deletes the results of the previous check from the session context ctx. It is safe (although redundant) to call it more than once in the same context in a row. Note that if you call another checking function in a context, kav_reset will be called automatically to delete the old results before obtaining new ones. Also, when you dispose of the context with kav_free, kav_reset is called automatically.