IMAP MSN helper functions. More...
#include <stdlib.h>
Go to the source code of this file.
Functions | |
void | imap_msn_free (struct MSNArray *msn) |
Free the cache. | |
struct Email * | imap_msn_get (const struct MSNArray *msn, size_t idx) |
Return the Email associated with an msn. | |
size_t | imap_msn_highest (const struct MSNArray *msn) |
Return the highest MSN in use. | |
void | imap_msn_remove (struct MSNArray *msn, size_t idx) |
Remove an entry from the cache. | |
void | imap_msn_reserve (struct MSNArray *msn, size_t num) |
Create / reallocate the cache. | |
void | imap_msn_set (struct MSNArray *msn, size_t idx, struct Email *e) |
Cache an Email into a given position. | |
size_t | imap_msn_shrink (struct MSNArray *msn, size_t num) |
Remove a number of entries from the end of the cache. | |
IMAP MSN helper functions.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file msn.h.
void imap_msn_free | ( | struct MSNArray * | msn | ) |
Free the cache.
msn | MSN structure |
Definition at line 62 of file msn.c.
struct Email * imap_msn_get | ( | const struct MSNArray * | msn, |
size_t | idx | ||
) |
size_t imap_msn_highest | ( | const struct MSNArray * | msn | ) |
void imap_msn_remove | ( | struct MSNArray * | msn, |
size_t | idx | ||
) |
void imap_msn_reserve | ( | struct MSNArray * | msn, |
size_t | num | ||
) |
Create / reallocate the cache.
msn | MSN structure |
num | Number of MSNs to make room for |
Definition at line 44 of file msn.c.
void imap_msn_set | ( | struct MSNArray * | msn, |
size_t | idx, | ||
struct Email * | e | ||
) |
size_t imap_msn_shrink | ( | struct MSNArray * | msn, |
size_t | num | ||
) |
Remove a number of entries from the end of the cache.
msn | MSN structure |
num | Number of entries to remove |
num | Number of entries actually removed |
Definition at line 106 of file msn.c.