Lines Matching refs:imapc

259   struct imap_conn *imapc = &conn->proto.imapc;  in imap_endofresp()  local
260 const char *id = imapc->resptag; in imap_endofresp()
280 switch(imapc->state) { in imap_endofresp()
333 switch(imapc->state) { in imap_endofresp()
360 char *message = Curl_dyn_ptr(&data->conn->proto.imapc.pp.recvbuf); in imap_get_message()
361 size_t len = data->conn->proto.imapc.pp.nfinal; in imap_get_message()
394 struct imap_conn *imapc = &data->conn->proto.imapc; in imap_state() local
416 if(imapc->state != newstate) in imap_state()
418 (void *)imapc, names[imapc->state], names[newstate]); in imap_state()
421 imapc->state = newstate; in imap_state()
435 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_capability() local
436 imapc->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanisms yet */ in imap_perform_capability()
437 imapc->sasl.authused = SASL_AUTH_NONE; /* Clear the auth. mechanism used */ in imap_perform_capability()
438 imapc->tls_supported = FALSE; /* Clear the TLS capability */ in imap_perform_capability()
476 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_upgrade_tls() local
488 imapc->ssldone = ssldone; in imap_perform_upgrade_tls()
489 if(imapc->state != IMAP_UPGRADETLS) in imap_perform_upgrade_tls()
492 if(imapc->ssldone) { in imap_perform_upgrade_tls()
575 struct imap_conn *imapc = &data->conn->proto.imapc; in imap_continue_authenticate() local
579 return Curl_pp_sendf(data, &imapc->pp, in imap_continue_authenticate()
592 struct imap_conn *imapc = &data->conn->proto.imapc; in imap_cancel_authenticate() local
596 return Curl_pp_sendf(data, &imapc->pp, "*"); in imap_cancel_authenticate()
611 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_authentication() local
616 if(imapc->preauth || in imap_perform_authentication()
617 !Curl_sasl_can_authenticate(&imapc->sasl, data)) { in imap_perform_authentication()
623 result = Curl_sasl_start(&imapc->sasl, data, imapc->ir_supported, &progress); in imap_perform_authentication()
628 else if(!imapc->login_disabled && (imapc->preftype & IMAP_TYPE_CLEARTEXT)) in imap_perform_authentication()
686 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform_select() local
690 Curl_safefree(imapc->mailbox); in imap_perform_select()
691 Curl_safefree(imapc->mailbox_uidvalidity); in imap_perform_select()
881 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_servergreet_resp() local
882 imapc->preauth = TRUE; in imap_state_servergreet_resp()
900 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_capability_resp() local
901 const char *line = Curl_dyn_ptr(&imapc->pp.recvbuf); in imap_state_capability_resp()
930 imapc->tls_supported = TRUE; in imap_state_capability_resp()
934 imapc->login_disabled = TRUE; in imap_state_capability_resp()
938 imapc->ir_supported = TRUE; in imap_state_capability_resp()
951 imapc->sasl.authmechs |= mechbit; in imap_state_capability_resp()
959 if(imapcode == IMAP_RESP_OK && imapc->tls_supported && !imapc->preauth) { in imap_state_capability_resp()
987 if(data->conn->proto.imapc.pp.overflow) in imap_state_starttls_resp()
1011 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_auth_resp() local
1016 result = Curl_sasl_continue(&imapc->sasl, data, imapcode, &progress); in imap_state_auth_resp()
1023 if((!imapc->login_disabled) && (imapc->preftype & IMAP_TYPE_CLEARTEXT)) in imap_state_auth_resp()
1063 char *line = Curl_dyn_ptr(&data->conn->proto.imapc.pp.recvbuf); in imap_state_listsearch_resp()
1064 size_t len = data->conn->proto.imapc.pp.nfinal; in imap_state_listsearch_resp()
1086 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_select_resp() local
1087 const char *line = Curl_dyn_ptr(&data->conn->proto.imapc.pp.recvbuf); in imap_state_select_resp()
1103 Curl_safefree(imapc->mailbox_uidvalidity); in imap_state_select_resp()
1104 imapc->mailbox_uidvalidity = Curl_dyn_ptr(&uid); in imap_state_select_resp()
1110 if(imap->uidvalidity && imapc->mailbox_uidvalidity && in imap_state_select_resp()
1111 !strcasecompare(imap->uidvalidity, imapc->mailbox_uidvalidity)) { in imap_state_select_resp()
1117 DEBUGASSERT(!imapc->mailbox); in imap_state_select_resp()
1118 imapc->mailbox = strdup(imap->mailbox); in imap_state_select_resp()
1119 if(!imapc->mailbox) in imap_state_select_resp()
1144 struct imap_conn *imapc = &conn->proto.imapc; in imap_state_fetch_resp() local
1145 struct pingpong *pp = &imapc->pp; in imap_state_fetch_resp()
1146 const char *ptr = Curl_dyn_ptr(&data->conn->proto.imapc.pp.recvbuf); in imap_state_fetch_resp()
1147 size_t len = data->conn->proto.imapc.pp.nfinal; in imap_state_fetch_resp()
1302 struct imap_conn *imapc = &conn->proto.imapc; in imap_statemachine() local
1303 struct pingpong *pp = &imapc->pp; in imap_statemachine()
1308 if(imapc->state == IMAP_UPGRADETLS) in imap_statemachine()
1329 switch(imapc->state) { in imap_statemachine()
1331 result = imap_state_servergreet_resp(data, imapcode, imapc->state); in imap_statemachine()
1335 result = imap_state_capability_resp(data, imapcode, imapc->state); in imap_statemachine()
1339 result = imap_state_starttls_resp(data, imapcode, imapc->state); in imap_statemachine()
1343 result = imap_state_auth_resp(data, conn, imapcode, imapc->state); in imap_statemachine()
1347 result = imap_state_login_resp(data, imapcode, imapc->state); in imap_statemachine()
1352 result = imap_state_listsearch_resp(data, imapcode, imapc->state); in imap_statemachine()
1356 result = imap_state_select_resp(data, imapcode, imapc->state); in imap_statemachine()
1360 result = imap_state_fetch_resp(data, conn, imapcode, imapc->state); in imap_statemachine()
1364 result = imap_state_fetch_final_resp(data, imapcode, imapc->state); in imap_statemachine()
1368 result = imap_state_append_resp(data, imapcode, imapc->state); in imap_statemachine()
1372 result = imap_state_append_final_resp(data, imapcode, imapc->state); in imap_statemachine()
1381 } while(!result && imapc->state != IMAP_STOP && Curl_pp_moredata(pp)); in imap_statemachine()
1391 struct imap_conn *imapc = &conn->proto.imapc; in imap_multi_statemach() local
1393 if((conn->handler->flags & PROTOPT_SSL) && !imapc->ssldone) { in imap_multi_statemach()
1396 imapc->ssldone = ssldone; in imap_multi_statemach()
1401 result = Curl_pp_statemach(data, &imapc->pp, FALSE, FALSE); in imap_multi_statemach()
1402 *done = (imapc->state == IMAP_STOP); in imap_multi_statemach()
1412 struct imap_conn *imapc = &conn->proto.imapc; in imap_block_statemach() local
1414 while(imapc->state != IMAP_STOP && !result) in imap_block_statemach()
1415 result = Curl_pp_statemach(data, &imapc->pp, TRUE, disconnecting); in imap_block_statemach()
1439 return Curl_pp_getsock(data, &conn->proto.imapc.pp, socks); in imap_getsock()
1456 struct imap_conn *imapc = &conn->proto.imapc; in imap_connect() local
1457 struct pingpong *pp = &imapc->pp; in imap_connect()
1467 imapc->preftype = IMAP_TYPE_ANY; in imap_connect()
1468 Curl_sasl_init(&imapc->sasl, data, &saslimap); in imap_connect()
1470 Curl_dyn_init(&imapc->dyn, DYN_IMAP_CMD); in imap_connect()
1482 strcpy(imapc->resptag, "*"); in imap_connect()
1523 result = Curl_pp_sendf(data, &conn->proto.imapc.pp, "%s", ""); in imap_done()
1564 struct imap_conn *imapc = &conn->proto.imapc; in imap_perform() local
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()
1658 struct imap_conn *imapc = &conn->proto.imapc; in imap_disconnect() local
1673 Curl_pp_disconnect(&imapc->pp); in imap_disconnect()
1674 Curl_dyn_free(&imapc->dyn); in imap_disconnect()
1677 Curl_sasl_cleanup(conn, imapc->sasl.authused); in imap_disconnect()
1680 Curl_safefree(imapc->mailbox); in imap_disconnect()
1681 Curl_safefree(imapc->mailbox_uidvalidity); in imap_disconnect()
1775 struct imap_conn *imapc = &data->conn->proto.imapc; in imap_sendf() local
1780 msnprintf(imapc->resptag, sizeof(imapc->resptag), "%c%03d", in imap_sendf()
1782 ++imapc->cmdid); in imap_sendf()
1785 Curl_dyn_reset(&imapc->dyn); in imap_sendf()
1788 result = Curl_dyn_addf(&imapc->dyn, "%s %s", imapc->resptag, fmt); in imap_sendf()
1796 result = Curl_pp_vsendf(data, &imapc->pp, Curl_dyn_ptr(&imapc->dyn), ap); in imap_sendf()
1892 struct imap_conn *imapc = &conn->proto.imapc; in imap_parse_url_options() local
1911 imapc->sasl.prefmech = SASL_AUTH_NONE; in imap_parse_url_options()
1915 result = Curl_sasl_parse_url_auth_option(&imapc->sasl, in imap_parse_url_options()
1928 imapc->preftype = IMAP_TYPE_CLEARTEXT; in imap_parse_url_options()
1930 switch(imapc->sasl.prefmech) { in imap_parse_url_options()
1932 imapc->preftype = IMAP_TYPE_NONE; in imap_parse_url_options()
1935 imapc->preftype = IMAP_TYPE_ANY; in imap_parse_url_options()
1938 imapc->preftype = IMAP_TYPE_SASL; in imap_parse_url_options()