Commit a70b333f a70b333f19641fa2360bd08d77dbb5d45c999934 by Sergey Poznyakoff

(mailbox_lock, mailbox_unlock): New functions.

1 parent be7908c6
......@@ -78,6 +78,10 @@ extern int mailbox_set_debug __P ((mailbox_t, mu_debug_t));
/* Events. */
extern int mailbox_get_observable __P ((mailbox_t, observable_t *));
/* Locking */
extern int mailbox_lock __P ((mailbox_t mbox));
extern int mailbox_unlock __P ((mailbox_t mbox));
#ifdef __cplusplus
}
#endif
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
......@@ -257,6 +257,7 @@ mailbox_messages_recent (mailbox_t mbox, size_t *num)
return MU_ERR_EMPTY_VFN;
return mbox->_messages_recent (mbox, num);
}
int
mailbox_message_unseen (mailbox_t mbox, size_t *num)
{
......@@ -492,3 +493,20 @@ mailbox_set_folder (mailbox_t mbox, folder_t folder)
mbox->folder = folder;
return 0;
}
int
mailbox_lock (mailbox_t mbox)
{
locker_t lock = NULL;
mailbox_get_locker (mbox, &lock);
return locker_lock (lock);
}
int
mailbox_unlock (mailbox_t mbox)
{
locker_t lock = NULL;
mailbox_get_locker (mbox, &lock);
return locker_unlock (lock);
}
......