X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_socket.h;fp=mutt_socket.h;h=6ceeeac105b6fcd383f668a0c04d1aa10472c0eb;hp=5483cb6fcac3b14be921165c1a930add3d8b8ab7;hb=df70e07e24add1869bcc9b7af2277d9d0c09a281;hpb=31edbe030ac69952aa535730427246b5e9a1603c diff --git a/mutt_socket.h b/mutt_socket.h index 5483cb6..6ceeeac 100644 --- a/mutt_socket.h +++ b/mutt_socket.h @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. - */ + */ #ifndef _MUTT_SOCKET_H_ #define _MUTT_SOCKET_H_ 1 @@ -28,8 +28,7 @@ #define M_SOCK_LOG_HDR 3 #define M_SOCK_LOG_FULL 4 -typedef struct _connection -{ +typedef struct _connection { ACCOUNT account; /* security strength factor, in bits */ unsigned int ssf; @@ -44,29 +43,33 @@ typedef struct _connection struct _connection *next; void *sockdata; - int (*conn_read) (struct _connection* conn, char* buf, size_t len); - int (*conn_write) (struct _connection *conn, const char *buf, size_t count); - int (*conn_open) (struct _connection *conn); - int (*conn_close) (struct _connection *conn); + int (*conn_read) (struct _connection * conn, char *buf, size_t len); + int (*conn_write) (struct _connection * conn, const char *buf, + size_t count); + int (*conn_open) (struct _connection * conn); + int (*conn_close) (struct _connection * conn); } CONNECTION; -int mutt_socket_open (CONNECTION* conn); -int mutt_socket_close (CONNECTION* conn); -int mutt_socket_read (CONNECTION* conn, char* buf, size_t len); -int mutt_socket_readchar (CONNECTION *conn, char *c); +int mutt_socket_open (CONNECTION * conn); +int mutt_socket_close (CONNECTION * conn); +int mutt_socket_read (CONNECTION * conn, char *buf, size_t len); +int mutt_socket_readchar (CONNECTION * conn, char *c); + #define mutt_socket_readln(A,B,C) mutt_socket_readln_d(A,B,C,M_SOCK_LOG_CMD) -int mutt_socket_readln_d (char *buf, size_t buflen, CONNECTION *conn, int dbg); +int mutt_socket_readln_d (char *buf, size_t buflen, CONNECTION * conn, + int dbg); #define mutt_socket_write(A,B) mutt_socket_write_d(A,B,M_SOCK_LOG_CMD); -int mutt_socket_write_d (CONNECTION *conn, const char *buf, int dbg); +int mutt_socket_write_d (CONNECTION * conn, const char *buf, int dbg); /* stupid hack for imap_logout_all */ -CONNECTION* mutt_socket_head (void); -void mutt_socket_free (CONNECTION* conn); -CONNECTION* mutt_conn_find (const CONNECTION* start, const ACCOUNT* account); +CONNECTION *mutt_socket_head (void); +void mutt_socket_free (CONNECTION * conn); +CONNECTION *mutt_conn_find (const CONNECTION * start, + const ACCOUNT * account); -int raw_socket_read (CONNECTION* conn, char* buf, size_t len); -int raw_socket_write (CONNECTION* conn, const char* buf, size_t count); -int raw_socket_open (CONNECTION *conn); -int raw_socket_close (CONNECTION *conn); +int raw_socket_read (CONNECTION * conn, char *buf, size_t len); +int raw_socket_write (CONNECTION * conn, const char *buf, size_t count); +int raw_socket_open (CONNECTION * conn); +int raw_socket_close (CONNECTION * conn); #endif /* _MUTT_SOCKET_H_ */