2026-06-11 06:15:14 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2026, Ladybird contributors
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2026-06-11 10:23:35 -03:00
|
|
|
#include <AK/Error.h>
|
|
|
|
|
#include <AK/JsonObject.h>
|
2026-06-11 06:15:14 -03:00
|
|
|
#include <AK/Optional.h>
|
|
|
|
|
#include <AK/String.h>
|
2026-06-11 10:12:37 -03:00
|
|
|
#include <LibDevTools/Forward.h>
|
2026-06-17 08:39:37 -03:00
|
|
|
#include <LibURL/Forward.h>
|
2026-06-11 06:15:14 -03:00
|
|
|
|
|
|
|
|
namespace DevTools {
|
|
|
|
|
|
2026-06-11 10:12:37 -03:00
|
|
|
DEVTOOLS_API Optional<String> storage_host_for_url(String const&);
|
2026-06-17 08:39:37 -03:00
|
|
|
DEVTOOLS_API Optional<String> storage_host_for_url(URL::URL const& url);
|
2026-06-11 10:12:37 -03:00
|
|
|
DEVTOOLS_API Optional<String> storage_host_name(String const&);
|
2026-06-11 06:15:14 -03:00
|
|
|
|
2026-06-12 07:27:57 -03:00
|
|
|
enum class StorageFieldType : u8 {
|
|
|
|
|
Immutable,
|
|
|
|
|
Mutable,
|
|
|
|
|
Hidden,
|
|
|
|
|
Private,
|
|
|
|
|
};
|
|
|
|
|
JsonObject define_storage_field(StringView name, StorageFieldType);
|
|
|
|
|
|
2026-06-11 10:23:35 -03:00
|
|
|
JsonObject to_storage_operation_result(Optional<String> const& error_string);
|
|
|
|
|
JsonObject to_storage_operation_result(ErrorOr<void> const& result);
|
|
|
|
|
|
2026-06-11 06:15:14 -03:00
|
|
|
}
|