*
imclient library - authenticating callback interface to IMAP/IMSP servers
#include <cyrus/imclient.h>
int imclient_connect(struct imclient **imclient, const char *host, const char *port);
void
imclient_close (struct imclient *imclient);
void imclient_setflags(struct imclient
*imclient, intflags);
void imclient_clearflags (struct imclient
*imclient, intflags);
char* imclient_servername (struct imclient
*imclient);
void imclient_addcallback (struct imclient * imclient ,...);
void imclient_send (struct imclient *imclient,
void (*finishproc)(), void
*finishrock, const char *fmt,
...);
void imclient_getselectinfo (struct imclient
*imclient, int *fd, int *
wanttowrite);
void imclient_processoneevent (struct imclient
*imclient);
int imclient_authenticate (struct imclient
*imclient, struct sasl_client
**availmech, const char
*service, const char *user,
int protallowed);
int imclient_havetls ();
int imclient_starttls (struct imclient
*imclient, char *cert_file, char
*key_file, char *CAfile, char
*CApath);
The imclient library functions are distributed with Cyrus IMAP and IMSP. These functions are used for building IMAP/IMSP client software. These functions handle Kerberos authentication and can set callbacks based on the keyword in untagged replies or based on the command tag at the end of command replies.
Users must link with the -lcyrus switch, and must supply a function called fatal to be called in case of any error within libcyrus.a.
All of the imclient functions begin with the prefix imclient and takes an argument of type struct imclient * as the first argument which is initialized by imclient_connect and freed by imclient_close.
See below for a
description of each function.
imclient_connect()