email_mail_data_t* mail_data = EmailManager::loadMessage(
callback->getMessage()->getId());
if (mail_data) {
+ //attachments are updated indirectly by updateEmailMessage()
ret = callback->getMessage()->updateEmailMessage(*mail_data);
if (!ret.IsError()) {
EmailManager::freeMessage(mail_data);
mail_data = NULL;
}
}
-
- //TODO: this should be reviewed when attachments and
- // loadAttachments have been completed.
- //TODO: see old implementation lines 608-635 in MailSync.cpp
- //
- // This is original Messaging implementation:
- //
- // std::vector<IAttachmentPtr> attachments = mail->getAttachments();
- // std::vector<IAttachmentPtr> inlineAttachments = mail->getInlineAttachments();
- //
- // for (unsigned int idx = 0; idx < attachments.size() ; idx++ )
- // {
- // LoggerD("set Attachment ID = " << attachments[idx]->getAttachmentID());
- // attachments[idx]->setMessage(event->m_message);
- //
- // }
- // for (unsigned int idx = 0; idx < inlineAttachments.size() ; idx++ )
- // {
- // LoggerD("set inline Attachment ID = " << inlineAttachments[idx]->getAttachmentID());
- // inlineAttachments[idx]->setMessage(event->m_message);
- // }
- //
}
if (!ret.IsError()) {
bool MessageMMS::getHasAttachment() const
{
LoggerD("MessageMMS::getHasAttachment()");
- // TODO: Analyze relation between hasAttachment flag and inlineAttachments
return m_has_attachment;
}
} else {
*(user_data->sms_service) = std::make_pair(service->getMsgServiceId(), service);
- // TODO FIXME
picojson::array array;
array.push_back(picojson::value(service->toPicoJS()));
obj[JSON_DATA] = picojson::value(array);
email_account_t* email_accounts = nullptr;
int count = 0;
- // TODO FIXME need to work on readability of that case
if (email_get_account_list(&email_accounts, &count) != EMAIL_ERROR_NONE) {
LoggerE("Method failed: email_get_account_list()");
platform_result = PlatformResult(ErrorCode::UNKNOWN_ERR, "Error during getting account list");
int mail_id = std::atoi(mid.c_str());
email_mail_data_t* mail = NULL;
if (EMAIL_ERROR_NONE != email_get_mail_data(mail_id, &mail)) {
- // TODO what should happen?
LoggerE("Fatal error: message not found: %d!", mail_id);
return PlatformResult(ErrorCode::TYPE_MISMATCH_ERR,
"Failed to find specified email.");