diff options
author | Timothy <timmot@users.noreply.github.com> | 2021-07-18 23:48:52 +1000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-18 17:21:28 +0200 |
commit | f5e0475bdf3ce85be6854713edef4b9b2b167e90 (patch) | |
tree | 6ef55c63ab73b52f3e243d7f6f01b75977d47d8b /Userland/Services/FileSystemAccessServer | |
parent | 38594dde7901e8e3cd5d114251df08d12549ee54 (diff) | |
download | serenity-f5e0475bdf3ce85be6854713edef4b9b2b167e90.zip |
FileSystemAccessServer: Add expose_window_server_client_id()
This will expose the client id of the WindowServerConnection this
instance of FileSystemAccessServer is using.
Diffstat (limited to 'Userland/Services/FileSystemAccessServer')
3 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Services/FileSystemAccessServer/ClientConnection.cpp b/Userland/Services/FileSystemAccessServer/ClientConnection.cpp index aaa2e78055..2a5939a590 100644 --- a/Userland/Services/FileSystemAccessServer/ClientConnection.cpp +++ b/Userland/Services/FileSystemAccessServer/ClientConnection.cpp @@ -157,4 +157,9 @@ void ClientConnection::prompt_helper(Optional<String> const& user_picked_file, C } } +Messages::FileSystemAccessServer::ExposeWindowServerClientIdResponse ClientConnection::expose_window_server_client_id() +{ + return GUI::WindowServerConnection::the().expose_client_id(); +} + } diff --git a/Userland/Services/FileSystemAccessServer/ClientConnection.h b/Userland/Services/FileSystemAccessServer/ClientConnection.h index 9261bc029c..4dc3f77ef6 100644 --- a/Userland/Services/FileSystemAccessServer/ClientConnection.h +++ b/Userland/Services/FileSystemAccessServer/ClientConnection.h @@ -33,6 +33,8 @@ private: void prompt_helper(Optional<String> const&, Core::OpenMode const&); RefPtr<GUI::Window> create_dummy_child_window(i32, i32); + virtual Messages::FileSystemAccessServer::ExposeWindowServerClientIdResponse expose_window_server_client_id() override; + HashMap<String, Core::OpenMode> m_approved_files; }; diff --git a/Userland/Services/FileSystemAccessServer/FileSystemAccessServer.ipc b/Userland/Services/FileSystemAccessServer/FileSystemAccessServer.ipc index 15c3735d8e..9b0d68b4c0 100644 --- a/Userland/Services/FileSystemAccessServer/FileSystemAccessServer.ipc +++ b/Userland/Services/FileSystemAccessServer/FileSystemAccessServer.ipc @@ -6,4 +6,6 @@ endpoint FileSystemAccessServer request_file(i32 window_server_client_id, i32 window_id, String path, Core::OpenMode requested_access) =| prompt_open_file(i32 window_server_client_id, i32 window_id, String path_to_view, Core::OpenMode requested_access) =| prompt_save_file(i32 window_server_client_id, i32 window_id,String title, String ext, String path_to_view, Core::OpenMode requested_access) =| + + expose_window_server_client_id() => (i32 client_id) } |