/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file
*/
#ifndef PROGRAM_CLIENT_H
#define PROGRAM_CLIENT_H
#include "restrict-access.h"
#include "net.h"
struct program_client;
struct program_client_settings {
unsigned int client_connect_timeout_msecs;
unsigned int input_idle_timeout_msecs;
/* initialize with
restrict_access_init(&set.restrict_set);
*/
const char *dns_client_socket_path;
const char *home;
/* use o_stream_dot, which is mainly useful to make sure that an
unexpectedly closed connection doesn't cause the partial input to
be accepted as valid and complete program input. This is always
enabled for 'net' program clients, which may likely encounter
unexpected connection termination. */
};
typedef void program_client_callback_t(int, void *);
const char *const *args,
const struct program_client_settings *set);
const char *const *args,
const char *const *args,
struct program_client *
const struct program_client_settings *set,
bool noreply);
const struct program_client_settings *set,
const char **error_r);
const char *temp_prefix);
/* Program provides side-channel output through an extra fd */
/* Since script service cannot return system exit code, the exit value shall be
-1, 0, or 1. -1 is internal error, 0 is failure and 1 is success */
program_client_callback_t *, void*);
#endif