mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00

This transitions from synchronous IPC calls to asynchronous IPC calls provided through a synchronous interface in LibFileSystemAccessClient which allows the parent Application to stay responsive. It achieves this with Promise which is pumping the Application event loop while waiting for the Dialog to respond with the user's action. LibFileSystemAccessClient provides a lazy singleton which also ensures that FileSystemAccessServer is running in the event of a crash. This also transitions TextEditor into using LibFileSystemAccessClient.
9 lines
466 B
Text
9 lines
466 B
Text
#include <AK/URL.h>
|
|
#include <LibCore/IODevice.h>
|
|
|
|
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) =|
|
|
}
|