#ifndef SMTP_CLIENT_COMMAND
#define SMTP_CLIENT_COMMAND
struct smtp_reply;
struct smtp_params_mail;
struct smtp_params_rcpt;
struct smtp_client_command;
struct smtp_client_connection;
enum smtp_client_command_state {
};
enum smtp_client_command_flags {
/* The command is sent to server before login (or is the login
command itself). Non-prelogin commands will be queued until login
is successful. */
/* This command may be positioned anywhere in a PIPELINING group. */
/* This command has priority and needs to be inserted before anything
else. This is e.g. used to make sure that the initial handshake
commands are sent before any other command that may already be
submitted to the connection. */
};
/* Called when reply is received for command. */
void *context);
struct smtp_client_command *
CALLBACK_TYPECHECK(callback, void (*)( \
/* Create a plug command, which is a dummy command that blocks the send queue.
This is used by transactions to prevent subsequently submitted
transactions from messing up the command sequence while the present
transaction is still submitting commands. The plug command is aborted once
the send queue is to be released. */
struct smtp_client_command *
struct smtp_client_command *after);
const char *name);
/* Lock the command; no commands after this one will be sent until this one
finishes */
enum smtp_client_command_flags flags);
const char *cmd_str);
struct smtp_client_command *after);
unsigned int replies);
/*
* Standard commands
*/
/* send NOOP */
struct smtp_client_command *
struct smtp_client_connection *conn,
struct smtp_client_command *after,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
struct smtp_client_command *
struct smtp_client_connection *conn,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
/* send VRFY <param> */
struct smtp_client_command *
struct smtp_client_connection *conn,
struct smtp_client_command *after,
const char *param,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
struct smtp_client_command *
struct smtp_client_connection *conn,
const char *param,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
/* send RSET */
struct smtp_client_command *
struct smtp_client_connection *conn,
struct smtp_client_command *after,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
struct smtp_client_command *
struct smtp_client_connection *conn,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
/* send MAIL FROM:<address> <params...> */
struct smtp_client_command *
struct smtp_client_connection *conn,
struct smtp_client_command *after,
const struct smtp_address *from,
const struct smtp_params_mail *params,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
struct smtp_client_command *
struct smtp_client_connection *conn,
const struct smtp_address *from,
const struct smtp_params_mail *params,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
/* send RCPT TO:<address> parameters */
struct smtp_client_command *
struct smtp_client_connection *conn,
struct smtp_client_command *after,
const struct smtp_address *to,
const struct smtp_params_rcpt *params,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
struct smtp_client_command *
struct smtp_client_connection *conn,
const struct smtp_address *to,
const struct smtp_params_rcpt *params,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
/* send message data using DATA or BDAT (preferred if supported)
handles DATA 354 response implicitly
*/
struct smtp_client_command *
struct smtp_client_connection *conn,
struct smtp_client_command *after,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
struct smtp_client_command *
struct smtp_client_connection *conn,
void *context);
CALLBACK_TYPECHECK(callback, void (*)( \
#endif