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

SpiceAgent: Implement FileTransferData messages

This commit is contained in:
Caoimhe 2023-05-19 23:32:04 +01:00 committed by Andreas Kling
parent af91c75080
commit d87f823a68
2 changed files with 43 additions and 0 deletions

View file

@ -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 {