1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 12:47:35 +00:00

LibIMAP: Support for remaining IMAP commands

These include APPEND, AUTHENTICATE, CHECK, CLOSE, EXAMINE, EXPUNGE,
LSUB, SUBSCRIBE, UNSUBSCRIBE
This commit is contained in:
x-yl 2021-06-02 18:53:08 +04:00 committed by Ali Mohammad Pur
parent 16995dc3d9
commit 9174fabf05
4 changed files with 93 additions and 0 deletions

View file

@ -140,6 +140,9 @@ void Parser::parse_untagged()
} else if (data_type.matches("FETCH")) {
auto fetch_response = parse_fetch_response();
m_response.data().add_fetch_response(number.value(), move(fetch_response));
} else if (data_type.matches("EXPUNGE")) {
m_response.data().add_expunged(number.value());
consume("\r\n");
}
return;
}
@ -149,6 +152,9 @@ void Parser::parse_untagged()
} else if (try_consume("LIST")) {
auto item = parse_list_item();
m_response.data().add_list_item(move(item));
} else if (try_consume("LSUB")) {
auto item = parse_list_item();
m_response.data().add_lsub_item(move(item));
} else if (try_consume("FLAGS")) {
consume(" ");
auto flags = parse_list(+[](StringView x) { return String(x); });