|
本帖最后由 hechengjin 于 2016-4-5 18:35 编辑
mail.server.%serverkey%.autosync_max_age_days 所有日期单位都会转换为天存在这里
NS_IMPL_SERVERPREF_INT(nsImapIncomingServer, AutoSyncMaxAgeDays,
"autosync_max_age_days")
- NS_IMETHODIMP nsDefaultAutoSyncMsgStrategy::IsExcluded(nsIMsgFolder *aFolder,
- nsIMsgDBHdr *aMsgHdr, bool *aDecision)
- {
- NS_ENSURE_ARG_POINTER(aDecision);
- NS_ENSURE_ARG_POINTER(aMsgHdr);
- NS_ENSURE_ARG_POINTER(aFolder);
- nsCOMPtr<nsIMsgIncomingServer> server;
- nsresult rv = aFolder->GetServer(getter_AddRefs(server));
- NS_ENSURE_SUCCESS(rv, rv);
- nsCOMPtr<nsIImapIncomingServer> imapServer(do_QueryInterface(server, &rv));
- int32_t offlineMsgAgeLimit = -1;
- imapServer->GetAutoSyncMaxAgeDays(&offlineMsgAgeLimit);
- NS_ENSURE_SUCCESS(rv, rv);
- PRTime msgDate;
- aMsgHdr->GetDate(&msgDate);
- *aDecision = offlineMsgAgeLimit > 0 &&
- msgDate < MsgConvertAgeInDaysToCutoffDate(offlineMsgAgeLimit);
- return NS_OK;
- }
复制代码 同步最近多少天,是指邮件头下载后,根据邮件头中的时间决定要不要同步对应的邮件内容。
|
|