The ITP/Server COM library supports a number of events, which can be used by the calling application (or script) to control the behavior of the Submit API. Implementation of these event handlers is optional.
(OLE datatypes are shown between brackets.)
Function |
Parameters |
Progress |
String (BSTR) |
The Progress event is called whenever the ITP/Server script calls the command Progress.
The content of the progress message is passed as the parameter.
Function |
Parameters |
VerifyReceive |
String(BSTR) |
The VerifyRecieve event is called whenever the ITP/Server script attempts to exchange a file with the client using the command ReceiveFile. This event is called to validate whether or not the calling application allows the request to be executed by the COM library.
The parameter to this event is the suggested filename from the script.
The return value of the VerifyReceive event will be set with RespondVerifyReceive method.
If this event is not handled, the COM library will allow all file transfers (if they are enabled by setting the SendFile or ReceiveFile properties to True).
Function |
Parameters |
VerifySend |
String(BSTR) |
The VerifySend event is called whenever the ITP/Server script attempts to exchange a file with the client using the command SendFile. This event is called to validate whether or not the calling application allows the request to be executed by the COM library.
The parameter to this event is the suggested filename from the script.
The return value of the VerifySend event will be set with RespondVerifySend method.
If this event is not handled, the COM library will allow all file transfers (if they are enabled by setting the SendFile or ReceiveFile properties to True).
Function |
Parameters |
ExchangeData |
String(BSTR), String (BSTR) |
The ExchangeData event is called whenever the ITP/Server script attempts to exchange data with the client using the function exchange_data. This event is used to allow the calling application to process the data.
The first parameter to this event is the k parameter of the function exchange_data, and the second parameter is the v parameter.
The return value of the ExchangeData event will be set with RespondExchangeData method.
If this event is not handled, the COM library will send an empty response back to the ITP/Server server.