*/
int (*store)(void *ctx, const char *key, size_t keylen, void *data, size_t datalen);
/**
- * delete - backend-specific routine to delete a message's headers
+ * delete_header - backend-specific routine to delete a message's headers
* @param ctx The backend-specific context retrieved via open()
* @param key A message identification string
* @param keylen The length of the string pointed to by key
* @retval 0 Success
* @retval num Error, a backend-specific error code
*/
- int (*delete)(void *ctx, const char *key, size_t keylen);
+ int (*delete_header)(void *ctx, const char *key, size_t keylen);
/**
* close - backend-specific routine to close a context
* @param[out] ctx The backend-specific context retrieved via open()
.fetch = hcache_##_name##_fetch, \
.free = hcache_##_name##_free, \
.store = hcache_##_name##_store, \
- .delete = hcache_##_name##_delete, \
+ .delete_header = hcache_##_name##_delete_header, \
.close = hcache_##_name##_close, \
.backend = hcache_##_name##_backend, \
};
}
/**
- * hcache_bdb_delete - Implements HcacheOps::delete()
+ * hcache_bdb_delete_header - Implements HcacheOps::delete_header()
*/
-static int hcache_bdb_delete(void *vctx, const char *key, size_t keylen)
+static int hcache_bdb_delete_header(void *vctx, const char *key, size_t keylen)
{
if (!vctx)
return -1;
}
/**
- * hcache_gdbm_delete - Implements HcacheOps::delete()
+ * hcache_gdbm_delete_header - Implements HcacheOps::delete_header()
*/
-static int hcache_gdbm_delete(void *ctx, const char *key, size_t keylen)
+static int hcache_gdbm_delete_header(void *ctx, const char *key, size_t keylen)
{
if (!ctx)
return -1;
}
/**
- * mutt_hcache_delete - Multiplexor for HcacheOps::delete
+ * mutt_hcache_delete_header - Multiplexor for HcacheOps::delete_header
*/
-int mutt_hcache_delete(header_cache_t *hc, const char *key, size_t keylen)
+int mutt_hcache_delete_header(header_cache_t *hc, const char *key, size_t keylen)
{
char path[PATH_MAX];
const struct HcacheOps *ops = hcache_get_ops();
keylen = snprintf(path, sizeof(path), "%s%s", hc->folder, key);
- return ops->delete (hc->ctx, path, keylen);
+ return ops->delete_header(hc->ctx, path, keylen);
}
/**
void *data, size_t dlen);
/**
- * mutt_hcache_delete - delete a key / data pair
+ * mutt_hcache_delete_header - delete a key / data pair
* @param hc Pointer to the header_cache_t structure got by mutt_hcache_open
* @param key Message identification string
* @param keylen Length of the string pointed to by key
* @retval 0 Success
* @retval num Generic or backend-specific error code otherwise
*/
-int mutt_hcache_delete(header_cache_t *hc, const char *key, size_t keylen);
+int mutt_hcache_delete_header(header_cache_t *hc, const char *key, size_t keylen);
/**
* mutt_hcache_backend_list - get a list of backend identification strings
}
/**
- * hcache_kyotocabinet_delete - Implements HcacheOps::delete()
+ * hcache_kyotocabinet_delete_header - Implements HcacheOps::delete_header()
*/
-static int hcache_kyotocabinet_delete(void *ctx, const char *key, size_t keylen)
+static int hcache_kyotocabinet_delete_header(void *ctx, const char *key, size_t keylen)
{
if (!ctx)
return -1;
}
/**
- * hcache_lmdb_delete - Implements HcacheOps::delete()
+ * hcache_lmdb_delete_header - Implements HcacheOps::delete_header()
*/
-static int hcache_lmdb_delete(void *vctx, const char *key, size_t keylen)
+static int hcache_lmdb_delete_header(void *vctx, const char *key, size_t keylen)
{
if (!vctx)
return -1;
}
/**
- * hcache_qdbm_delete - Implements HcacheOps::delete()
+ * hcache_qdbm_delete_header - Implements HcacheOps::delete_header()
*/
-static int hcache_qdbm_delete(void *ctx, const char *key, size_t keylen)
+static int hcache_qdbm_delete_header(void *ctx, const char *key, size_t keylen)
{
if (!ctx)
return -1;
}
/**
- * hcache_tokyocabinet_delete - Implements HcacheOps::delete()
+ * hcache_tokyocabinet_delete_header - Implements HcacheOps::delete_header()
*/
-static int hcache_tokyocabinet_delete(void *ctx, const char *key, size_t keylen)
+static int hcache_tokyocabinet_delete_header(void *ctx, const char *key, size_t keylen)
{
if (!ctx)
return -1;
/**
* mutt_parse_idxfmt_hook - Parse the 'index-format-hook' command - Implements ::command_t
*/
-int mutt_parse_idxfmt_hook(struct Buffer *buf, struct Buffer *s,
- unsigned long data, struct Buffer *err)
+enum CommandResult mutt_parse_idxfmt_hook(struct Buffer *buf, struct Buffer *s,
+ unsigned long data, struct Buffer *err)
{
enum CommandResult rc = MUTT_CMD_ERROR;
bool not = false;
sizeof(mdata->modseq));
}
else
- mutt_hcache_delete(mdata->hcache, "/MODSEQ", 7);
+ mutt_hcache_delete_header(mdata->hcache, "/MODSEQ", 7);
if (has_qresync)
imap_hcache_store_uid_seqset(mdata);
char key[16];
sprintf(key, "/%u", uid);
- return mutt_hcache_delete(mdata->hcache, key, mutt_str_strlen(key));
+ return mutt_hcache_delete_header(mdata->hcache, key, mutt_str_strlen(key));
}
/**
if (!mdata->hcache)
return -1;
- return mutt_hcache_delete(mdata->hcache, "/UIDSEQSET", 10);
+ return mutt_hcache_delete_header(mdata->hcache, "/UIDSEQSET", 10);
}
/**
key = e->path + 3;
keylen = maildir_hcache_keylen(key);
}
- mutt_hcache_delete(hc, key, keylen);
+ mutt_hcache_delete_header(hc, key, keylen);
}
#endif
unlink(path);
continue;
snprintf(buf, sizeof(buf), "%u", current);
- mutt_debug(LL_DEBUG2, "mutt_hcache_delete %s\n", buf);
- mutt_hcache_delete(hc, buf, strlen(buf));
+ mutt_debug(LL_DEBUG2, "mutt_hcache_delete_header %s\n", buf);
+ mutt_hcache_delete_header(hc, buf, strlen(buf));
}
}
mutt_hcache_free(hc, &hdata);
#ifdef USE_HCACHE
if (fc.hc)
{
- mutt_debug(LL_DEBUG2, "mutt_hcache_delete %s\n", buf);
- mutt_hcache_delete(fc.hc, buf, strlen(buf));
+ mutt_debug(LL_DEBUG2, "mutt_hcache_delete_header %s\n", buf);
+ mutt_hcache_delete_header(fc.hc, buf, strlen(buf));
}
#endif
}
{
mutt_bcache_del(adata->bcache, cache_id(edata->uid));
#ifdef USE_HCACHE
- mutt_hcache_delete(hc, edata->uid, strlen(edata->uid));
+ mutt_hcache_delete_header(hc, edata->uid, strlen(edata->uid));
#endif
}
}