mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-14 05:22:24 +00:00
SpiceAgent: Implement FileTransferData
messages
This commit is contained in:
parent
af91c75080
commit
d87f823a68
Notes:
sideshowbarker
2024-07-17 11:30:54 +09:00
Author: https://github.com/caoimhebyrne
Commit: d87f823a68
Pull-request: https://github.com/SerenityOS/serenity/pull/18834
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/drunderscore
Reviewed-by: https://github.com/supercomputer7
2 changed files with 43 additions and 0 deletions
|
@ -242,6 +242,28 @@ private:
|
|||
FileTransferStatus m_status;
|
||||
};
|
||||
|
||||
// Contains the file data sent from a file transfer request after it has been approved.
|
||||
class FileTransferDataMessage : public Message {
|
||||
public:
|
||||
static ErrorOr<FileTransferDataMessage> read_from_stream(AK::Stream& stream);
|
||||
|
||||
ErrorOr<String> debug_description() override;
|
||||
|
||||
u32 id() const { return m_id; }
|
||||
ByteBuffer const& contents() { return m_contents; }
|
||||
|
||||
private:
|
||||
FileTransferDataMessage(u32 id, ByteBuffer const& contents)
|
||||
: Message(Type::FileTransferData)
|
||||
, m_id(id)
|
||||
, m_contents(contents)
|
||||
{
|
||||
}
|
||||
|
||||
u32 m_id { 0 };
|
||||
ByteBuffer m_contents;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace AK {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue