logDebug ("decrypt attachments\r\n");
logDebug ("decrypt attachments\n");
MapiGPGMEImpl::decrypt (void){    outlgpg_type_t id;    char *body = getBody (false);    char *newBody = NULL;        bool hasAttach = hasAttachments ();    bool isHtml = isHtmlMessage ();    int err;    id = getMessageType (body);    if (id == GPG_TYPE_CLEARSIG) {	delete_buf (body);	return verify ();    }    else if (id == GPG_TYPE_NONE && !hasAttach) {	MessageBox (NULL, "No valid OpenPGP data found.", "GPG Decryption", MB_ICONERROR|MB_OK);	delete_buf (body);	return 0;    }    if (nstorePasswd == 0)	err = op_decrypt_start (body, &newBody);    else if (passCache->size () == 0) {	/* XXX: use the callback to see if a cached passphrase is available. If not	        call the real passphrase callback and store the passphrase. */	cache_item_t itm = NULL;	err = op_decrypt_start_ext (body, &newBody, &itm);	if (!err)	    storePassphrase (itm);    }    else	err = op_decrypt_next (passphraseCallback, this, body, &newBody);    if (err) {	if (hasAttach && gpg_error ((gpg_err_code_t)err) == gpg_error (GPG_ERR_NO_DATA))	    ;	else	    MessageBox (NULL, op_strerror (err), "GPG Decryption", MB_ICONERROR|MB_OK);    }    else if (newBody != NULL && *newBody) {		/* Also set PR_BODY but do not use 'SaveChanges' to make it permanently.	   This way the user can reply with the plaintext but the ciphertext is	   still stored. */	logDebug ("decrypt isHtml=%d\r\n", isHtmlBody (newBody));	setRTFBody (newBody);	/* XXX: find a way to handle text/html message in a better way! */	if (isHtmlBody (newBody)) {	    const char *s = "The message text cannot be displayed.\n"		            "You have to save the decrypted message to view it.\n"			    "Then you need to re-open the message.\n\n"			    "Do you want to save the decrypted message?";	    int id = MessageBox (NULL, s, "GPG Decryption", MB_YESNO|MB_ICONWARNING);	    if (id == IDYES) {		logDebug ("decrypt: save plaintext message.\r\n");		setBody (newBody, true);		msg->SaveChanges (FORCE_SAVE);	    }	}	else	    setBody (newBody, false);    }    if (hasAttach) {	logDebug ("decrypt attachments\r\n");	decryptAttachments (parent);    }    delete_buf (body);    xfree (newBody);    return err;}