diff options
author | Peter Williams <peterw@ximian.com> | 2002-07-26 06:51:58 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2002-07-26 06:51:58 +0800 |
commit | 4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf (patch) | |
tree | 1fc0d8858b7d952eb7324a48536ccbfe941dd5f1 /camel/providers/imap/camel-imap-summary.c | |
parent | 16fe42c893218a56e9b7fb1cd9418f8569a0f51f (diff) | |
download | gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar.gz gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar.bz2 gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar.lz gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar.xz gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar.zst gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.zip |
Prototype.
2002-07-25 Peter Williams <peterw@ximian.com>
* providers/imap/camel-imap-summary.h
(camel_imap_summary_add_offline_uncached): Prototype.
* providers/imap/camel-imap-summary.c
(camel_imap_summary_add_offline_uncached): New function to add an
uncached message to the summary while offline.
* providers/imap/camel-imap-store.c (imap_connect_online): Only
refresh the folders if the disco diary is empty (ie, we're not
resyncing.)
* providers/imap/camel-imap-folder.c (imap_transfer_offline): Emit
an event for the source if deleting its originals. Also, if we
can't load the message, still process it, using the new imap
summary function.
svn path=/trunk/; revision=17596
Diffstat (limited to 'camel/providers/imap/camel-imap-summary.c')
-rw-r--r-- | camel/providers/imap/camel-imap-summary.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/camel/providers/imap/camel-imap-summary.c b/camel/providers/imap/camel-imap-summary.c index f64cc00c19..ecfd6a1425 100644 --- a/camel/providers/imap/camel-imap-summary.c +++ b/camel/providers/imap/camel-imap-summary.c @@ -230,3 +230,30 @@ camel_imap_summary_add_offline (CamelFolderSummary *summary, const char *uid, camel_message_info_set_uid (mi, g_strdup (uid)); camel_folder_summary_add (summary, mi); } + +void +camel_imap_summary_add_offline_uncached (CamelFolderSummary *summary, const char *uid, + const CamelMessageInfo *info) +{ + CamelMessageInfo *mi; + CamelMessageContentInfo *ci; + + /* Create summary entry */ + mi = camel_folder_summary_info_new (summary); + ci = camel_folder_summary_content_info_new (summary); + + camel_message_info_dup_to (info, mi); + mi->content = ci; + + /* copy our private fields */ + ((CamelImapMessageInfo *)mi)->server_flags = + ((CamelImapMessageInfo *)info)->server_flags; + + /* Copy flags 'n' tags */ + camel_flag_list_copy (&(mi->user_flags), &(info->user_flags)); + camel_tag_list_copy (&(mi->user_tags), &(info->user_tags)); + + /* Set uid and add to summary */ + camel_message_info_set_uid (mi, g_strdup (uid)); + camel_folder_summary_add (summary, mi); +} |