168
168
G_DEFINE_TYPE (CamelFolderSummary, camel_folder_summary, CAMEL_TYPE_OBJECT)
171
remove_each_item (gpointer uid,
175
GSList **to_remove_infos = user_data;
177
*to_remove_infos = g_slist_prepend (*to_remove_infos, mi);
183
remove_all_loaded (CamelFolderSummary *summary)
185
GSList *to_remove_infos = NULL;
187
g_return_if_fail (CAMEL_IS_FOLDER_SUMMARY (summary));
189
camel_folder_summary_lock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
191
camel_folder_summary_lock (summary, CAMEL_FOLDER_SUMMARY_REF_LOCK);
192
g_hash_table_foreach_remove (summary->priv->loaded_infos, remove_each_item, &to_remove_infos);
193
camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_REF_LOCK);
195
g_slist_foreach (to_remove_infos, (GFunc) camel_message_info_free, NULL);
196
g_slist_free (to_remove_infos);
198
camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
171
202
free_o_name (gpointer key,
406
447
if (flags & CAMEL_MESSAGE_JUNK)
407
448
junk = subtract ? -1 : 1;
409
dd(printf("%p: %d %d %d | %d %d %d \n", (gpointer) summary, unread, deleted, junk, summary->priv->unread_count, summary->priv->visible_count, summary->priv->saved_count));
450
dd (printf ("%p: %d %d %d | %d %d %d \n", (gpointer) summary, unread, deleted, junk, summary->priv->unread_count, summary->priv->visible_count, summary->priv->saved_count));
411
452
g_object_freeze_notify (summary_object);
457
498
g_object_thaw_notify (summary_object);
459
dd(printf("%p: %d %d %d | %d %d %d\n", (gpointer) summary, unread, deleted, junk, summary->priv->unread_count, summary->priv->visible_count, summary->priv->saved_count));
500
dd (printf ("%p: %d %d %d | %d %d %d\n", (gpointer) summary, unread, deleted, junk, summary->priv->unread_count, summary->priv->visible_count, summary->priv->saved_count));
474
515
/* Legacy version check, before version 12 we have no upgrade knowledge */
475
516
if ((summary->version > 0xff) && (summary->version & 0xff) < 12) {
476
io(printf ("Summary header version mismatch"));
517
io (printf ("Summary header version mismatch"));
481
522
if (!(summary->version < 0x100 && summary->version >= 13))
482
io(printf("Loading legacy summary\n"));
523
io (printf ("Loading legacy summary\n"));
484
io(printf("loading new-format summary\n"));
525
io (printf ("loading new-format summary\n"));
487
528
summary->flags = record->flags;
661
702
record->cc = (gchar *) camel_pstring_strdup (camel_message_info_cc (mi));
662
703
record->mlist = (gchar *) camel_pstring_strdup (camel_message_info_mlist (mi));
664
record->followup_flag = (gchar *) camel_pstring_strdup(camel_message_info_user_tag(info, "follow-up"));
665
record->followup_completed_on = (gchar *) camel_pstring_strdup(camel_message_info_user_tag(info, "completed-on"));
666
record->followup_due_by = (gchar *) camel_pstring_strdup(camel_message_info_user_tag(info, "due-by"));
705
record->followup_flag = (gchar *) camel_pstring_strdup (camel_message_info_user_tag (info, "follow-up"));
706
record->followup_completed_on = (gchar *) camel_pstring_strdup (camel_message_info_user_tag (info, "completed-on"));
707
record->followup_due_by = (gchar *) camel_pstring_strdup (camel_message_info_user_tag (info, "due-by"));
668
709
record->bodystructure = mi->bodystructure ? g_strdup (mi->bodystructure) : NULL;
670
711
tmp = g_string_new (NULL);
671
712
if (mi->references) {
672
g_string_append_printf (tmp, "%lu %lu %lu", (gulong)mi->message_id.id.part.hi, (gulong)mi->message_id.id.part.lo, (gulong)mi->references->size);
713
g_string_append_printf (tmp, "%lu %lu %lu", (gulong) mi->message_id.id.part.hi, (gulong) mi->message_id.id.part.lo, (gulong) mi->references->size);
673
714
for (i = 0; i < mi->references->size; i++)
674
g_string_append_printf (tmp, " %lu %lu", (gulong)mi->references->references[i].id.part.hi, (gulong)mi->references->references[i].id.part.lo);
715
g_string_append_printf (tmp, " %lu %lu", (gulong) mi->references->references[i].id.part.hi, (gulong) mi->references->references[i].id.part.lo);
676
g_string_append_printf (tmp, "%lu %lu %lu", (gulong)mi->message_id.id.part.hi, (gulong)mi->message_id.id.part.lo, (gulong) 0);
717
g_string_append_printf (tmp, "%lu %lu %lu", (gulong) mi->message_id.id.part.hi, (gulong) mi->message_id.id.part.lo, (gulong) 0);
678
719
record->part = tmp->str;
679
720
g_string_free (tmp, FALSE);
695
736
tmp = g_string_new (NULL);
696
737
count = camel_tag_list_size (&mi->user_tags);
697
g_string_append_printf (tmp, "%lu", (gulong)count);
738
g_string_append_printf (tmp, "%lu", (gulong) count);
698
739
tag = mi->user_tags;
700
741
/* FIXME: Should we handle empty tags? Can it be empty? If it potential crasher ahead*/
701
g_string_append_printf (tmp, " %lu-%s %lu-%s", (gulong)strlen(tag->name), tag->name, (gulong)strlen(tag->value), tag->value);
742
g_string_append_printf (tmp, " %lu-%s %lu-%s", (gulong) strlen (tag->name), tag->name, (gulong) strlen (tag->value), tag->value);
704
745
record->usertags = tmp->str;
779
820
g_string_append_printf (str, " %d-%s", (gint) strlen (ct->subtype), ct->subtype);
781
822
g_string_append_printf (str, " 0-");
782
g_string_append_printf (str, " %d", my_list_size((struct _node **)&ct->params));
823
g_string_append_printf (str, " %d", my_list_size ((struct _node **) &ct->params));
786
g_string_append_printf (str, " %d-%s", (gint)strlen(hp->name), hp->name);
827
g_string_append_printf (str, " %d-%s", (gint) strlen (hp->name), hp->name);
788
829
g_string_append_printf (str, " 0-");
790
g_string_append_printf (str, " %d-%s", (gint)strlen (hp->value), hp->value);
831
g_string_append_printf (str, " %d-%s", (gint) strlen (hp->value), hp->value);
792
833
g_string_append_printf (str, " 0-");
802
g_string_append_printf (str, " %d-%s", (gint)strlen (ci->id), ci->id);
843
g_string_append_printf (str, " %d-%s", (gint) strlen (ci->id), ci->id);
804
845
g_string_append_printf (str, " 0-");
805
846
if (ci->description)
806
g_string_append_printf (str, " %d-%s", (gint)strlen (ci->description), ci->description);
847
g_string_append_printf (str, " %d-%s", (gint) strlen (ci->description), ci->description);
808
849
g_string_append_printf (str, " 0-");
809
850
if (ci->encoding)
810
g_string_append_printf (str, " %d-%s", (gint)strlen (ci->encoding), ci->encoding);
851
g_string_append_printf (str, " %d-%s", (gint) strlen (ci->encoding), ci->encoding);
812
853
g_string_append_printf (str, " 0-");
813
854
g_string_append_printf (str, " %u", ci->size);
874
923
* on unread counts */
875
924
added_flags |= CAMEL_MESSAGE_SEEN;
876
925
removed_flags |= CAMEL_MESSAGE_SEEN;
926
} else if ((!is_junk_folder && (new_flags & CAMEL_MESSAGE_JUNK) != 0 &&
927
(old_flags & CAMEL_MESSAGE_JUNK) == (new_flags & CAMEL_MESSAGE_JUNK)) ||
928
(!is_trash_folder && (new_flags & CAMEL_MESSAGE_DELETED) != 0 &&
929
(old_flags & CAMEL_MESSAGE_DELETED) == (new_flags & CAMEL_MESSAGE_DELETED))) {
930
/* The message was set read or unread, but it is a junk or deleted message,
931
* in a non-Junk/non-Trash folder, thus it doesn't influence an unread count
932
* there, thus pretend unread didn't change */
933
added_flags |= CAMEL_MESSAGE_SEEN;
934
removed_flags |= CAMEL_MESSAGE_SEEN;
879
937
/* decrement counts with removed flags */
1846
1905
folder_name = camel_folder_get_full_name (summary->priv->folder);
1848
1907
if (is_in_memory_summary (summary)) {
1849
camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
1850
g_warning ("%s: Tried to load uid '%s' from DB on in-memory summary of '%s'",
1908
camel_folder_summary_unlock (
1909
summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
1911
"%s: Tried to load uid '%s' "
1912
"from DB on in-memory summary of '%s'",
1851
1913
G_STRFUNC, uid, folder_name);
1855
parent_store = camel_folder_get_parent_store (summary->priv->folder);
1918
camel_folder_get_parent_store (summary->priv->folder);
1856
1919
cdb = parent_store->cdb_r;
1858
1921
data.columns_hash = NULL;
2325
2395
if (is_in_memory_summary (summary))
2398
camel_folder_summary_lock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
2328
2399
camel_folder_summary_save_to_db (summary, NULL);
2330
2401
/* struct _db_pass_data data; */
2331
d(printf ("\ncamel_folder_summary_load_from_db called \n"));
2402
d (printf ("\ncamel_folder_summary_load_from_db called \n"));
2333
2404
full_name = camel_folder_get_full_name (summary->priv->folder);
2334
2405
parent_store = camel_folder_get_parent_store (summary->priv->folder);
2335
if (!camel_folder_summary_header_load_from_db (summary, parent_store, full_name, error))
2406
if (!camel_folder_summary_header_load_from_db (summary, parent_store, full_name, error)) {
2407
camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
2338
2411
cdb = parent_store->cdb_r;
2683
2758
parent_store = camel_folder_get_parent_store (summary->priv->folder);
2684
2759
cdb = parent_store->cdb_w;
2686
d(printf ("\ncamel_folder_summary_save_to_db called \n"));
2761
camel_folder_summary_lock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
2763
d (printf ("\ncamel_folder_summary_save_to_db called \n"));
2687
2764
if (summary->priv->need_preview && g_hash_table_size (summary->priv->preview_updates)) {
2688
camel_folder_summary_lock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
2690
2765
camel_db_begin_transaction (parent_store->cdb_w, NULL);
2691
2766
g_hash_table_foreach (summary->priv->preview_updates, (GHFunc) msg_save_preview, summary->priv->folder);
2692
2767
g_hash_table_remove_all (summary->priv->preview_updates);
2693
2768
camel_db_end_transaction (parent_store->cdb_w, NULL);
2695
camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
2698
2771
summary->flags &= ~CAMEL_FOLDER_SUMMARY_DIRTY;
2700
2773
count = cfs_count_dirty (summary);
2702
return camel_folder_summary_header_save_to_db (summary, error);
2775
gboolean res = camel_folder_summary_header_save_to_db (summary, error);
2776
camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
2704
2780
ret = save_message_infos_to_db (summary, FALSE, error);
2705
2781
if (ret != 0) {
2706
2782
/* Failed, so lets reset the flag */
2707
2783
summary->flags |= CAMEL_FOLDER_SUMMARY_DIRTY;
2784
camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
2772
2853
parent_store = camel_folder_get_parent_store (summary->priv->folder);
2773
2854
cdb = parent_store->cdb_w;
2855
camel_folder_summary_lock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
2775
d(printf ("\ncamel_folder_summary_header_save_to_db called \n"));
2857
d (printf ("\ncamel_folder_summary_header_save_to_db called \n"));
2777
2859
record = CAMEL_FOLDER_SUMMARY_GET_CLASS (summary)->summary_header_to_db (summary, error);
2861
camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
3383
3474
gpointer ptr_uid = NULL, ptr_flags = NULL;
3384
3475
if (g_hash_table_lookup_extended (summary->priv->uids, l->data, &ptr_uid, &ptr_flags)) {
3385
3476
const gchar *uid_copy = camel_pstring_strdup (l->data);
3477
CamelMessageInfo *mi;
3386
3479
folder_summary_update_counts_by_flags (summary, GPOINTER_TO_UINT (ptr_flags), UPDATE_COUNTS_SUB);
3387
3480
g_hash_table_remove (summary->priv->uids, uid_copy);
3482
mi = g_hash_table_lookup (summary->priv->loaded_infos, uid_copy);
3388
3483
g_hash_table_remove (summary->priv->loaded_infos, uid_copy);
3486
camel_message_info_free (mi);
3389
3487
camel_pstring_free (uid_copy);
3393
if (is_in_memory_summary (summary)) {
3491
if (!is_in_memory_summary (summary)) {
3394
3492
full_name = camel_folder_get_full_name (summary->priv->folder);
3395
3493
parent_store = camel_folder_get_parent_store (summary->priv->folder);
3396
3494
if (camel_db_delete_uids (parent_store->cdb_w, full_name, uids, NULL) != 0)
3594
3694
mi = (CamelMessageInfoBase *) camel_message_info_new (summary);
3596
if ((content = camel_header_raw_find(&h, "Content-Type", NULL))
3696
if ((content = camel_header_raw_find (&h, "Content-Type", NULL))
3597
3697
&& (ct = camel_content_type_decode (content))
3598
&& (charset = camel_content_type_param(ct, "charset"))
3599
&& (g_ascii_strcasecmp(charset, "us-ascii") == 0))
3698
&& (charset = camel_content_type_param (ct, "charset"))
3699
&& (g_ascii_strcasecmp (charset, "us-ascii") == 0))
3600
3700
charset = NULL;
3602
3702
charset = charset ? camel_iconv_charset_name (charset) : NULL;
3604
subject = summary_format_string(h, "subject", charset);
3605
from = summary_format_address(h, "from", charset);
3606
to = summary_format_address(h, "to", charset);
3607
cc = summary_format_address(h, "cc", charset);
3704
subject = summary_format_string (h, "subject", charset);
3705
from = summary_format_address (h, "from", charset);
3706
to = summary_format_address (h, "to", charset);
3707
cc = summary_format_address (h, "cc", charset);
3608
3708
mlist = camel_header_raw_check_mailing_list (&h);
3733
3833
ci->id = camel_header_msgid_decode (camel_header_raw_find (&h, "content-id", NULL));
3734
3834
ci->description = camel_header_decode_string (camel_header_raw_find (&h, "content-description", NULL), charset);
3735
3835
ci->encoding = camel_content_transfer_encoding_decode (camel_header_raw_find (&h, "content-transfer-encoding", NULL));
3736
ci->type = camel_content_type_decode(camel_header_raw_find(&h, "content-type", NULL));
3836
ci->type = camel_content_type_decode (camel_header_raw_find (&h, "content-type", NULL));
3795
3895
/* check content type for indexing, then read body */
3796
3896
ct = camel_mime_parser_content_type (mp);
3797
3897
/* update attachments flag as we go */
3798
if (camel_content_type_is(ct, "application", "pgp-signature")
3898
if (camel_content_type_is (ct, "application", "pgp-signature")
3799
3899
#ifdef ENABLE_SMIME
3800
|| camel_content_type_is(ct, "application", "x-pkcs7-signature")
3801
|| camel_content_type_is(ct, "application", "pkcs7-signature")
3900
|| camel_content_type_is (ct, "application", "x-pkcs7-signature")
3901
|| camel_content_type_is (ct, "application", "pkcs7-signature")
3804
3904
camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
3813
3913
if (calendar_header || camel_content_type_is (ct, "text", "calendar"))
3814
3914
camel_message_info_set_user_flag (msginfo, "$has_cal", TRUE);
3816
if (p->index && camel_content_type_is(ct, "text", "*")) {
3916
if (p->index && camel_content_type_is (ct, "text", "*")) {
3817
3917
gchar *encoding;
3818
3918
const gchar *charset;
3820
d(printf("generating index:\n"));
3920
d (printf ("generating index:\n"));
3822
encoding = camel_content_transfer_encoding_decode(camel_mime_parser_header(mp, "content-transfer-encoding", NULL));
3922
encoding = camel_content_transfer_encoding_decode (camel_mime_parser_header (mp, "content-transfer-encoding", NULL));
3823
3923
if (encoding) {
3824
if (!g_ascii_strcasecmp(encoding, "base64")) {
3825
d(printf(" decoding base64\n"));
3924
if (!g_ascii_strcasecmp (encoding, "base64")) {
3925
d (printf (" decoding base64\n"));
3826
3926
if (p->filter_64 == NULL)
3827
3927
p->filter_64 = camel_mime_filter_basic_new (CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
3829
3929
camel_mime_filter_reset (p->filter_64);
3830
3930
enc_id = camel_mime_parser_filter_add (mp, p->filter_64);
3831
} else if (!g_ascii_strcasecmp(encoding, "quoted-printable")) {
3832
d(printf(" decoding quoted-printable\n"));
3931
} else if (!g_ascii_strcasecmp (encoding, "quoted-printable")) {
3932
d (printf (" decoding quoted-printable\n"));
3833
3933
if (p->filter_qp == NULL)
3834
3934
p->filter_qp = camel_mime_filter_basic_new (CAMEL_MIME_FILTER_BASIC_QP_DEC);
3836
3936
camel_mime_filter_reset (p->filter_qp);
3837
3937
enc_id = camel_mime_parser_filter_add (mp, p->filter_qp);
3838
3938
} else if (!g_ascii_strcasecmp (encoding, "x-uuencode")) {
3839
d(printf(" decoding x-uuencode\n"));
3939
d (printf (" decoding x-uuencode\n"));
3840
3940
if (p->filter_uu == NULL)
3841
3941
p->filter_uu = camel_mime_filter_basic_new (CAMEL_MIME_FILTER_BASIC_UU_DEC);
3843
3943
camel_mime_filter_reset (p->filter_uu);
3844
3944
enc_id = camel_mime_parser_filter_add (mp, p->filter_uu);
3846
d(printf(" ignoring encoding %s\n", encoding));
3946
d (printf (" ignoring encoding %s\n", encoding));
3848
3948
g_free (encoding);
3851
charset = camel_content_type_param(ct, "charset");
3951
charset = camel_content_type_param (ct, "charset");
3852
3952
if (charset != NULL
3853
&& !(g_ascii_strcasecmp(charset, "us-ascii")==0
3854
|| g_ascii_strcasecmp(charset, "utf-8")==0)) {
3855
d(printf(" Adding conversion filter from %s to UTF-8\n", charset));
3953
&& !(g_ascii_strcasecmp (charset, "us-ascii") == 0
3954
|| g_ascii_strcasecmp (charset, "utf-8") == 0)) {
3955
d (printf (" Adding conversion filter from %s to UTF-8\n", charset));
3856
3956
mfc = g_hash_table_lookup (p->filter_charset, charset);
3857
3957
if (mfc == NULL) {
3858
3958
mfc = camel_mime_filter_charset_new (charset, "UTF-8");
3865
3965
chr_id = camel_mime_parser_filter_add (mp, mfc);
3867
w(g_warning("Cannot convert '%s' to 'UTF-8', message index may be corrupt", charset));
3967
w (g_warning ("Cannot convert '%s' to 'UTF-8', message index may be corrupt", charset));
3871
3971
/* we do charset conversions before this filter, which isn't strictly correct,
3872
3972
* but works in most cases */
3873
if (camel_content_type_is(ct, "text", "html")) {
3973
if (camel_content_type_is (ct, "text", "html")) {
3874
3974
if (p->filter_html == NULL)
3875
3975
p->filter_html = camel_mime_filter_html_new ();
3891
3991
camel_mime_parser_filter_remove (mp, idx_id);
3893
3993
case CAMEL_MIME_PARSER_STATE_MULTIPART:
3894
d(printf("Summarising multipart\n"));
3994
d (printf ("Summarising multipart\n"));
3895
3995
/* update attachments flag as we go */
3896
3996
ct = camel_mime_parser_content_type (mp);
3897
if (camel_content_type_is(ct, "multipart", "mixed"))
3997
if (camel_content_type_is (ct, "multipart", "mixed"))
3898
3998
camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_ATTACHMENTS, CAMEL_MESSAGE_ATTACHMENTS);
3899
if (camel_content_type_is(ct, "multipart", "signed")
3900
|| camel_content_type_is(ct, "multipart", "encrypted"))
3999
if (camel_content_type_is (ct, "multipart", "signed")
4000
|| camel_content_type_is (ct, "multipart", "encrypted"))
3901
4001
camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
3903
4003
while (camel_mime_parser_step (mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_MULTIPART_END) {
3922
4022
state = camel_mime_parser_step (mp, &buffer, &len);
3923
4023
if (state != CAMEL_MIME_PARSER_STATE_MESSAGE_END) {
3924
g_error("Bad parser state: Expecing MESSAGE_END or MESSAGE_EOF, got: %d", state);
4024
g_error ("Bad parser state: Expecing MESSAGE_END or MESSAGE_EOF, got: %d", state);
3925
4025
camel_mime_parser_unstep (mp);
3930
d(printf("finished building content info\n"));
4030
d (printf ("finished building content info\n"));
3960
4060
/* check for attachments */
3961
4061
ct = ((CamelDataWrapper *) containee)->mime_type;
3962
if (camel_content_type_is(ct, "multipart", "*")) {
3963
if (camel_content_type_is(ct, "multipart", "mixed"))
4062
if (camel_content_type_is (ct, "multipart", "*")) {
4063
if (camel_content_type_is (ct, "multipart", "mixed"))
3964
4064
camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_ATTACHMENTS, CAMEL_MESSAGE_ATTACHMENTS);
3965
if (camel_content_type_is(ct, "multipart", "signed")
3966
|| camel_content_type_is(ct, "multipart", "encrypted"))
4065
if (camel_content_type_is (ct, "multipart", "signed")
4066
|| camel_content_type_is (ct, "multipart", "encrypted"))
3967
4067
camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
3968
} else if (camel_content_type_is(ct, "application", "pgp-signature")
4068
} else if (camel_content_type_is (ct, "application", "pgp-signature")
3969
4069
#ifdef ENABLE_SMIME
3970
|| camel_content_type_is(ct, "application", "x-pkcs7-signature")
3971
|| camel_content_type_is(ct, "application", "pkcs7-signature")
4070
|| camel_content_type_is (ct, "application", "x-pkcs7-signature")
4071
|| camel_content_type_is (ct, "application", "pkcs7-signature")
3974
4074
camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
4011
4111
my_list_append ((struct _node **) &info->childs, (struct _node *) child);
4013
4113
} else if (p->filter_stream
4014
&& camel_content_type_is(ct, "text", "*")) {
4114
&& camel_content_type_is (ct, "text", "*")) {
4015
4115
gint html_id = -1, idx_id = -1;
4017
4117
/* pre-attach html filter if required, otherwise just index filter */
4018
if (camel_content_type_is(ct, "text", "html")) {
4118
if (camel_content_type_is (ct, "text", "html")) {
4019
4119
if (p->filter_html == NULL)
4020
4120
p->filter_html = camel_mime_filter_html_new ();
4731
printf ("%scontent-type: %s/%s\n", p, ci->type->type ? ci->type->type : "(null)",
4833
"%scontent-type: %s/%s\n",
4834
p, ci->type->type ? ci->type->type : "(null)",
4732
4835
ci->type->subtype ? ci->type->subtype : "(null)");
4734
4837
printf ("%scontent-type: <unset>\n", p);
4735
printf ("%scontent-transfer-encoding: %s\n", p, ci->encoding ? ci->encoding : "(null)");
4736
printf ("%scontent-description: %s\n", p, ci->description ? ci->description : "(null)");
4839
"%scontent-transfer-encoding: %s\n",
4840
p, ci->encoding ? ci->encoding : "(null)");
4842
"%scontent-description: %s\n",
4843
p, ci->description ? ci->description : "(null)");
4737
4844
printf ("%ssize: %lu\n", p, (gulong) ci->size);
4738
4845
ci = ci->childs;
4746
4853
camel_message_info_dump (CamelMessageInfo *mi)
4748
4855
if (mi == NULL) {
4749
printf("No message?\n");
4856
printf ("No message?\n");
4753
printf("Subject: %s\n", camel_message_info_subject(mi));
4754
printf("To: %s\n", camel_message_info_to(mi));
4755
printf("Cc: %s\n", camel_message_info_cc(mi));
4756
printf("mailing list: %s\n", camel_message_info_mlist(mi));
4757
printf("From: %s\n", camel_message_info_from(mi));
4758
printf("UID: %s\n", camel_message_info_uid(mi));
4759
printf("Flags: %04x\n", camel_message_info_flags(mi));
4860
printf ("Subject: %s\n", camel_message_info_subject (mi));
4861
printf ("To: %s\n", camel_message_info_to (mi));
4862
printf ("Cc: %s\n", camel_message_info_cc (mi));
4863
printf ("mailing list: %s\n", camel_message_info_mlist (mi));
4864
printf ("From: %s\n", camel_message_info_from (mi));
4865
printf ("UID: %s\n", camel_message_info_uid (mi));
4866
printf ("Flags: %04x\n", camel_message_info_flags (mi));
4760
4867
camel_content_info_dump (((CamelMessageInfoBase *) mi)->content, 0);