summaryrefslogtreecommitdiff
authoralwin <alwin>2004-01-03 13:10:06 (UTC)
committer alwin <alwin>2004-01-03 13:10:06 (UTC)
commit45ace73de06a645d5876ad40a6d911f7ea24c69b (patch) (unidiff)
tree53a33b99444d0a7210c9c1b55d5a1fe3a7465b7c
parent622bddce6d0cd41c765225f4743b23bf1667f3db (diff)
downloadopie-45ace73de06a645d5876ad40a6d911f7ea24c69b.zip
opie-45ace73de06a645d5876ad40a6d911f7ea24c69b.tar.gz
opie-45ace73de06a645d5876ad40a6d911f7ea24c69b.tar.bz2
multipart subtype will stored lower like in singleparts
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/imapwrapper.cpp3
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp
index ae196bb..b437df0 100644
--- a/noncore/net/mail/imapwrapper.cpp
+++ b/noncore/net/mail/imapwrapper.cpp
@@ -627,49 +627,50 @@ void IMAPwrapper::fillSingleTextPart(RecPart&target_part,mailimap_body_type_text
627 } 627 }
628 QString sub; 628 QString sub;
629 sub = which->bd_media_text; 629 sub = which->bd_media_text;
630 qDebug("Type= text/%s",which->bd_media_text); 630 qDebug("Type= text/%s",which->bd_media_text);
631 target_part.setSubtype(sub.lower()); 631 target_part.setSubtype(sub.lower());
632 target_part.setLines(which->bd_lines); 632 target_part.setLines(which->bd_lines);
633 fillBodyFields(target_part,which->bd_fields); 633 fillBodyFields(target_part,which->bd_fields);
634} 634}
635 635
636void IMAPwrapper::fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*which) 636void IMAPwrapper::fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*which)
637{ 637{
638 if (!which) { 638 if (!which) {
639 return; 639 return;
640 } 640 }
641 target_part.setSubtype("rfc822"); 641 target_part.setSubtype("rfc822");
642 qDebug("Message part"); 642 qDebug("Message part");
643 /* we set this type to text/plain */ 643 /* we set this type to text/plain */
644 target_part.setLines(which->bd_lines); 644 target_part.setLines(which->bd_lines);
645 fillBodyFields(target_part,which->bd_fields); 645 fillBodyFields(target_part,which->bd_fields);
646} 646}
647 647
648void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*which) 648void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*which)
649{ 649{
650 if (!which) return; 650 if (!which) return;
651 target_part.setSubtype(which->bd_media_subtype); 651 QString sub = which->bd_media_subtype;
652 target_part.setSubtype(sub.lower());
652 if (which->bd_ext_mpart && which->bd_ext_mpart->bd_parameter && which->bd_ext_mpart->bd_parameter->pa_list) { 653 if (which->bd_ext_mpart && which->bd_ext_mpart->bd_parameter && which->bd_ext_mpart->bd_parameter->pa_list) {
653 clistcell*cur = 0; 654 clistcell*cur = 0;
654 mailimap_single_body_fld_param*param=0; 655 mailimap_single_body_fld_param*param=0;
655 for (cur = clist_begin(which->bd_ext_mpart->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) { 656 for (cur = clist_begin(which->bd_ext_mpart->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) {
656 param = (mailimap_single_body_fld_param*)cur->data; 657 param = (mailimap_single_body_fld_param*)cur->data;
657 if (param) { 658 if (param) {
658 target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value)); 659 target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value));
659 } 660 }
660 } 661 }
661 } 662 }
662} 663}
663 664
664void IMAPwrapper::fillSingleBasicPart(RecPart&target_part,mailimap_body_type_basic*which) 665void IMAPwrapper::fillSingleBasicPart(RecPart&target_part,mailimap_body_type_basic*which)
665{ 666{
666 if (!which) { 667 if (!which) {
667 return; 668 return;
668 } 669 }
669 QString type,sub; 670 QString type,sub;
670 switch (which->bd_media_basic->med_type) { 671 switch (which->bd_media_basic->med_type) {
671 case MAILIMAP_MEDIA_BASIC_APPLICATION: 672 case MAILIMAP_MEDIA_BASIC_APPLICATION:
672 type = "application"; 673 type = "application";
673 break; 674 break;
674 case MAILIMAP_MEDIA_BASIC_AUDIO: 675 case MAILIMAP_MEDIA_BASIC_AUDIO:
675 type = "audio"; 676 type = "audio";
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
index ae196bb..b437df0 100644
--- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
@@ -627,49 +627,50 @@ void IMAPwrapper::fillSingleTextPart(RecPart&target_part,mailimap_body_type_text
627 } 627 }
628 QString sub; 628 QString sub;
629 sub = which->bd_media_text; 629 sub = which->bd_media_text;
630 qDebug("Type= text/%s",which->bd_media_text); 630 qDebug("Type= text/%s",which->bd_media_text);
631 target_part.setSubtype(sub.lower()); 631 target_part.setSubtype(sub.lower());
632 target_part.setLines(which->bd_lines); 632 target_part.setLines(which->bd_lines);
633 fillBodyFields(target_part,which->bd_fields); 633 fillBodyFields(target_part,which->bd_fields);
634} 634}
635 635
636void IMAPwrapper::fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*which) 636void IMAPwrapper::fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*which)
637{ 637{
638 if (!which) { 638 if (!which) {
639 return; 639 return;
640 } 640 }
641 target_part.setSubtype("rfc822"); 641 target_part.setSubtype("rfc822");
642 qDebug("Message part"); 642 qDebug("Message part");
643 /* we set this type to text/plain */ 643 /* we set this type to text/plain */
644 target_part.setLines(which->bd_lines); 644 target_part.setLines(which->bd_lines);
645 fillBodyFields(target_part,which->bd_fields); 645 fillBodyFields(target_part,which->bd_fields);
646} 646}
647 647
648void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*which) 648void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*which)
649{ 649{
650 if (!which) return; 650 if (!which) return;
651 target_part.setSubtype(which->bd_media_subtype); 651 QString sub = which->bd_media_subtype;
652 target_part.setSubtype(sub.lower());
652 if (which->bd_ext_mpart && which->bd_ext_mpart->bd_parameter && which->bd_ext_mpart->bd_parameter->pa_list) { 653 if (which->bd_ext_mpart && which->bd_ext_mpart->bd_parameter && which->bd_ext_mpart->bd_parameter->pa_list) {
653 clistcell*cur = 0; 654 clistcell*cur = 0;
654 mailimap_single_body_fld_param*param=0; 655 mailimap_single_body_fld_param*param=0;
655 for (cur = clist_begin(which->bd_ext_mpart->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) { 656 for (cur = clist_begin(which->bd_ext_mpart->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) {
656 param = (mailimap_single_body_fld_param*)cur->data; 657 param = (mailimap_single_body_fld_param*)cur->data;
657 if (param) { 658 if (param) {
658 target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value)); 659 target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value));
659 } 660 }
660 } 661 }
661 } 662 }
662} 663}
663 664
664void IMAPwrapper::fillSingleBasicPart(RecPart&target_part,mailimap_body_type_basic*which) 665void IMAPwrapper::fillSingleBasicPart(RecPart&target_part,mailimap_body_type_basic*which)
665{ 666{
666 if (!which) { 667 if (!which) {
667 return; 668 return;
668 } 669 }
669 QString type,sub; 670 QString type,sub;
670 switch (which->bd_media_basic->med_type) { 671 switch (which->bd_media_basic->med_type) {
671 case MAILIMAP_MEDIA_BASIC_APPLICATION: 672 case MAILIMAP_MEDIA_BASIC_APPLICATION:
672 type = "application"; 673 type = "application";
673 break; 674 break;
674 case MAILIMAP_MEDIA_BASIC_AUDIO: 675 case MAILIMAP_MEDIA_BASIC_AUDIO:
675 type = "audio"; 676 type = "audio";