summaryrefslogtreecommitdiff
path: root/Userland/Services/FileSystemAccessServer
AgeCommit message (Collapse)Author
2022-01-28Revert "FileSystemAccessServer: Display times in the local time zone"Timothy Flynn
This reverts commit fa016a72fd8f0288de02f3aa8e7834b08b8f2238.
2022-01-28FileSystemAccessServer: Display times in the user's local time zoneTimothy Flynn
2022-01-15LibCore+LibIPC+Everywhere: Return Stream::LocalSocket from LocalServersin-ack
This change unfortunately cannot be atomically made without a single commit changing everything. Most of the important changes are in LibIPC/Connection.cpp, LibIPC/ServerConnection.cpp and LibCore/LocalServer.cpp. The notable changes are: - IPCCompiler now generates the decode and decode_message functions such that they take a Core::Stream::LocalSocket instead of the socket fd. - IPC::Decoder now uses the receive_fd method of LocalSocket instead of doing system calls directly on the fd. - IPC::ConnectionBase and related classes now use the Stream API functions. - IPC::ServerConnection no longer constructs the socket itself; instead, a convenience macro, IPC_CLIENT_CONNECTION, is used in place of C_OBJECT and will generate a static try_create factory function for the ServerConnection subclass. The subclass is now responsible for passing the socket constructed in this function to its ServerConnection base; the socket is passed as the first argument to the constructor (as a NonnullOwnPtr<Core::Stream::LocalServer>) before any other arguments. - The functionality regarding taking over sockets from SystemServer has been moved to LibIPC/SystemServerTakeover.cpp. The Core::LocalSocket implementation of this functionality hasn't been deleted due to my intention of removing this class in the near future and to reduce noise on this (already quite noisy) PR.
2021-12-06LibIPC: Add IPC::take_over_accepted_client_from_system_server<Client>()Andreas Kling
This is an encapsulation of the common work done by all of our single-client IPC servers on startup: 1. Create a Core::LocalSocket, taking over an accepted fd. 2. Create an application-specific ClientConnection object, wrapping the socket. It's not a huge change in terms of lines saved, but I do feel that it improves expressiveness. :^)
2021-12-05Services: Cast unused IPC::new_client_connection() results to voidSam Atkins
These ones all manage their storage internally, whereas the WebContent and ImageDecoder ones require the caller to manage their lifetime. This distinction is not obvious to the user without looking through the code, so an API that makes this clearer would be nice.
2021-11-28Everywhere: Use default execpromises argument for Core::System::pledgeBrian Gianforcaro
2021-11-23LibCore: Make LocalSocket takeover mechanism return ErrorOr<T>Andreas Kling
2021-11-23LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCoreAndreas Kling
With this change, System::foo() becomes Core::System::foo(). Since LibCore builds on other systems than SerenityOS, we now have to make sure that wrappers work with just a standard C library underneath.
2021-11-23FileSystemAccessServer: Port to LibMain :^)Andreas Kling
2021-11-02Services: Fix visibility of Object-derivative constructorsBen Wiederhake
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult.
2021-09-16FileSystemAccessServer: Only compute basename when promptingBrian Gianforcaro
pvs-studio flagged this as a potential performance optimization, we only need to compute the basename when it's used.
2021-09-10FileSystemAccessServer: Allow read-only access without promptingMustafa Quraish
This commit adds a new request to the FileSystemAccessServer endpoint, allowing the clients to get read-only access to a file without getting a Dialog-box prompting the user for access. This is only meant to be used in cases where the user has asked specifically to open a file through the command-line arguments. In those cases, I believe it makes sense for the read-only access to be implicit. Always prompting the user gets a bit annoying, especially if you just quickly want to open a file through the CLI. The new request name has been made extremely specific to make sure that it's only used when appropriate.
2021-08-07FileSystemAccessServer: Add window title as parameter for opening fileTimothy
2021-08-03Everywhere: Replace most cases of exit() with Application::quit()Timothy
Application::quit() is nicer for most cases where exit() is used. Cases where exit() is used intentionally for early termination are left intact.
2021-07-18FileSystemAccessServer: Add expose_window_server_client_id()Timothy
This will expose the client id of the WindowServerConnection this instance of FileSystemAccessServer is using.
2021-07-18FileSystemAccessServer+TextEditor: Implement cross-process modal promptsTimothy
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.
2021-07-11FileSystemAccessServer: Return user_picked_value even on errorAdam Hodgen
If a user picks a file which can't be opened for some reason, we should still return the value, so client applications can report the error along with the chosen filepath.
2021-07-10FileSystemAccessServer: Add service for accessing veiled files nicelyTimothy
Adds new service FileSystemAccessServer which allows programs to request a file descriptor for any file on the file system. The user can be prompted to choose the path with a FilePicker, or the path can be provided by the application which will show a MessageBox showing the pid and name of the calling process and allows the user to approve or deny the request.