1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 04:34:58 +00:00
serenity/Userland/Services/NotificationServer/ClientConnection.h
Gunnar Beutner 5bb79ea0a7 Userland: Update IPC calls to use proxies
This updates all existing code to use the auto-generated client
methods instead of post_message/send_sync.
2021-05-03 21:14:40 +02:00

33 lines
1.2 KiB
C++

/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibIPC/ClientConnection.h>
#include <NotificationServer/NotificationClientEndpoint.h>
#include <NotificationServer/NotificationServerEndpoint.h>
namespace NotificationServer {
class ClientConnection final : public IPC::ClientConnection<NotificationClientEndpoint, NotificationServerEndpoint> {
C_OBJECT(ClientConnection)
public:
~ClientConnection() override;
virtual void die() override;
private:
explicit ClientConnection(NonnullRefPtr<Core::LocalSocket>, int client_id);
virtual void greet() override;
virtual void show_notification(String const&, String const&, Gfx::ShareableBitmap const&) override;
virtual void close_notification() override;
virtual Messages::NotificationServer::UpdateNotificationIconResponse update_notification_icon(Gfx::ShareableBitmap const&) override;
virtual Messages::NotificationServer::UpdateNotificationTextResponse update_notification_text(String const&, String const&) override;
virtual Messages::NotificationServer::IsShowingResponse is_showing() override;
};
}