1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

Userland: Make IPC handlers return void if they don't have any outputs

This commit is contained in:
Gunnar Beutner 2021-05-02 05:20:28 +02:00 committed by Andreas Kling
parent 7cf2839a26
commit 889359b6f9
30 changed files with 180 additions and 225 deletions

View file

@ -28,25 +28,22 @@ void ClientConnection::die()
s_connections.remove(client_id());
}
Messages::NotificationServer::GreetResponse ClientConnection::handle(const Messages::NotificationServer::Greet&)
void ClientConnection::handle(const Messages::NotificationServer::Greet&)
{
return {};
}
Messages::NotificationServer::ShowNotificationResponse ClientConnection::handle(const Messages::NotificationServer::ShowNotification& message)
void ClientConnection::handle(const Messages::NotificationServer::ShowNotification& message)
{
auto window = NotificationWindow::construct(client_id(), message.text(), message.title(), message.icon());
window->show();
return {};
}
Messages::NotificationServer::CloseNotificationResponse ClientConnection::handle([[maybe_unused]] const Messages::NotificationServer::CloseNotification& message)
void ClientConnection::handle([[maybe_unused]] const Messages::NotificationServer::CloseNotification& message)
{
auto window = NotificationWindow::get_window_by_id(client_id());
if (window) {
window->close();
}
return {};
}
Messages::NotificationServer::UpdateNotificationIconResponse ClientConnection::handle(const Messages::NotificationServer::UpdateNotificationIcon& message)