mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 13:18:19 +00:00
LibIMAP: Support for the SEARCH command
This commit is contained in:
parent
318709c8ca
commit
a6339297ec
Notes:
sideshowbarker
2024-07-18 12:24:48 +09:00
Author: https://github.com/X-yl
Commit: a6339297ec
Pull-request: https://github.com/SerenityOS/serenity/pull/7735
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/MaxWipfli
Reviewed-by: https://github.com/alimpfard
5 changed files with 188 additions and 0 deletions
|
@ -182,6 +182,14 @@ void Parser::parse_untagged()
|
|||
parse_while([](u8 x) { return x != '\r'; });
|
||||
consume("\r\n");
|
||||
}
|
||||
} else if (try_consume("SEARCH")) {
|
||||
Vector<unsigned> ids;
|
||||
while (!try_consume("\r\n")) {
|
||||
consume(" ");
|
||||
auto id = parse_number();
|
||||
ids.append(id);
|
||||
}
|
||||
m_response.data().set_search_results(move(ids));
|
||||
} else if (try_consume("BYE")) {
|
||||
auto message = parse_while([](u8 x) { return x != '\r'; });
|
||||
consume("\r\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue