/* * Copyright (c) 2021, timmot * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include namespace FileSystemAccessServer { class ConnectionFromClient final : public IPC::ConnectionFromClient { C_OBJECT(ConnectionFromClient); public: ~ConnectionFromClient() override = default; virtual void die() override; private: explicit ConnectionFromClient(NonnullOwnPtr); virtual void request_file_read_only_approved(i32, i32, i32, DeprecatedString const&) override; virtual void request_file(i32, i32, i32, DeprecatedString const&, Core::File::OpenMode) override; virtual void prompt_open_file(i32, i32, i32, DeprecatedString const&, DeprecatedString const&, Core::File::OpenMode) override; virtual void prompt_save_file(i32, i32, i32, DeprecatedString const&, DeprecatedString const&, DeprecatedString const&, Core::File::OpenMode) override; void prompt_helper(i32, Optional const&, Core::File::OpenMode); RefPtr create_dummy_child_window(i32, i32); enum class ShouldPrompt { No, Yes }; void request_file_handler(i32, i32, i32, DeprecatedString const&, Core::File::OpenMode, ShouldPrompt); virtual Messages::FileSystemAccessServer::ExposeWindowServerClientIdResponse expose_window_server_client_id() override; HashMap m_approved_files; }; }