Network Component
Version 7.19.0
MDK Middleware for IPv4 and IPv6 Networking
|
SMTP client functions that work with a File System. More...
Functions | |
void * | netSMTPc_fopen (const char *fname) |
Open a file for reading in SMTP client. [interface]. More... | |
void | netSMTPc_fclose (void *file) |
Close a file previously open in SMTP client. [interface]. More... | |
uint32_t | netSMTPc_fread (void *file, uint8_t *buf, uint32_t len) |
Read block of data from a file in SMTP client. [interface]. More... | |
SMTP client functions that work with a File System.
All File System Interface functions are located in SMTP_Client_FS.c, which will be automatically added to your project's Network folder. The file is preconfigured for the File System Component, so no modifications are required. If you wish to use another type of file system, you need to add a similar file to your project.
The following functions are implemented in this module:
void netSMTPc_fclose | ( | void * | file | ) |
Close a file previously open in SMTP client. [interface].
[in] | file | pointer to the file to close. |
The function netSMTPc_fclose closes the file identified by the file stream pointer.
The function interfaces to the File System Component and will be called by the Network Component automatically. If another file system will be used, refer to the reference implementation in the SMTP_Client_FS.c module.
void void * netSMTPc_fopen | ( | const char * | fname | ) |
Open a file for reading in SMTP client. [interface].
[in] | fname | name of the file to open. |
The function netSMTPc_fopen opens a file for reading.
The argument fname specifies the name of the file to open.
The function interfaces to the File System Component and will be called by the Network Component automatically. If another file system will be used, refer to the reference implementation in the SMTP_Client_FS.c module.
uint32_t netSMTPc_fread | ( | void * | file, |
uint8_t * | buf, | ||
uint32_t | len | ||
) |
Read block of data from a file in SMTP client. [interface].
[in] | file | pointer to the file to read from. |
[out] | buf | block of memory to write data to. |
[in] | len | length of data to read in bytes. |
The function netSMTPc_fread reads len bytes from the file identified by the file stream pointer in the function argument.
The argument buf is a pointer to the buffer where the function stores the data read from the file.
The function interfaces to the File System Component and will be called by the Network Component automatically. If another file system will be used, refer to the reference implementation in the SMTP_Client_FS.c module.