2 * Copyright (C) 2000-5,2008 Brendan Cully <brendan@kublai.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 /* common SASL helper routines */
22 #define _MUTT_SASL_H_ 1
24 #include <sasl/sasl.h>
26 #include "mutt_socket.h"
28 int mutt_sasl_client_new (CONNECTION*, sasl_conn_t**);
29 sasl_callback_t* mutt_sasl_get_callbacks (ACCOUNT*);
30 int mutt_sasl_interact (sasl_interact_t*);
31 void mutt_sasl_setup_conn (CONNECTION*, sasl_conn_t*);
32 void mutt_sasl_done (void);
36 sasl_conn_t* saslconn;
37 const sasl_ssf_t* ssf;
38 const unsigned int* pbufsize;
45 /* underlying socket data */
47 int (*msasl_open) (CONNECTION* conn);
48 int (*msasl_close) (CONNECTION* conn);
49 int (*msasl_read) (CONNECTION* conn, char* buf, size_t len);
50 int (*msasl_write) (CONNECTION* conn, const char* buf, size_t count);
51 int (*msasl_poll) (CONNECTION* conn);
55 #endif /* _MUTT_SASL_H_ */