mailstream * mailstream_ssl_open_with_callback_timeout(int fd, time_t timeout, void (* callback)(struct mailstream_ssl_context * ssl_context, void * data), void * data) { #ifdef USE_SSL mailstream_low * low; mailstream * s; low = mailstream_low_ssl_open_with_callback_timeout(fd, timeout, callback, data); if (low == NULL) goto err; s = mailstream_new(low, 8192); if (s == NULL) goto free_low; return s; free_low: mailstream_low_close(low); err: return NULL; #else return NULL; #endif }
mailstream * mailstream_cfstream_open_voip(const char * hostname, int16_t port, int voip_enabled) { #if HAVE_CFNETWORK mailstream_low * low; mailstream * s; low = mailstream_low_cfstream_open_voip(hostname, port, voip_enabled); if (low == NULL) { return NULL; } s = mailstream_new(low, 8192); return s; #else return NULL; #endif }
mailstream * mailstream_socket_open_timeout(int fd, time_t timeout) { mailstream_low * low; mailstream * s; low = mailstream_low_socket_open(fd); if (low == NULL) goto err; mailstream_low_set_timeout(low, timeout); s = mailstream_new(low, 8192); if (s == NULL) goto free_low; return s; free_low: mailstream_low_close(low); err: return NULL; }