Re: Preliminary design for libmailcheck- comments appreciated



On Sat, Feb 27, 1999 at 10:42:17PM -0500, Russell Steinthal wrote:

> I think the [mail-checking] library should store a collection of
> mailbox sets, each of which would be a possibly heterogenous set of
> mailboxes.  Each set could then individually be checked for new
> mail, or all the sets could be checked.
> 
> The function interface would probably look something like this:
> 
> int  gnome_mailcheck_create_set();
> void gnome_mailcheck_register_mbox(char* fname, int set);
> void gnome_mailcheck_register_mh(char* path, int set);
> bool gnome_mailcheck_check_set(int set);
> bool gnome_mailcheck_check_all();

I'd think that you'd want a higher-level 
    void gnome_mailcheck_register(char *path, ...)
routine that would determine the type of the mailbox and call the
appropriate _register_<mb_type> routine to do the actual work.

What I think would be preferable, however, is a callback approach that
would allow me to register a handler that gets called whenever the
status of any mailbox in the set changes.

It would also be nice if rather than returning a bool, a count of new
messages were returned or passed to the callback routine.

-- John Kodis.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]