summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDesktop/Launcher.cpp
AgeCommit message (Collapse)Author
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-02-25LibDesktop: Rename LaunchServerConnection=>ConnectionToLaunchServerItamar
This was done with CLion's automatic rename feature.
2022-02-25Userland: Rename IPC::ServerConnection=>IPC::ConnectionToServerItamar
This was done with CLion's automatic rename feature.
2022-01-21LibDesktop: Add Launcher::ensure_connection()Maciej
This can be use force connection at startup and not to leave 'unix' pledge all the time.
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-11-24LibDesktop: Make allowlist APIs return ErrorOr<void>Andreas Kling
This makes it very smooth to use TRY() when setting up these lists, as you can see in the rest of this commit. :^)
2021-11-17AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional)Andreas Kling
Also add slightly richer parse errors now that we can include a string literal with returned errors. This will allow us to use TRY() when working with JSON data.
2021-06-24Userland: Remove dummy IPC methodsGunnar Beutner
They're not used anywhere and are unnecessary boilerplate code. So let's remove them and update IPCCompiler to allow for empty endpoint declarations.
2021-05-23Userland: Mark subclasses of IPC::{Client,Server}Connection finalAndreas Kling
2021-05-23LibIPC: Remove unnecessary IPC::ServerConnection::handshake()Andreas Kling
This is no longer used by any of our IPC pairs.
2021-05-23LaunchServer: Remove unnecessary greet() messageAndreas Kling
2021-05-03Userland: Add try_* IPC handlersGunnar Beutner
This enables calling auto-generated IPC methods in a way that doesn't crash the client if the peer disconnects.
2021-05-03Userland: Use snake case names in .ipc filesGunnar Beutner
This updates all .ipc files to have snake case names for IPC methods.
2021-05-03Userland: Make IPC results with one return value available directlyGunnar Beutner
This changes client methods so that they return the IPC response's return value directly - instead of the response struct - for IPC methods which only have a single return value.
2021-05-03Userland: Update IPC calls to use proxiesGunnar Beutner
This updates all existing code to use the auto-generated client methods instead of post_message/send_sync.
2021-05-03Userland: Change IPC funcs to use plain arguments instead of a structGunnar Beutner
Instead of having a single overloaded handle method each method gets its own unique method name now.
2021-04-23AK: Rename adopt() to adopt_ref()Andreas Kling
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-20LibDesktop: Fail gracefully on allowlist failures instead of assertingIdan Horowitz
IPC::Connection::send_sync asserts that a response was received, so the current gracefull fail check was useless, as LibIPC would always assert before reaching it.
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-01LibIPC: Stop sending client ID to clientsAndreas Kling
The client ID is not useful to normal clients anymore, so stop telling everyone what their ID is.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling