Lines Matching refs:imap

258   struct IMAP *imap = data->req.p.imap;  in imap_endofresp()  local
288 if((!imap->custom && !imap_matchresp(line, len, "LIST")) || in imap_endofresp()
289 (imap->custom && !imap_matchresp(line, len, imap->custom) && in imap_endofresp()
290 (!strcasecompare(imap->custom, "STORE") || in imap_endofresp()
292 !strcasecompare(imap->custom, "SELECT") && in imap_endofresp()
293 !strcasecompare(imap->custom, "EXAMINE") && in imap_endofresp()
294 !strcasecompare(imap->custom, "SEARCH") && in imap_endofresp()
295 !strcasecompare(imap->custom, "EXPUNGE") && in imap_endofresp()
296 !strcasecompare(imap->custom, "LSUB") && in imap_endofresp()
297 !strcasecompare(imap->custom, "UID") && in imap_endofresp()
298 !strcasecompare(imap->custom, "GETQUOTAROOT") && in imap_endofresp()
299 !strcasecompare(imap->custom, "NOOP"))) in imap_endofresp()
331 if(imap && !imap->custom && ((len == 3 && line[0] == '+') || in imap_endofresp()
650 struct IMAP *imap = data->req.p.imap; in imap_perform_list() local
652 if(imap->custom) in imap_perform_list()
654 result = imap_sendf(data, "%s%s", imap->custom, in imap_perform_list()
655 imap->custom_params ? imap->custom_params : ""); in imap_perform_list()
658 char *mailbox = imap->mailbox ? imap_atom(imap->mailbox, TRUE) in imap_perform_list()
685 struct IMAP *imap = data->req.p.imap; in imap_perform_select() local
694 if(!imap->mailbox) { in imap_perform_select()
700 mailbox = imap_atom(imap->mailbox, FALSE); in imap_perform_select()
724 struct IMAP *imap = data->req.p.imap; in imap_perform_fetch() local
726 if(imap->uid) { in imap_perform_fetch()
729 if(imap->partial) in imap_perform_fetch()
731 imap->uid, imap->section ? imap->section : "", in imap_perform_fetch()
732 imap->partial); in imap_perform_fetch()
735 imap->uid, imap->section ? imap->section : ""); in imap_perform_fetch()
737 else if(imap->mindex) { in imap_perform_fetch()
739 if(imap->partial) in imap_perform_fetch()
741 imap->mindex, imap->section ? imap->section : "", in imap_perform_fetch()
742 imap->partial); in imap_perform_fetch()
745 imap->mindex, imap->section ? imap->section : ""); in imap_perform_fetch()
766 struct IMAP *imap = data->req.p.imap; in imap_perform_append() local
770 if(!imap->mailbox) { in imap_perform_append()
812 mailbox = imap_atom(imap->mailbox, FALSE); in imap_perform_append()
837 struct IMAP *imap = data->req.p.imap; in imap_perform_search() local
840 if(!imap->query) { in imap_perform_search()
846 result = imap_sendf(data, "SEARCH %s", imap->query); in imap_perform_search()
1085 struct IMAP *imap = data->req.p.imap; in imap_state_select_resp() local
1110 if(imap->uidvalidity && imapc->mailbox_uidvalidity && in imap_state_select_resp()
1111 !strcasecompare(imap->uidvalidity, imapc->mailbox_uidvalidity)) { in imap_state_select_resp()
1118 imapc->mailbox = strdup(imap->mailbox); in imap_state_select_resp()
1122 if(imap->custom) in imap_state_select_resp()
1124 else if(imap->query) in imap_state_select_resp()
1425 struct IMAP *imap; in imap_init() local
1427 imap = data->req.p.imap = calloc(1, sizeof(struct IMAP)); in imap_init()
1428 if(!imap) in imap_init()
1503 struct IMAP *imap = data->req.p.imap; in imap_done() local
1507 if(!imap) in imap_done()
1514 else if(!data->set.connect_only && !imap->custom && in imap_done()
1515 (imap->uid || imap->mindex || data->state.upload || in imap_done()
1534 Curl_safefree(imap->mailbox); in imap_done()
1535 Curl_safefree(imap->uidvalidity); in imap_done()
1536 Curl_safefree(imap->uid); in imap_done()
1537 Curl_safefree(imap->mindex); in imap_done()
1538 Curl_safefree(imap->section); in imap_done()
1539 Curl_safefree(imap->partial); in imap_done()
1540 Curl_safefree(imap->query); in imap_done()
1541 Curl_safefree(imap->custom); in imap_done()
1542 Curl_safefree(imap->custom_params); in imap_done()
1545 imap->transfer = PPTRANSFER_BODY; in imap_done()
1563 struct IMAP *imap = data->req.p.imap; in imap_perform() local
1571 imap->transfer = PPTRANSFER_INFO; in imap_perform()
1578 if(imap->mailbox && imapc->mailbox && in imap_perform()
1579 strcasecompare(imap->mailbox, imapc->mailbox) && in imap_perform()
1580 (!imap->uidvalidity || !imapc->mailbox_uidvalidity || in imap_perform()
1581 strcasecompare(imap->uidvalidity, imapc->mailbox_uidvalidity))) in imap_perform()
1588 else if(imap->custom && (selected || !imap->mailbox)) in imap_perform()
1591 else if(!imap->custom && selected && (imap->uid || imap->mindex)) in imap_perform()
1594 else if(!imap->custom && selected && imap->query) in imap_perform()
1597 else if(imap->mailbox && !selected && in imap_perform()
1598 (imap->custom || imap->uid || imap->mindex || imap->query)) in imap_perform()
1689 struct IMAP *imap = data->req.p.imap; in imap_dophase_done() local
1693 if(imap->transfer != PPTRANSFER_BODY) in imap_dophase_done()
1957 struct IMAP *imap = data->req.p.imap; in imap_parse_url_path() local
1971 result = Curl_urldecode(begin, end - begin, &imap->mailbox, NULL, in imap_parse_url_path()
1977 imap->mailbox = NULL; in imap_parse_url_path()
2018 if(strcasecompare(name, "UIDVALIDITY") && !imap->uidvalidity) { in imap_parse_url_path()
2022 imap->uidvalidity = value; in imap_parse_url_path()
2025 else if(strcasecompare(name, "UID") && !imap->uid) { in imap_parse_url_path()
2029 imap->uid = value; in imap_parse_url_path()
2032 else if(strcasecompare(name, "MAILINDEX") && !imap->mindex) { in imap_parse_url_path()
2036 imap->mindex = value; in imap_parse_url_path()
2039 else if(strcasecompare(name, "SECTION") && !imap->section) { in imap_parse_url_path()
2043 imap->section = value; in imap_parse_url_path()
2046 else if(strcasecompare(name, "PARTIAL") && !imap->partial) { in imap_parse_url_path()
2050 imap->partial = value; in imap_parse_url_path()
2066 if(imap->mailbox && !imap->uid && !imap->mindex) { in imap_parse_url_path()
2068 (void)curl_url_get(data->state.uh, CURLUPART_QUERY, &imap->query, in imap_parse_url_path()
2088 struct IMAP *imap = data->req.p.imap; in imap_parse_custom_request() local
2093 result = Curl_urldecode(custom, 0, &imap->custom, NULL, REJECT_CTRL); in imap_parse_custom_request()
2097 const char *params = imap->custom; in imap_parse_custom_request()
2103 imap->custom_params = strdup(params); in imap_parse_custom_request()
2104 imap->custom[params - imap->custom] = '\0'; in imap_parse_custom_request()
2106 if(!imap->custom_params) in imap_parse_custom_request()