Driver Support Functions void mail_searched (MAILSTREAM *stream,unsigned long msgno); stream stream where event happened msgno message number This function is called by the driver to notify c-client that this message number matches a search. It invokes the main program's mm_searched() function. void mail_exists (MAILSTREAM *stream,unsigned long nmsgs); stream stream where event happened nmsgs number of messages This function is called by the driver to notify c-client that this message number exists (i.e. there are this many messages in the mailbox). It invokes the main program's mm_exists() function. void mail_recent (MAILSTREAM *stream,unsigned long recent); stream stream where event happened recent number of messages This function is called by the driver to notify c-client that this many messages are "recent" (i.e. arrived in the mailbox since the previous time the mailbox was opened). void mail_expunged (MAILSTREAM *stream,unsigned long msgno); stream stream where event happened msgno number of messages This function is called by the driver to notify MAIL that this message number has been expunged from the mail file and that all subsequent messages are no references by a message number one less than before. It invokes the main program's mm_expunged() function. void mail_lock (MAILSTREAM *stream); stream stream where event happened This function sets the stream lock. It is an error to set the stream lock if the stream is already locked. This is mainly used to catch errors due to a callback function (e.g. mm_exists) inadvertantly recursing back to the MAIL routines and establishing an infinite recursion. Normally, drivers will set the lock prior to calling one of the callback functions above or, more likely, in the beginning of the driver's non-reentrant "do operation" section. In the IMAP4 driver, the stream lock is set when entering imap_send() and cleared on exit. void mail_unlock (MAILSTREAM *stream); stream stream where event happened This function releases the stream lock. It is an error to release the stream lock if the stream is not locked.