C4 Engine
C4 Engine API Documentation

Player::GetFileTransferResult

Defined in:  C4Messages.h
Returns the result of the most recent file transfer from a player.
Prototype

FileTransferResult GetFileTransferResult(voidconst;

Description
The GetFileTransferResult function is normally called from within a player's completion callback function to determine whether a file transfer completed successfully. This function can return one of the following constants
kTransferOkay The file transfer succeeded.
kTransferPending A file transfer is already in progress. Each player allows only one file transfer to be pending at a time.
kTransferFileNotFound The file does not exist on the sending machine.
kTransferFileUnreadable The file could not be read on the sending machine.
kTransferFileUnwriteable The file could not be written on the receiving machine.
kTransferConnectionLost The connection was closed or timed out during the file transfer.
A file transfer is initiated by calling Player::RequestFile. When a file transfer is in progress, the GetFileTransferResult function always returns kTransferPending. Otherwise, GetFileTransferResult returns the file transfer result code corresponding to the most recent file transfer. If no file transfer has ever taken place, then the return value is undefined.
See Also

Player::RequestFile

Player::ReceivingFile