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