10 #ifndef __BRP_BALTECH_API_CMDS_FTOB_H__    11 #define __BRP_BALTECH_API_CMDS_FTOB_H__    12 #include "../typedefs.h"    16 #define BRP_Ftob_ErrInvalidFilename BRP_ERR_STATUS(0x0300, 0x01)    20 #define BRP_Ftob_ErrFileAccessDenied BRP_ERR_STATUS(0x0300, 0x02)    24 #define BRP_Ftob_ErrWriteBlock BRP_ERR_STATUS(0x0300, 0x03)    28 #define BRP_Ftob_ErrReadBlock BRP_ERR_STATUS(0x0300, 0x04)    32 #define BRP_Ftob_ErrNoFileActive BRP_ERR_STATUS(0x0300, 0x05)    36 #define BRP_Ftob_ErrOutOfMemory BRP_ERR_STATUS(0x0300, 0x06)    40 #define BRP_Ftob_ErrBroken BRP_ERR_STATUS(0x0300, 0x07) unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions. 
 
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol. 
 
struct brp_mempool_object_t * brp_mempool
mempool handle. 
 
brp_errcode brp_Ftob_OpenWriteFile(brp_protocol protocol, brp_buf Filename, size_t Filename_len, unsigned *MaxBlockLen)
This commands starts writing a file to the reader. 
 
brp_errcode brp_Ftob_ReadFileBlock(brp_protocol protocol, bool ToggleBit, unsigned MaxBlockLength, brp_buf *BlockData, size_t *BlockData_len, brp_mempool *mempool)
Use this command to receive a file block by block. 
 
brp_errcode brp_Ftob_WriteFileBlock(brp_protocol protocol, bool ToggleBit, brp_buf BlockData, size_t BlockData_len)
This command writes a file block by block. 
 
brp_errcode brp_Ftob_CloseFile(brp_protocol protocol, bool Success)
This commands quits transferring a file. 
 
unsigned char * brp_buf
represents a pointer to a protocol data buffer. 
 
brp_errcode brp_Ftob_OpenReadFile(brp_protocol protocol, brp_buf Filename, size_t Filename_len)
This commands starts reading a file from the reader.