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
|
|
|
|
|
|
2022-12-04 18:02:33 +00:00
|
|
|
#include <AK/DeprecatedString.h>
|
2022-02-26 17:50:31 +01:00
|
|
|
#include <AK/Error.h>
|
|
|
|
|
#include <AK/Function.h>
|
|
|
|
|
#include <AK/RefCounted.h>
|
|
|
|
|
|
|
|
|
|
namespace Web {
|
|
|
|
|
|
|
|
|
|
class FileRequest : public RefCounted<FileRequest> {
|
|
|
|
|
public:
|
2022-12-04 18:02:33 +00:00
|
|
|
explicit FileRequest(DeprecatedString path);
|
2022-02-26 17:50:31 +01:00
|
|
|
|
2022-12-04 18:02:33 +00:00
|
|
|
DeprecatedString path() const;
|
2022-02-26 17:50:31 +01:00
|
|
|
|
|
|
|
|
Function<void(ErrorOr<i32>)> on_file_request_finish;
|
|
|
|
|
|
|
|
|
|
private:
|
2022-12-04 18:02:33 +00:00
|
|
|
DeprecatedString m_path {};
|
2022-02-26 17:50:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|