-void render_MIME_VCard(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *FoundCharset)
-{
- wcsession *WCC = WC;
- if (StrLength(Mime->Data) == 0)
- MimeLoadData(Mime);
- if (StrLength(Mime->Data) > 0) {
- StrBuf *Buf;
- Buf = NewStrBuf();
- /** If it's my vCard I can edit it */
- if ( (!strcasecmp(ChrPtr(WCC->CurRoom.name), USERCONFIGROOM))
- || (!strcasecmp(&(ChrPtr(WCC->CurRoom.name)[11]), USERCONFIGROOM))
- || (WC->CurRoom.view == VIEW_ADDRESSBOOK)
- ) {
- StrBufAppendPrintf(Buf, "<a href=\"edit_vcard?msgnum=%ld?partnum=%s\">",
- Mime->msgnum, ChrPtr(Mime->PartNum));
- StrBufAppendPrintf(Buf, "[%s]</a>", _("edit"));
- }
-
- /* In all cases, display the full card */
- display_vcard(Buf, Mime, 0, 1, NULL, -1);
- FreeStrBuf(&Mime->Data);
- Mime->Data = Buf;
- }
-
-}
-
-void render_MIME_VNote(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *FoundCharset)
-{
- if (StrLength(Mime->Data) == 0)
- MimeLoadData(Mime);
- if (StrLength(Mime->Data) > 0) {
- struct vnote *v;
- StrBuf *Buf;
- char *vcard;
-
- Buf = NewStrBuf();
- vcard = SmashStrBuf(&Mime->Data);
- v = vnote_new_from_str(vcard);
- free (vcard);
- if (v) {
- WCTemplputParams TP;
-
- memset(&TP, 0, sizeof(WCTemplputParams));
- TP.Filter.ContextType = CTX_VNOTE;
- TP.Context = v;
- DoTemplate(HKEY("mail_vnoteitem"),
- Buf, &TP);
-
- vnote_free(v);
- Mime->Data = Buf;
- }
- else {
- if (Mime->Data == NULL)
- Mime->Data = NewStrBuf();
- else
- FlushStrBuf(Mime->Data);
- }
- }
-}
-
-void render_MIME_ICS(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *FoundCharset)