1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibFileSystemAccessClient: Rename Result => DeprecatedResult

This precedes the addition of a new `Result`, using `Core::Stream::File`
instead `Core::File`.
This commit is contained in:
Lucas CHOLLET 2022-12-07 22:51:37 +01:00 committed by Linus Groh
parent 806a55eda1
commit c71fc0683f
2 changed files with 16 additions and 16 deletions

View file

@ -18,7 +18,7 @@
namespace FileSystemAccessClient {
using Result = ErrorOr<NonnullRefPtr<Core::File>>;
using DeprecatedResult = ErrorOr<NonnullRefPtr<Core::File>>;
class Client final
: public IPC::ConnectionToServer<FileSystemAccessClientEndpoint, FileSystemAccessServerEndpoint>
@ -26,10 +26,10 @@ class Client final
IPC_CLIENT_CONNECTION(Client, "/tmp/session/%sid/portal/filesystemaccess"sv)
public:
Result try_request_file_read_only_approved(GUI::Window* parent_window, DeprecatedString const& path);
Result try_request_file(GUI::Window* parent_window, DeprecatedString const& path, Core::OpenMode mode);
Result try_open_file(GUI::Window* parent_window, DeprecatedString const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), Core::OpenMode requested_access = Core::OpenMode::ReadOnly);
Result try_save_file(GUI::Window* parent_window, DeprecatedString const& name, DeprecatedString const ext, Core::OpenMode requested_access = Core::OpenMode::WriteOnly | Core::OpenMode::Truncate);
DeprecatedResult try_request_file_read_only_approved(GUI::Window* parent_window, DeprecatedString const& path);
DeprecatedResult try_request_file(GUI::Window* parent_window, DeprecatedString const& path, Core::OpenMode mode);
DeprecatedResult try_open_file(GUI::Window* parent_window, DeprecatedString const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), Core::OpenMode requested_access = Core::OpenMode::ReadOnly);
DeprecatedResult try_save_file(GUI::Window* parent_window, DeprecatedString const& name, DeprecatedString const ext, Core::OpenMode requested_access = Core::OpenMode::WriteOnly | Core::OpenMode::Truncate);
static Client& the();
@ -45,10 +45,10 @@ private:
virtual void handle_prompt_end(i32 request_id, i32 error, Optional<IPC::File> const& fd, Optional<DeprecatedString> const& chosen_file) override;
int get_new_id();
Result handle_promise(int);
DeprecatedResult handle_promise(int);
struct PromiseAndWindow {
RefPtr<Core::Promise<Result>> promise {};
RefPtr<Core::Promise<DeprecatedResult>> promise {};
GUI::Window* parent_window { nullptr };
};