[evolution-data-server] CamelDataCache: Return GIOStream instead of CamelStream.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] CamelDataCache: Return GIOStream instead of CamelStream.
- Date: Sat, 2 Nov 2013 13:53:40 +0000 (UTC)
commit 5ea1db42914f3861de4cf62f4b9d297774cfabf7
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Nov 2 09:10:33 2013 -0400
CamelDataCache: Return GIOStream instead of CamelStream.
Another step toward dropping CamelStream. Instead of wrapping a local
file GIOStream in a CamelStream, return the GIOStream directly and let
callers wrap it if they need to with camel_stream_new().
camel/camel-data-cache.c | 63 +++++++--------
camel/camel-data-cache.h | 4 +-
camel/providers/imapx/camel-imapx-folder.c | 10 ++-
camel/providers/imapx/camel-imapx-server.c | 36 +++++++--
camel/providers/nntp/camel-nntp-folder.c | 17 +++-
camel/providers/pop3/camel-pop3-folder.c | 61 +++++---------
camel/providers/pop3/camel-pop3-store.c | 121 ++++++++++++++++++++++++++++
camel/providers/pop3/camel-pop3-store.h | 8 ++
8 files changed, 232 insertions(+), 88 deletions(-)
---
diff --git a/camel/camel-data-cache.c b/camel/camel-data-cache.c
index 8716378..5ac687e 100644
--- a/camel/camel-data-cache.c
+++ b/camel/camel-data-cache.c
@@ -282,7 +282,7 @@ data_cache_expire (CamelDataCache *cdc,
GDir *dir;
const gchar *dname;
struct stat st;
- CamelStream *stream;
+ GIOStream *stream;
dir = g_dir_open (path, 0, NULL);
if (dir == NULL)
@@ -362,26 +362,26 @@ data_cache_path (CamelDataCache *cdc,
* @key: Key of item to add.
* @error: return location for a #GError, or %NULL
*
- * Add a new item to the cache.
+ * Add a new item to the cache, returning a #GIOStream to the new item.
*
- * The key and the path combine to form a unique key used to store
- * the item.
+ * The key and the path combine to form a unique key used to store the item.
*
- * Potentially, expiry processing will be performed while this call
- * is executing.
+ * Potentially, expiry processing will be performed while this call is
+ * executing.
*
- * Returns: A CamelStream (file) opened in read-write mode.
- * The caller must unref this when finished.
+ * The returned #GIOStream is referenced for thread-safety and must be
+ * unreferenced with g_object_unref() when finished with it.
+ *
+ * Returns: a #GIOStream for the new cache item, or %NULL
**/
-CamelStream *
+GIOStream *
camel_data_cache_add (CamelDataCache *cdc,
const gchar *path,
const gchar *key,
GError **error)
{
gchar *real;
- CamelStream *stream = NULL;
- GFileIOStream *base_stream;
+ GFileIOStream *stream;
GFile *file;
real = data_cache_path (cdc, TRUE, path, key);
@@ -398,21 +398,18 @@ camel_data_cache_add (CamelDataCache *cdc,
} while (stream != NULL);
file = g_file_new_for_path (real);
- base_stream = g_file_replace_readwrite (
+ stream = g_file_replace_readwrite (
file, NULL, FALSE, G_FILE_CREATE_PRIVATE, NULL, error);
g_object_unref (file);
- if (base_stream != NULL) {
- stream = camel_stream_new (G_IO_STREAM (base_stream));
+ if (stream != NULL)
camel_object_bag_add (cdc->priv->busy_bag, real, stream);
- g_object_unref (base_stream);
- } else {
+ else
camel_object_bag_abort (cdc->priv->busy_bag, real);
- }
g_free (real);
- return stream;
+ return G_IO_STREAM (stream);
}
/**
@@ -422,21 +419,22 @@ camel_data_cache_add (CamelDataCache *cdc,
* @key: Key for the cache item.
* @error: return location for a #GError, or %NULL
*
- * Lookup an item in the cache. If the item exists, a stream
- * is returned for the item. The stream may be shared by
- * multiple callers, so ensure the stream is in a valid state
- * through external locking.
+ * Lookup an item in the cache. If the item exists, a #GIOStream is returned
+ * for the item. The stream may be shared by multiple callers, so ensure the
+ * stream is in a valid state through external locking.
*
- * Returns: A cache item, or NULL if the cache item does not exist.
+ * The returned #GIOStream is referenced for thread-safety and must be
+ * unreferenced with g_object_unref() when finished with it.
+ *
+ * Returns: a #GIOStream for the requested cache item, or %NULL
**/
-CamelStream *
+GIOStream *
camel_data_cache_get (CamelDataCache *cdc,
const gchar *path,
const gchar *key,
GError **error)
{
- CamelStream *stream;
- GFileIOStream *base_stream = NULL;
+ GFileIOStream *stream;
GFile *file;
struct stat st;
gchar *real;
@@ -455,21 +453,18 @@ camel_data_cache_get (CamelDataCache *cdc,
}
file = g_file_new_for_path (real);
- base_stream = g_file_open_readwrite (file, NULL, error);
+ stream = g_file_open_readwrite (file, NULL, error);
g_object_unref (file);
- if (base_stream != NULL) {
- stream = camel_stream_new (G_IO_STREAM (base_stream));
+ if (stream != NULL)
camel_object_bag_add (cdc->priv->busy_bag, real, stream);
- g_object_unref (base_stream);
- } else {
+ else
camel_object_bag_abort (cdc->priv->busy_bag, real);
- }
exit:
g_free (real);
- return stream;
+ return G_IO_STREAM (stream);
}
/**
@@ -509,7 +504,7 @@ camel_data_cache_remove (CamelDataCache *cdc,
const gchar *key,
GError **error)
{
- CamelStream *stream;
+ GIOStream *stream;
gchar *real;
gint ret;
diff --git a/camel/camel-data-cache.h b/camel/camel-data-cache.h
index b0ac9a2..e9a197e 100644
--- a/camel/camel-data-cache.h
+++ b/camel/camel-data-cache.h
@@ -74,11 +74,11 @@ void camel_data_cache_set_expire_age (CamelDataCache *cdc,
void camel_data_cache_set_expire_access
(CamelDataCache *cdc,
time_t when);
-CamelStream * camel_data_cache_add (CamelDataCache *cdc,
+GIOStream * camel_data_cache_add (CamelDataCache *cdc,
const gchar *path,
const gchar *key,
GError **error);
-CamelStream * camel_data_cache_get (CamelDataCache *cdc,
+GIOStream * camel_data_cache_get (CamelDataCache *cdc,
const gchar *path,
const gchar *key,
GError **error);
diff --git a/camel/providers/imapx/camel-imapx-folder.c b/camel/providers/imapx/camel-imapx-folder.c
index 25110fc..d0f0348 100644
--- a/camel/providers/imapx/camel-imapx-folder.c
+++ b/camel/providers/imapx/camel-imapx-folder.c
@@ -556,9 +556,10 @@ imapx_get_message_sync (CamelFolder *folder,
GError **error)
{
CamelMimeMessage *msg = NULL;
- CamelStream *stream = NULL;
+ CamelStream *stream;
CamelStore *store;
CamelIMAPXFolder *imapx_folder;
+ GIOStream *base_stream;
const gchar *path = NULL;
gboolean offline_message = FALSE;
@@ -572,8 +573,11 @@ imapx_get_message_sync (CamelFolder *folder,
offline_message = TRUE;
}
- stream = camel_data_cache_get (imapx_folder->cache, path, uid, NULL);
- if (stream == NULL) {
+ base_stream = camel_data_cache_get (
+ imapx_folder->cache, path, uid, NULL);
+ if (base_stream != NULL) {
+ stream = camel_stream_new (base_stream);
+ } else {
CamelIMAPXServer *imapx_server;
CamelIMAPXMailbox *mailbox;
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 088b316..bc9c8e9 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -4797,11 +4797,17 @@ imapx_command_fetch_message_done (CamelIMAPXServer *is,
g_free (dirname);
if (g_rename (tmp_filename, cur_filename) == 0) {
+ GIOStream *base_stream;
+
/* Exchange the "tmp" stream for the "cur" stream. */
g_clear_object (&data->stream);
- data->stream = camel_data_cache_get (
+ base_stream = camel_data_cache_get (
data->message_cache, "cur",
data->uid, &local_error);
+ if (base_stream != NULL) {
+ data->stream = camel_stream_new (base_stream);
+ g_object_unref (base_stream);
+ }
} else {
g_set_error (
&local_error, G_FILE_ERROR,
@@ -8106,6 +8112,7 @@ imapx_server_get_message (CamelIMAPXServer *is,
CamelStream *stream = NULL;
CamelIMAPXJob *job;
CamelMessageInfo *mi;
+ GIOStream *base_stream;
GetMessageData *data;
gboolean registered;
@@ -8128,10 +8135,13 @@ imapx_server_get_message (CamelIMAPXServer *is,
/* Disregard errors here. If we failed to retreive the
* message from cache (implying the job we were waiting
* on failed or got cancelled), we'll just re-fetch it. */
- stream = camel_data_cache_get (
+ base_stream = camel_data_cache_get (
message_cache, "cur", message_uid, NULL);
- if (stream != NULL)
+ if (base_stream != NULL) {
+ stream = camel_stream_new (base_stream);
+ g_object_unref (base_stream);
return stream;
+ }
QUEUE_LOCK (is);
}
@@ -8147,11 +8157,17 @@ imapx_server_get_message (CamelIMAPXServer *is,
return NULL;
}
+ base_stream = camel_data_cache_add (
+ message_cache, "tmp", message_uid, error);
+ if (base_stream == NULL) {
+ QUEUE_UNLOCK (is);
+ return NULL;
+ }
+
data = g_slice_new0 (GetMessageData);
data->uid = g_strdup (message_uid);
data->message_cache = g_object_ref (message_cache);
- data->stream = camel_data_cache_add (
- message_cache, "tmp", message_uid, NULL);
+ data->stream = camel_stream_new (base_stream);
data->size = ((CamelMessageInfoBase *) mi)->size;
if (data->size > MULTI_SIZE)
data->use_multi_fetch = TRUE;
@@ -8167,7 +8183,9 @@ imapx_server_get_message (CamelIMAPXServer *is,
camel_imapx_job_set_data (
job, data, (GDestroyNotify) get_message_data_free);
+ g_clear_object (&base_stream);
camel_message_info_unref (mi);
+
registered = imapx_register_job (is, job, error);
QUEUE_UNLOCK (is);
@@ -8308,6 +8326,7 @@ camel_imapx_server_append_message (CamelIMAPXServer *is,
CamelMimeFilter *canon;
CamelIMAPXJob *job;
CamelMessageInfo *info;
+ GIOStream *base_stream;
AppendMessageData *data;
gint res;
gboolean success;
@@ -8327,8 +8346,11 @@ camel_imapx_server_append_message (CamelIMAPXServer *is,
/* chen cleanup this later */
uid = imapx_get_temp_uid ();
- stream = camel_data_cache_add (message_cache, "new", uid, error);
- if (stream == NULL) {
+ base_stream = camel_data_cache_add (message_cache, "new", uid, error);
+ if (base_stream != NULL) {
+ stream = camel_stream_new (base_stream);
+ g_object_unref (base_stream);
+ } else {
g_prefix_error (error, _("Cannot create spool file: "));
g_free (uid);
return FALSE;
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index 1406296..9981a5d 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -324,11 +324,16 @@ nntp_folder_download_message (CamelNNTPFolder *nntp_folder,
nntp_folder, &line, "article %s", id);
if (ret == 220) {
- stream = camel_data_cache_add (
+ GIOStream *base_stream;
+
+ base_stream = camel_data_cache_add (
nntp_cache, "cache", msgid, NULL);
- if (stream != NULL) {
+ if (base_stream != NULL) {
gboolean success;
+ stream = camel_stream_new (base_stream);
+ g_object_unref (base_stream);
+
success = (camel_stream_write_to_stream (
CAMEL_STREAM (nntp_stream),
stream, cancellable, error) != -1);
@@ -498,6 +503,7 @@ nntp_folder_get_message_sync (CamelFolder *folder,
CamelFolderChangeInfo *changes;
CamelNNTPFolder *nntp_folder;
CamelStream *stream = NULL;
+ GIOStream *base_stream;
gchar *article, *msgid;
gsize article_len;
@@ -520,10 +526,13 @@ nntp_folder_get_message_sync (CamelFolder *folder,
/* Lookup in cache, NEWS is global messageid's so use a global cache path */
nntp_cache = camel_nntp_store_ref_cache (nntp_store);
- stream = camel_data_cache_get (nntp_cache, "cache", msgid, NULL);
+ base_stream = camel_data_cache_get (nntp_cache, "cache", msgid, NULL);
g_clear_object (&nntp_cache);
- if (stream == NULL) {
+ if (base_stream != NULL) {
+ stream = camel_stream_new (base_stream);
+ g_object_unref (base_stream);
+ } else {
if (camel_disco_store_status ((CamelDiscoStore *) nntp_store) == CAMEL_DISCO_STORE_OFFLINE) {
g_set_error (
error, CAMEL_SERVICE_ERROR,
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index 93988aa..7478a72 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -66,6 +66,7 @@ free_fi (CamelPOP3Folder *pop3_folder,
g_free (fi);
}
+
static void
cmd_uidl (CamelPOP3Engine *pe,
CamelPOP3Stream *stream,
@@ -450,7 +451,6 @@ pop3_get_uncached_uids (CamelFolder *folder,
{
CamelPOP3Folder *pop3_folder;
CamelPOP3Store *pop3_store;
- CamelDataCache *pop3_cache;
GPtrArray *uncached_uids;
gint ii;
@@ -459,27 +459,27 @@ pop3_get_uncached_uids (CamelFolder *folder,
pop3_folder = CAMEL_POP3_FOLDER (folder);
pop3_store = CAMEL_POP3_STORE (camel_folder_get_parent_store (folder));
- pop3_cache = camel_pop3_store_ref_cache (pop3_store);
uncached_uids = g_ptr_array_new ();
for (ii = 0; ii < uids->len; ii++) {
const gchar *uid = uids->pdata[ii];
- CamelStream *stream = NULL;
CamelPOP3FolderInfo *fi;
- gchar buffer[1];
+ gboolean uid_is_cached = FALSE;
fi = g_hash_table_lookup (pop3_folder->uids_fi, uid);
- if (!fi || !pop3_cache ||
- (stream = camel_data_cache_get (pop3_cache, "cache", fi->uid, NULL)) == NULL ||
- camel_stream_read (stream, buffer, 1, NULL, NULL) != 1 ||
- buffer[0] != '#')
- g_ptr_array_add (uncached_uids, (gpointer) camel_pstring_strdup (uid));
- g_clear_object (&stream);
- }
+ if (fi != NULL) {
+ uid_is_cached = camel_pop3_store_cache_has (
+ pop3_store, fi->uid);
+ }
- g_clear_object (&pop3_cache);
+ if (!uid_is_cached) {
+ g_ptr_array_add (
+ uncached_uids, (gpointer)
+ camel_pstring_strdup (uid));
+ }
+ }
return uncached_uids;
}
@@ -551,7 +551,6 @@ pop3_folder_get_message_sync (CamelFolder *folder,
CamelMimeMessage *message = NULL;
CamelPOP3Store *pop3_store;
CamelPOP3Folder *pop3_folder;
- CamelDataCache *pop3_cache;
CamelPOP3Engine *pop3_engine;
CamelPOP3Command *pcr;
CamelPOP3FolderInfo *fi;
@@ -603,7 +602,6 @@ pop3_folder_get_message_sync (CamelFolder *folder,
camel_operation_push_message (
cancellable, _("Retrieving POP message %d"), fi->id);
- pop3_cache = camel_pop3_store_ref_cache (pop3_store);
pop3_engine = camel_pop3_store_ref_engine (pop3_store);
/* If we have an oustanding retrieve message running, wait for that to complete
@@ -626,14 +624,10 @@ pop3_folder_get_message_sync (CamelFolder *folder,
}
/* check to see if we have safely written flag set */
- if (pop3_cache == NULL
- || (stream = camel_data_cache_get (pop3_cache, "cache", fi->uid, NULL)) == NULL
- || camel_stream_read (stream, buffer, 1, cancellable, NULL) != 1
- || buffer[0] != '#') {
-
+ if (!camel_pop3_store_cache_has (pop3_store, fi->uid)) {
/* Initiate retrieval, if disk backing fails, use a memory backing */
- if (pop3_cache == NULL
- || (stream = camel_data_cache_add (pop3_cache, "cache", fi->uid, NULL)) == NULL)
+ stream = camel_pop3_store_cache_add (pop3_store, fi->uid, NULL);
+ if (stream == NULL)
stream = camel_stream_mem_new ();
/* ref it, the cache storage routine unref's when done */
@@ -647,7 +641,7 @@ pop3_folder_get_message_sync (CamelFolder *folder,
/* Also initiate retrieval of some of the following
* messages, assume we'll be receiving them. */
- if (auto_fetch && pop3_cache != NULL) {
+ if (auto_fetch) {
/* This should keep track of the last one retrieved,
* also how many are still oustanding incase of random
* access on large folders. */
@@ -657,10 +651,9 @@ pop3_folder_get_message_sync (CamelFolder *folder,
CamelPOP3FolderInfo *pfi = pop3_folder->uids->pdata[i];
if (pfi->uid && pfi->cmd == NULL) {
- pfi->stream = camel_data_cache_add (
- pop3_cache,
- "cache", pfi->uid, NULL);
- if (pfi->stream) {
+ pfi->stream = camel_pop3_store_cache_add (
+ pop3_store, pfi->uid, NULL);
+ if (pfi->stream != NULL) {
pfi->cmd = camel_pop3_engine_command_new (
pop3_engine,
CAMEL_POP3_COMMAND_MULTI,
@@ -714,7 +707,6 @@ pop3_folder_get_message_sync (CamelFolder *folder,
done:
g_object_unref (stream);
fail:
- g_clear_object (&pop3_cache);
g_clear_object (&pop3_engine);
camel_operation_pop_message (cancellable);
@@ -1145,9 +1137,7 @@ pop3_get_message_time_from_cache (CamelFolder *folder,
{
CamelStore *parent_store;
CamelPOP3Store *pop3_store;
- CamelDataCache *pop3_cache;
CamelStream *stream = NULL;
- gchar buffer[1];
gboolean res = FALSE;
g_return_val_if_fail (folder != NULL, FALSE);
@@ -1157,12 +1147,8 @@ pop3_get_message_time_from_cache (CamelFolder *folder,
parent_store = camel_folder_get_parent_store (folder);
pop3_store = CAMEL_POP3_STORE (parent_store);
- pop3_cache = camel_pop3_store_ref_cache (pop3_store);
- g_return_val_if_fail (pop3_cache != NULL, FALSE);
-
- if ((stream = camel_data_cache_get (pop3_cache, "cache", uid, NULL)) != NULL
- && camel_stream_read (stream, buffer, 1, NULL, NULL) == 1
- && buffer[0] == '#') {
+ stream = camel_pop3_store_cache_get (pop3_store, uid, NULL);
+ if (stream != NULL) {
CamelMimeMessage *message;
GError *error = NULL;
@@ -1183,10 +1169,9 @@ pop3_get_message_time_from_cache (CamelFolder *folder,
g_object_unref (message);
}
- }
- g_clear_object (&stream);
- g_clear_object (&pop3_cache);
+ g_object_unref (stream);
+ }
return res;
}
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 7ef41c8..42cb5c1 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -1077,3 +1077,124 @@ camel_pop3_store_expunge (CamelPOP3Store *store,
return TRUE;
}
+
+/**
+ * camel_pop3_store_cache_add:
+ * @store: a #CamelPOP3Store
+ * @uid: a message UID
+ * @error: return location for a #GError, or %NULL
+ *
+ * Creates a cache file for @uid in @store and returns a #CamelStream for it.
+ * If an error occurs in opening the cache file, the function sets @error and
+ * returns %NULL.
+ *
+ * The returned #CamelStream is referenced for thread-safety and must be
+ * unreferenced when finished with it.
+ *
+ * Returns: a #CamelStream, or %NULL
+ **/
+CamelStream *
+camel_pop3_store_cache_add (CamelPOP3Store *store,
+ const gchar *uid,
+ GError **error)
+{
+ CamelDataCache *cache;
+ GIOStream *base_stream;
+ CamelStream *stream = NULL;
+
+ g_return_val_if_fail (CAMEL_IS_POP3_STORE (store), NULL);
+ g_return_val_if_fail (uid != NULL, NULL);
+
+ cache = camel_pop3_store_ref_cache (store);
+ g_return_val_if_fail (cache != NULL, NULL);
+
+ base_stream = camel_data_cache_add (cache, "cache", uid, error);
+ if (base_stream != NULL) {
+ stream = camel_stream_new (base_stream);
+ g_object_unref (base_stream);
+ }
+
+ g_object_unref (cache);
+
+ return stream;
+}
+
+/**
+ * camel_pop3_store_cache_get:
+ * @store: a #CamelPOP3Store
+ * @uid: a message UID
+ * @error: return location for a #GError, or %NULL
+ *
+ * Opens the cache file for @uid in @store and returns a #CamelStream for it.
+ * If no matching cache file exists, the function returns %NULL. If an error
+ * occurs in opening the cache file, the function sets @error and returns
+ * %NULL.
+ *
+ * The returned #CamelStream is referenced for thread-safety and must be
+ * unreferenced when finished with it.
+ *
+ * Returns: a #CamelStream, or %NULL
+ **/
+CamelStream *
+camel_pop3_store_cache_get (CamelPOP3Store *store,
+ const gchar *uid,
+ GError **error)
+{
+ CamelDataCache *cache;
+ GIOStream *base_stream;
+ CamelStream *stream = NULL;
+
+ g_return_val_if_fail (CAMEL_IS_POP3_STORE (store), NULL);
+ g_return_val_if_fail (uid != NULL, NULL);
+
+ cache = camel_pop3_store_ref_cache (store);
+ g_return_val_if_fail (cache != NULL, NULL);
+
+ base_stream = camel_data_cache_get (cache, "cache", uid, error);
+ if (base_stream != NULL) {
+ GInputStream *input_stream;
+ gchar buffer[1];
+ gssize n_bytes;
+
+ input_stream = g_io_stream_get_input_stream (base_stream);
+
+ n_bytes = g_input_stream_read (
+ input_stream, buffer, 1, NULL, error);
+
+ if (n_bytes == 1 && buffer[0] == '#')
+ stream = camel_stream_new (base_stream);
+
+ g_object_unref (base_stream);
+ }
+
+ g_object_unref (cache);
+
+ return stream;
+}
+
+/**
+ * camel_pop3_store_cache_has:
+ * @store: a #CamelPOP3Store
+ * @uid: a message UID
+ *
+ * Returns whether @store has a cached message for @uid.
+ *
+ * Returns: whether @uid is cached
+ **/
+gboolean
+camel_pop3_store_cache_has (CamelPOP3Store *store,
+ const gchar *uid)
+{
+ CamelStream *stream;
+ gboolean uid_is_cached;
+
+ g_return_val_if_fail (CAMEL_IS_POP3_STORE (store), FALSE);
+ g_return_val_if_fail (uid != NULL, FALSE);
+
+ stream = camel_pop3_store_cache_get (store, uid, NULL);
+ uid_is_cached = (stream != NULL);
+ g_clear_object (&stream);
+
+ return uid_is_cached;
+}
+
diff --git a/camel/providers/pop3/camel-pop3-store.h b/camel/providers/pop3/camel-pop3-store.h
index 07776b6..864a815 100644
--- a/camel/providers/pop3/camel-pop3-store.h
+++ b/camel/providers/pop3/camel-pop3-store.h
@@ -72,6 +72,14 @@ CamelPOP3Engine *
gboolean camel_pop3_store_expunge (CamelPOP3Store *store,
GCancellable *cancellable,
GError **error);
+CamelStream * camel_pop3_store_cache_add (CamelPOP3Store *store,
+ const gchar *uid,
+ GError **error);
+CamelStream * camel_pop3_store_cache_get (CamelPOP3Store *store,
+ const gchar *uid,
+ GError **error);
+gboolean camel_pop3_store_cache_has (CamelPOP3Store *store,
+ const gchar *uid);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]