Lines Matching refs:fields
204 imapc_mail_send_fetch(struct mail *_mail, enum mail_fetch_field fields,
223 /* drop any fields that we may already be fetching currently */
224 fields &= ~mail->fetching_fields;
227 if (fields == 0 && headers == NULL)
249 if ((fields & MAIL_FETCH_STREAM_BODY) != 0)
250 fields |= MAIL_FETCH_STREAM_HEADER;
254 if ((fields & MAIL_FETCH_RECEIVED_DATE) != 0)
256 if ((fields & (MAIL_FETCH_PHYSICAL_SIZE | MAIL_FETCH_VIRTUAL_SIZE)) != 0)
258 if ((fields & MAIL_FETCH_GUID) != 0) {
262 if ((fields & MAIL_FETCH_IMAP_BODY) != 0)
264 if ((fields & MAIL_FETCH_IMAP_BODYSTRUCTURE) != 0)
267 if ((fields & MAIL_FETCH_STREAM_BODY) != 0) {
278 fields |= MAIL_FETCH_STREAM_HEADER;
279 } else if ((fields & MAIL_FETCH_STREAM_HEADER) != 0)
297 mail->fetching_fields |= fields;
335 enum mail_fetch_field fields = 0;
339 fields |= MAIL_FETCH_RECEIVED_DATE;
342 fields |= MAIL_FETCH_RECEIVED_DATE;
347 fields |= MAIL_FETCH_PHYSICAL_SIZE | MAIL_FETCH_VIRTUAL_SIZE;
351 fields |= MAIL_FETCH_IMAP_BODY;
355 fields |= MAIL_FETCH_IMAP_BODYSTRUCTURE;
358 fields |= MAIL_FETCH_GUID;
362 fields |= MAIL_FETCH_STREAM_BODY;
363 fields |= MAIL_FETCH_STREAM_HEADER;
365 return fields;
382 enum mail_fetch_field fields;
393 fields = imapc_mail_get_wanted_fetch_fields(mail);
395 (fields & MAIL_FETCH_STREAM_HEADER) == 0 &&
401 fields |= MAIL_FETCH_STREAM_HEADER;
403 if (fields != 0 || headers != NULL) T_BEGIN {
404 if (imapc_mail_send_fetch(_mail, fields, headers) > 0)
411 imapc_mail_have_fields(struct imapc_mail *imail, enum mail_fetch_field fields)
413 if ((fields & MAIL_FETCH_RECEIVED_DATE) != 0) {
416 fields &= ~MAIL_FETCH_RECEIVED_DATE;
418 if ((fields & (MAIL_FETCH_PHYSICAL_SIZE | MAIL_FETCH_VIRTUAL_SIZE)) != 0) {
421 fields &= ~(MAIL_FETCH_PHYSICAL_SIZE | MAIL_FETCH_VIRTUAL_SIZE);
423 if ((fields & MAIL_FETCH_GUID) != 0) {
426 fields &= ~MAIL_FETCH_GUID;
428 if ((fields & MAIL_FETCH_IMAP_BODY) != 0) {
431 fields &= ~MAIL_FETCH_IMAP_BODY;
433 if ((fields & MAIL_FETCH_IMAP_BODYSTRUCTURE) != 0) {
436 fields &= ~MAIL_FETCH_IMAP_BODYSTRUCTURE;
438 if ((fields & (MAIL_FETCH_STREAM_HEADER |
442 fields &= ~(MAIL_FETCH_STREAM_HEADER | MAIL_FETCH_STREAM_BODY);
444 i_assert(fields == 0);
448 int imapc_mail_fetch(struct mail *_mail, enum mail_fetch_field fields,
455 if ((fields & MAIL_FETCH_GUID) != 0 &&
469 fields |= imapc_mail_get_wanted_fetch_fields(imail);
471 ret = imapc_mail_send_fetch(_mail, fields, headers);
476 /* we'll continue waiting until we've got all the fields we wanted,
482 (!imapc_mail_have_fields(imail, fields) ||