[evolution-ews/wip/camel-more-gobject] Seal CamelFolder properties
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/wip/camel-more-gobject] Seal CamelFolder properties
- Date: Wed, 2 Nov 2016 22:21:25 +0000 (UTC)
commit d1f37920e655306f3289178568c472fbc1578137
Author: Milan Crha <mcrha redhat com>
Date: Wed Nov 2 23:21:37 2016 +0100
Seal CamelFolder properties
src/camel/camel-ews-folder.c | 138 ++++++++++++++++++++++++------------------
src/camel/camel-ews-utils.c | 18 +++--
2 files changed, 90 insertions(+), 66 deletions(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index 1123cb9..9e0f27f 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -768,7 +768,7 @@ ews_folder_maybe_update_mlist (CamelFolder *folder,
g_return_if_fail (uid != NULL);
g_return_if_fail (message != NULL);
- mi = camel_folder_summary_get (folder->summary, uid);
+ mi = camel_folder_summary_get (camel_folder_get_folder_summary (folder), uid);
if (!mi)
return;
@@ -790,6 +790,18 @@ ews_folder_maybe_update_mlist (CamelFolder *folder,
g_clear_object (&mi);
}
+static guint32
+ews_folder_get_permanent_flags (CamelFolder *folder)
+{
+ return CAMEL_MESSAGE_ANSWERED |
+ CAMEL_MESSAGE_DELETED |
+ CAMEL_MESSAGE_DRAFT |
+ CAMEL_MESSAGE_FLAGGED |
+ CAMEL_MESSAGE_SEEN |
+ CAMEL_MESSAGE_FORWARDED |
+ CAMEL_MESSAGE_USER;
+}
+
/* Get the message from cache if available otherwise get it from server */
static CamelMimeMessage *
ews_folder_get_message_sync (CamelFolder *folder,
@@ -1103,7 +1115,7 @@ ews_sync_mi_flags (CamelFolder *folder,
cancellable, &local_error);
}
- camel_folder_summary_save_to_db (folder->summary, NULL);
+ camel_folder_summary_save_to_db (camel_folder_get_folder_summary (folder), NULL);
if (local_error) {
camel_ews_store_maybe_disconnect (ews_store, local_error);
@@ -1229,17 +1241,17 @@ ews_move_to_junk_folder (CamelFolder *folder,
if (!item || e_ews_item_get_item_type (item) == E_EWS_ITEM_TYPE_ERROR)
continue;
- camel_folder_summary_lock (folder->summary);
+ camel_folder_summary_lock (camel_folder_get_folder_summary (folder));
camel_folder_change_info_remove_uid (changes, uid);
- camel_folder_summary_remove_uid (folder->summary, uid);
+ camel_folder_summary_remove_uid (camel_folder_get_folder_summary (folder),
uid);
ews_data_cache_remove (ews_folder->cache, "cur", uid, NULL);
- camel_folder_summary_unlock (folder->summary);
+ camel_folder_summary_unlock (camel_folder_get_folder_summary (folder));
}
if (camel_folder_change_info_changed (changes)) {
- camel_folder_summary_touch (folder->summary);
+ camel_folder_summary_touch (camel_folder_get_folder_summary (folder));
camel_folder_changed (folder, changes);
}
camel_folder_change_info_free (changes);
@@ -1266,6 +1278,7 @@ ews_synchronize_sync (CamelFolder *folder,
GError **error)
{
CamelEwsStore *ews_store;
+ CamelFolderSummary *folder_summary;
GPtrArray *uids;
GSList *mi_list = NULL, *deleted_uids = NULL, *junk_uids = NULL;
gint mi_list_len = 0;
@@ -1278,12 +1291,13 @@ ews_synchronize_sync (CamelFolder *folder,
if (!camel_ews_store_connected (ews_store, cancellable, error))
return FALSE;
- if (camel_folder_summary_get_deleted_count (folder->summary) > 0 ||
- camel_folder_summary_get_junk_count (folder->summary) > 0) {
- camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
- uids = camel_folder_summary_get_array (folder->summary);
+ folder_summary = camel_folder_get_folder_summary (folder);
+ if (camel_folder_summary_get_deleted_count (folder_summary) > 0 ||
+ camel_folder_summary_get_junk_count (folder_summary) > 0) {
+ camel_folder_summary_prepare_fetch_all (folder_summary, NULL);
+ uids = camel_folder_summary_get_array (folder_summary);
} else {
- uids = camel_folder_summary_get_changed (folder->summary);
+ uids = camel_folder_summary_get_changed (folder_summary);
}
if (!uids || !uids->len) {
camel_folder_summary_free_array (uids);
@@ -1292,7 +1306,7 @@ ews_synchronize_sync (CamelFolder *folder,
for (i = 0; success && i < uids->len; i++) {
guint32 flags_changed, flags_set;
- CamelMessageInfo *mi = camel_folder_summary_get (folder->summary, uids->pdata[i]);
+ CamelMessageInfo *mi = camel_folder_summary_get (folder_summary, uids->pdata[i]);
if (!mi)
continue;
@@ -1345,7 +1359,7 @@ ews_synchronize_sync (CamelFolder *folder,
success = ews_move_to_junk_folder (folder, junk_uids, cancellable, &local_error);
g_slist_free_full (junk_uids, (GDestroyNotify) camel_pstring_free);
- camel_folder_summary_save_to_db (folder->summary, NULL);
+ camel_folder_summary_save_to_db (folder_summary, NULL);
camel_folder_summary_free_array (uids);
if (local_error)
@@ -1367,7 +1381,7 @@ ews_folder_count_notify_cb (CamelFolderSummary *folder_summary,
g_return_if_fail (folder_summary != NULL);
g_return_if_fail (param != NULL);
g_return_if_fail (folder != NULL);
- g_return_if_fail (folder->summary == folder_summary);
+ g_return_if_fail (camel_folder_get_folder_summary (folder) == folder_summary);
ews_store = CAMEL_EWS_STORE (camel_folder_get_parent_store (folder));
g_return_if_fail (ews_store != NULL);
@@ -1421,6 +1435,7 @@ camel_ews_folder_new (CamelStore *store,
GError **error)
{
CamelFolder *folder;
+ CamelFolderSummary *folder_summary;
CamelEwsFolder *ews_folder;
gchar *state_file;
const gchar *short_name;
@@ -1438,16 +1453,18 @@ camel_ews_folder_new (CamelStore *store,
ews_folder = CAMEL_EWS_FOLDER (folder);
- folder->summary = camel_ews_summary_new (folder);
+ folder_summary = camel_ews_summary_new (folder);
- if (!folder->summary) {
- g_object_unref (CAMEL_OBJECT (folder));
+ if (!folder_summary) {
+ g_object_unref (folder);
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Could not load summary for %s"), folder_name);
return NULL;
}
+ camel_folder_take_folder_summary (folder, folder_summary);
+
/* set/load persistent state */
state_file = g_build_filename (folder_dir, "cmeta", NULL);
camel_object_set_state_filename (CAMEL_OBJECT (folder), state_file);
@@ -1471,7 +1488,7 @@ camel_ews_folder_new (CamelStore *store,
CAMEL_STORE_SETTINGS (settings));
if (filter_inbox)
- folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT;
+ camel_folder_set_flags (folder, camel_folder_get_flags (folder) |
CAMEL_FOLDER_FILTER_RECENT);
g_object_unref (settings);
}
@@ -1482,8 +1499,8 @@ camel_ews_folder_new (CamelStore *store,
return NULL;
}
- g_signal_connect (folder->summary, "notify::saved-count", G_CALLBACK (ews_folder_count_notify_cb),
folder);
- g_signal_connect (folder->summary, "notify::unread-count", G_CALLBACK (ews_folder_count_notify_cb),
folder);
+ g_signal_connect (folder_summary, "notify::saved-count", G_CALLBACK (ews_folder_count_notify_cb),
folder);
+ g_signal_connect (folder_summary, "notify::unread-count", G_CALLBACK (ews_folder_count_notify_cb),
folder);
return folder;
}
@@ -1525,7 +1542,7 @@ sync_updated_items (CamelEwsFolder *ews_folder,
/* Compare the item_type from summary as the updated items seems to
* arrive as generic types while its not the case */
- mi = camel_folder_summary_get (folder->summary, id->id);
+ mi = camel_folder_summary_get (camel_folder_get_folder_summary (folder), id->id);
if (!mi) {
g_object_unref (item);
continue;
@@ -1764,6 +1781,7 @@ ews_folder_forget_all_mails (CamelEwsFolder *ews_folder)
{
CamelFolder *folder;
CamelFolderChangeInfo *changes;
+ CamelFolderSummary *folder_summary;
GPtrArray *known_uids;
gint ii;
@@ -1772,25 +1790,26 @@ ews_folder_forget_all_mails (CamelEwsFolder *ews_folder)
folder = CAMEL_FOLDER (ews_folder);
g_return_if_fail (folder != NULL);
- known_uids = camel_folder_summary_get_array (folder->summary);
+ known_uids = camel_folder_summary_get_array (camel_folder_get_folder_summary (folder));
if (!known_uids)
return;
changes = camel_folder_change_info_new ();
+ folder_summary = camel_folder_get_folder_summary (folder);
- camel_folder_summary_lock (folder->summary);
+ camel_folder_summary_lock (folder_summary);
for (ii = 0; ii < known_uids->len; ii++) {
const gchar *uid = g_ptr_array_index (known_uids, ii);
camel_folder_change_info_remove_uid (changes, uid);
- camel_folder_summary_remove_uid (folder->summary, uid);
+ camel_folder_summary_remove_uid (folder_summary, uid);
ews_data_cache_remove (ews_folder->cache, "cur", uid, NULL);
}
- camel_folder_summary_unlock (folder->summary);
+ camel_folder_summary_unlock (folder_summary);
if (camel_folder_change_info_changed (changes)) {
- camel_folder_summary_touch (folder->summary);
- camel_folder_summary_save_to_db (folder->summary, NULL);
+ camel_folder_summary_touch (folder_summary);
+ camel_folder_summary_save_to_db (folder_summary, NULL);
camel_folder_changed (folder, changes);
}
@@ -1804,6 +1823,7 @@ ews_refresh_info_sync (CamelFolder *folder,
GError **error)
{
CamelFolderChangeInfo *change_info;
+ CamelFolderSummary *folder_summary;
CamelEwsFolder *ews_folder;
CamelEwsFolderPrivate *priv;
EEwsConnection *cnc;
@@ -1837,7 +1857,8 @@ ews_refresh_info_sync (CamelFolder *folder,
cnc = camel_ews_store_ref_connection (ews_store);
g_return_val_if_fail (cnc != NULL, FALSE);
- camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
+ folder_summary = camel_folder_get_folder_summary (folder);
+ camel_folder_summary_prepare_fetch_all (folder_summary, NULL);
change_info = camel_folder_change_info_new ();
last_folder_update_time = g_get_monotonic_time ();
@@ -1852,7 +1873,7 @@ ews_refresh_info_sync (CamelFolder *folder,
* Due to these reasons we just get the item ids and its type in
* SyncFolderItem request and fetch the item using the
* GetItem request. */
- sync_state = camel_ews_summary_dup_sync_state ((CamelEwsSummary *) folder->summary);
+ sync_state = camel_ews_summary_dup_sync_state (CAMEL_EWS_SUMMARY (folder_summary));
do {
GSList *items_created = NULL, *items_updated = NULL;
GSList *items_deleted = NULL;
@@ -1864,7 +1885,7 @@ ews_refresh_info_sync (CamelFolder *folder,
if (g_error_matches (local_error, EWS_CONNECTION_ERROR,
EWS_CONNECTION_ERROR_INVALIDSYNCSTATEDATA)) {
g_clear_error (&local_error);
- camel_ews_summary_set_sync_state ((CamelEwsSummary *) folder->summary, NULL);
+ camel_ews_summary_set_sync_state (CAMEL_EWS_SUMMARY (folder_summary), NULL);
g_free (sync_state);
sync_state = NULL;
ews_folder_forget_all_mails (ews_folder);
@@ -1900,19 +1921,19 @@ ews_refresh_info_sync (CamelFolder *folder,
if (local_error)
break;
- total = camel_folder_summary_count (folder->summary);
- unread = camel_folder_summary_get_unread_count (folder->summary);
+ total = camel_folder_summary_count (folder_summary);
+ unread = camel_folder_summary_get_unread_count (folder_summary);
camel_ews_store_summary_set_folder_total (ews_store->summary, id, total);
camel_ews_store_summary_set_folder_unread (ews_store->summary, id, unread);
camel_ews_store_summary_save (ews_store->summary, NULL);
- camel_ews_summary_set_sync_state ((CamelEwsSummary *) folder->summary, sync_state);
+ camel_ews_summary_set_sync_state (CAMEL_EWS_SUMMARY (folder_summary), sync_state);
- camel_folder_summary_touch (folder->summary);
+ camel_folder_summary_touch (folder_summary);
if (camel_folder_change_info_changed (change_info)) {
- camel_folder_summary_save_to_db (folder->summary, NULL);
+ camel_folder_summary_save_to_db (folder_summary, NULL);
/* Notify any listeners only once per 10 seconds, as such notify can cause UI update
*/
if (g_get_monotonic_time () - last_folder_update_time >= 10 * G_USEC_PER_SEC) {
last_folder_update_time = g_get_monotonic_time ();
@@ -1925,11 +1946,11 @@ ews_refresh_info_sync (CamelFolder *folder,
camel_operation_pop_message (cancellable);
if (camel_folder_change_info_changed (change_info)) {
- camel_folder_summary_touch (folder->summary);
- camel_folder_summary_save_to_db (folder->summary, NULL);
+ camel_folder_summary_touch (folder_summary);
+ camel_folder_summary_save_to_db (folder_summary, NULL);
camel_folder_changed (folder, change_info);
} else {
- camel_folder_summary_save_to_db (folder->summary, NULL);
+ camel_folder_summary_save_to_db (folder_summary, NULL);
}
camel_folder_change_info_free (change_info);
@@ -2005,7 +2026,7 @@ ews_append_message_sync (CamelFolder *folder,
e_ews_folder_id_free (fid);
g_free (folder_id);
- if (camel_ews_summary_add_message (folder->summary, itemid, changekey, info, message)) {
+ if (camel_ews_summary_add_message (camel_folder_get_folder_summary (folder), itemid, changekey, info,
message)) {
CamelFolderChangeInfo *changes;
changes = camel_folder_change_info_new ();
@@ -2064,7 +2085,7 @@ ews_transfer_messages_to_sync (CamelFolder *source,
ids = g_slist_prepend (ids, (gchar *) uids->pdata[i]);
- mi = camel_folder_summary_get (source->summary, uids->pdata[i]);
+ mi = camel_folder_summary_get (camel_folder_get_folder_summary (source), uids->pdata[i]);
if (!mi)
continue;
@@ -2138,7 +2159,7 @@ ews_transfer_messages_to_sync (CamelFolder *source,
camel_data_wrapper_write_to_stream_sync (
CAMEL_DATA_WRAPPER (message), stream, cancellable, NULL);
- info = camel_folder_summary_get (source->summary, uids->pdata[i]);
+ info = camel_folder_summary_get (camel_folder_get_folder_summary (source),
uids->pdata[i]);
if (info == NULL) {
g_object_unref (stream);
g_object_unref (message);
@@ -2148,7 +2169,7 @@ ews_transfer_messages_to_sync (CamelFolder *source,
clone = camel_message_info_clone (info, NULL);
- if (camel_ews_summary_add_message (destination->summary, id->id, id->change_key,
clone, message))
+ if (camel_ews_summary_add_message (camel_folder_get_folder_summary (destination),
id->id, id->change_key, clone, message))
camel_folder_change_info_add_uid (changes, id->id);
g_clear_object (&clone);
@@ -2168,12 +2189,12 @@ ews_transfer_messages_to_sync (CamelFolder *source,
for (l = processed_items; l; l = g_slist_next (l)) {
const gchar *uid = l->data;
- camel_folder_summary_remove_uid (source->summary, uid);
+ camel_folder_summary_remove_uid (camel_folder_get_folder_summary (source),
uid);
camel_folder_change_info_remove_uid (changes, uid);
ews_data_cache_remove (CAMEL_EWS_FOLDER (source)->cache, "cur", uid, NULL);
}
if (camel_folder_change_info_changed (changes)) {
- camel_folder_summary_touch (source->summary);
+ camel_folder_summary_touch (camel_folder_get_folder_summary (source));
camel_folder_changed (source, changes);
}
@@ -2210,7 +2231,7 @@ ews_prepare_content_refresh (CamelFolder *folder)
{
g_return_if_fail (CAMEL_IS_EWS_FOLDER (folder));
- camel_ews_summary_set_sync_state (CAMEL_EWS_SUMMARY (folder->summary), NULL);
+ camel_ews_summary_set_sync_state (CAMEL_EWS_SUMMARY (camel_folder_get_folder_summary (folder)), NULL);
}
static gboolean
@@ -2239,22 +2260,24 @@ ews_delete_messages_from_folder (CamelFolder *folder,
const GSList *deleted_items)
{
CamelFolderChangeInfo *changes;
+ CamelFolderSummary *folder_summary;
const GSList *iter;
changes = camel_folder_change_info_new ();
+ folder_summary = camel_folder_get_folder_summary (folder);
for (iter = deleted_items; iter != NULL; iter = iter->next) {
const gchar *uid = iter->data;
- camel_folder_summary_lock (folder->summary);
+ camel_folder_summary_lock (folder_summary);
camel_folder_change_info_remove_uid (changes, uid);
- camel_folder_summary_remove_uid (folder->summary, uid);
+ camel_folder_summary_remove_uid (folder_summary, uid);
ews_data_cache_remove (CAMEL_EWS_FOLDER (folder)->cache, "cur", uid, NULL);
- camel_folder_summary_unlock (folder->summary);
+ camel_folder_summary_unlock (folder_summary);
}
if (camel_folder_change_info_changed (changes)) {
- camel_folder_summary_touch (folder->summary);
+ camel_folder_summary_touch (folder_summary);
camel_folder_changed (folder, changes);
}
@@ -2426,8 +2449,8 @@ ews_expunge_sync (CamelFolder *folder,
*/
is_trash = ews_folder_is_of_type (folder, CAMEL_FOLDER_TYPE_TRASH);
- camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
- known_uids = camel_folder_summary_get_array (folder->summary);
+ camel_folder_summary_prepare_fetch_all (camel_folder_get_folder_summary (folder), NULL);
+ known_uids = camel_folder_summary_get_array (camel_folder_get_folder_summary (folder));
if (known_uids == NULL)
return TRUE;
@@ -2454,7 +2477,7 @@ ews_expunge_sync (CamelFolder *folder,
CamelMessageInfo *info;
const gchar *uid = g_ptr_array_index (known_uids, i);
- info = camel_folder_summary_get (folder->summary, uid);
+ info = camel_folder_summary_get (camel_folder_get_folder_summary (folder), uid);
if (info && (is_trash || (camel_message_info_get_flags (info) & CAMEL_MESSAGE_DELETED) != 0))
deleted_items = g_slist_prepend (deleted_items, (gpointer) camel_pstring_strdup
(uid));
@@ -2492,9 +2515,9 @@ ews_folder_dispose (GObject *object)
CamelEwsFolder *ews_folder = CAMEL_EWS_FOLDER (object);
CamelFolderSummary *summary;
- summary = CAMEL_FOLDER (ews_folder)->summary;
+ summary = camel_folder_get_folder_summary (CAMEL_FOLDER (ews_folder));
if (summary) {
- g_signal_handlers_disconnect_by_func (CAMEL_FOLDER (ews_folder)->summary, G_CALLBACK
(ews_folder_count_notify_cb), ews_folder);
+ g_signal_handlers_disconnect_by_func (summary, G_CALLBACK (ews_folder_count_notify_cb),
ews_folder);
/* save changes, if there are any unsaved */
camel_folder_summary_save_to_db (summary, NULL);
@@ -2584,6 +2607,7 @@ camel_ews_folder_class_init (CamelEwsFolderClass *class)
object_class->constructed = ews_folder_constructed;
folder_class = CAMEL_FOLDER_CLASS (class);
+ folder_class->get_permanent_flags = ews_folder_get_permanent_flags;
folder_class->get_message_sync = ews_folder_get_message_sync;
folder_class->get_message_cached = ews_folder_get_message_cached;
folder_class->search_by_expression = ews_folder_search_by_expression;
@@ -2607,11 +2631,7 @@ camel_ews_folder_init (CamelEwsFolder *ews_folder)
ews_folder->priv = CAMEL_EWS_FOLDER_GET_PRIVATE (ews_folder);
- folder->permanent_flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_DELETED |
- CAMEL_MESSAGE_DRAFT | CAMEL_MESSAGE_FLAGGED | CAMEL_MESSAGE_SEEN |
- CAMEL_MESSAGE_FORWARDED | CAMEL_MESSAGE_USER;
-
- folder->folder_flags = CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY;
+ camel_folder_set_flags (folder, CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY);
g_mutex_init (&ews_folder->priv->search_lock);
g_mutex_init (&ews_folder->priv->state_lock);
diff --git a/src/camel/camel-ews-utils.c b/src/camel/camel-ews-utils.c
index da7d20c..7d905d0 100644
--- a/src/camel/camel-ews-utils.c
+++ b/src/camel/camel-ews-utils.c
@@ -364,7 +364,7 @@ camel_ews_utils_sync_deleted_items (CamelEwsFolder *ews_folder,
items_deleted_list = g_list_prepend (
items_deleted_list, (gpointer) id);
- camel_folder_summary_remove_uid (folder->summary, id);
+ camel_folder_summary_remove_uid (camel_folder_get_folder_summary (folder), id);
camel_folder_change_info_remove_uid (change_info, id);
}
@@ -741,9 +741,11 @@ camel_ews_utils_sync_updated_items (CamelEwsFolder *ews_folder,
CamelFolderChangeInfo *change_info)
{
CamelFolder *folder;
+ CamelFolderSummary *folder_summary;
GSList *l;
folder = CAMEL_FOLDER (ews_folder);
+ folder_summary = camel_folder_get_folder_summary (folder);
for (l = items_updated; l != NULL; l = g_slist_next (l)) {
EEwsItem *item = (EEwsItem *) l->data;
@@ -763,7 +765,7 @@ camel_ews_utils_sync_updated_items (CamelEwsFolder *ews_folder,
continue;
}
- mi = camel_folder_summary_get (folder->summary, id->id);
+ mi = camel_folder_summary_get (folder_summary, id->id);
if (mi) {
guint32 server_flags;
gboolean changed, was_changed;
@@ -773,7 +775,7 @@ camel_ews_utils_sync_updated_items (CamelEwsFolder *ews_folder,
server_flags = ews_utils_get_server_flags (item);
ews_utils_merge_server_user_flags (item, mi);
- changed = camel_ews_update_message_info_flags (folder->summary, mi, server_flags,
NULL);
+ changed = camel_ews_update_message_info_flags (folder_summary, mi, server_flags,
NULL);
changed = camel_ews_utils_update_follow_up_flags (item, mi) || changed;
changed = camel_ews_utils_update_read_receipt_flags (item, mi, server_flags, FALSE)
|| changed;
@@ -806,12 +808,14 @@ camel_ews_utils_sync_created_items (CamelEwsFolder *ews_folder,
GCancellable *cancellable)
{
CamelFolder *folder;
+ CamelFolderSummary *folder_summary;
GSList *l;
if (!items_created)
return;
folder = CAMEL_FOLDER (ews_folder);
+ folder_summary = camel_folder_get_folder_summary (folder);
for (l = items_created; l != NULL; l = g_slist_next (l)) {
EEwsItem *item = (EEwsItem *) l->data;
@@ -840,7 +844,7 @@ camel_ews_utils_sync_created_items (CamelEwsFolder *ews_folder,
continue;
}
- mi = camel_folder_summary_get (folder->summary, id->id);
+ mi = camel_folder_summary_get (folder_summary, id->id);
if (mi) {
g_clear_object (&mi);
g_object_unref (item);
@@ -866,7 +870,7 @@ camel_ews_utils_sync_created_items (CamelEwsFolder *ews_folder,
g_object_unref (stream);
if (camel_mime_part_construct_from_parser_sync (part, parser, NULL, NULL)) {
- mi = camel_folder_summary_info_new_from_header (folder->summary,
part->headers);
+ mi = camel_folder_summary_info_new_from_header (folder_summary,
part->headers);
if (camel_header_raw_find (&(part->headers), "Disposition-Notification-To",
NULL))
message_requests_read_receipt = TRUE;
}
@@ -876,7 +880,7 @@ camel_ews_utils_sync_created_items (CamelEwsFolder *ews_folder,
}
if (!mi)
- mi = camel_message_info_new (folder->summary);
+ mi = camel_message_info_new (folder_summary);
camel_message_info_set_abort_notifications (mi, TRUE);
@@ -928,7 +932,7 @@ camel_ews_utils_sync_created_items (CamelEwsFolder *ews_folder,
camel_message_info_set_abort_notifications (mi, FALSE);
- camel_folder_summary_add (folder->summary, mi, FALSE);
+ camel_folder_summary_add (folder_summary, mi, FALSE);
/* camel_folder_summary_add() sets folder_flagged flag
* on the message info, but this is a fresh item downloaded
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]