Callback for Processing a File (COM)
Method |
OnProcess |
Description |
This callback is fired after each Process method when a pre-defined event is found. |
Note |
Connection Points |
Function prototype
void
OnProcess
(
[out] VARIANT *OutDetail,
[out, retval] VARIANT *OutArgsArray
)
Arguments
Argument |
Description |
Data Type |
OutDetail |
The details from this event. The JSON schema depends on the callback type. See ‘‘callback types’’ for more details. |
string |
OutArgsArray |
0: CallBackType: Since OnProcess is a general callback that is fired for different events, this specifies the event type. See the callback types for details of the type. 1: Ticket: The ticket returned from the Process API. For example 974989300. 2: The final result of processing the specified file through a workflow 1 = The file was allowed. JSON equivalent is "Allowed" 2 = The file was blocked. JSON equivalent is "Blocked" 3 = The file is currently being processed. JSON equivalent is "Processing" |
Safearray of variants with the following order 0: UINT32 1: string 2: UINT32 |
Callback types
Callback Type |
Description |
Example JSON |
2 |
This callback method is invoked whenever each engine completes the scan. This callback can be used for a progress report of scanning when more than one engine is used. If engines are not used for any reason such as encrypted archive or scan request on a known file, no progress report is fired. |
Example
|
4 |
This connection point is fired whenever a scan is completed. This event is not global but specific to the client that makes this scan request. In other words, when scanning is requested by a client, other client objects will not get a callback when the scanning is completed. |
Example
|
7 |
This callback method is invoked when Process' archive handling is enabled and an archive was successfully extracted. This callback can be used to determine if a processed file is an archive. |
Example
|
8 |
This is fired after a file has been fully processed through each stage of a workflow.
FTC Details If FTC is enabled and copy/move is disabled, the converted file appears next to the original file. If FTC and copy/move are enabled, the converted file location will be reported in "post_processing.copy/move_destination" Collisions are handled by incrementing the file name: file_name.txt , file_name_1.txt , file_name_2.txt , ..
Possible Blocked Reasons
Possible Process Results
Possible Action Ran Results
*Copied and Moved will never exist together |
Example
If Post Processing is ran: Example
|
9 |
This callback is fired for AnalyzeFileType. It will be fired for a single file as well as for individual files within an archive.
For a single file it will be a fully qualified path, such as: "C:\\level1\\file.txt" For a file inside an archive it will be prefixed with \\, such as: "\\level1\\file.txt" |
Example
|