2022-02-26 17:50:31 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, Lucas Chollet <lucas.chollet@free.fr>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-12-16 17:49:34 +03:30
|
|
|
#include <AK/ByteString.h>
|
2022-02-26 17:50:31 +01:00
|
|
|
#include <AK/Error.h>
|
|
|
|
#include <AK/Function.h>
|
|
|
|
|
|
|
|
namespace Web {
|
|
|
|
|
2023-01-30 16:35:47 -05:00
|
|
|
class FileRequest {
|
2022-02-26 17:50:31 +01:00
|
|
|
public:
|
2024-05-17 17:14:06 -07:00
|
|
|
FileRequest(ByteString path, ESCAPING Function<void(ErrorOr<i32>)> on_file_request_finish);
|
2022-02-26 17:50:31 +01:00
|
|
|
|
2023-12-16 17:49:34 +03:30
|
|
|
ByteString path() const;
|
2022-02-26 17:50:31 +01:00
|
|
|
|
|
|
|
Function<void(ErrorOr<i32>)> on_file_request_finish;
|
|
|
|
|
|
|
|
private:
|
2023-12-16 17:49:34 +03:30
|
|
|
ByteString m_path {};
|
2022-02-26 17:50:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|