mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
LibIMAP: Support for the SEARCH command
This commit is contained in:
parent
318709c8ca
commit
a6339297ec
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