smtp-client
SMTP Client C Library
str_getdelimfd Struct Reference

#include <smtp.h>

+ Collaboration diagram for str_getdelimfd:

Data Fields

char * _buf
 
size_t _bufsz
 
size_t _buf_len
 
char * line
 
size_t line_len
 
long(* getdelimfd_read )(struct str_getdelimfd *const gdfd, void *buf, size_t count)
 
void * user_data
 
int delim
 
char pad [4]
 

Detailed Description

Data structure for read buffer and line parsing.

This assists with getting and parsing the server response lines.

Definition at line 573 of file smtp.h.

Field Documentation

◆ _buf

char* str_getdelimfd::_buf

Read buffer which may include bytes past the delimiter.

Definition at line 577 of file smtp.h.

Referenced by smtp_str_getdelimfd(), smtp_str_getdelimfd_free(), smtp_str_getdelimfd_set_line_and_buf(), and smtp_unit_test_all_str_getdelimfd().

◆ _buf_len

size_t str_getdelimfd::_buf_len

Number of actual stored bytes in the read buffer.

Definition at line 587 of file smtp.h.

Referenced by smtp_str_getdelimfd(), smtp_str_getdelimfd_free(), and smtp_str_getdelimfd_set_line_and_buf().

◆ _bufsz

size_t str_getdelimfd::_bufsz

Number of allocated bytes in the read buffer.

Definition at line 582 of file smtp.h.

Referenced by smtp_str_getdelimfd(), and smtp_str_getdelimfd_free().

◆ delim

int str_getdelimfd::delim

Character delimiter used for determining line separation.

Definition at line 620 of file smtp.h.

Referenced by smtp_open(), smtp_str_getdelimfd(), and smtp_unit_test_str_getdelimfd().

◆ getdelimfd_read

long(* str_getdelimfd::getdelimfd_read) (struct str_getdelimfd *const gdfd, void *buf, size_t count)

Function pointer to a custom read function for the smtp_str_getdelimfd interface.

This function prototype has similar semantics to the read function. The gdfd parameter allows the custom function to pull the user_data info from the str_getdelimfd struct which can contain file pointer, socket connection, etc.

Definition at line 608 of file smtp.h.

Referenced by smtp_open(), smtp_str_getdelimfd(), and smtp_unit_test_str_getdelimfd().

◆ line

char* str_getdelimfd::line

Current line containing the text up to the delimiter.

Definition at line 592 of file smtp.h.

Referenced by smtp_auth_cram_md5(), smtp_getline(), smtp_read_and_parse_code(), smtp_str_getdelimfd_free(), smtp_str_getdelimfd_set_line_and_buf(), and smtp_unit_test_str_getdelimfd().

◆ line_len

size_t str_getdelimfd::line_len

Number of stored bytes in the line buffer.

Definition at line 597 of file smtp.h.

Referenced by smtp_getline(), smtp_str_getdelimfd_free(), smtp_str_getdelimfd_set_line_and_buf(), and smtp_unit_test_str_getdelimfd().

◆ pad

char str_getdelimfd::pad[4]

Padding structure to align.

Definition at line 625 of file smtp.h.

◆ user_data

void* str_getdelimfd::user_data

User data which gets sent to the read handler function.

Definition at line 615 of file smtp.h.

Referenced by smtp_open(), smtp_str_getdelimfd_read(), smtp_unit_test_getdelimfd_fp(), and smtp_unit_test_str_getdelimfd().


The documentation for this struct was generated from the following file: