Serenity Operating System
1/*
2 * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#pragma once
8
9#include <LibIPC/ConnectionFromClient.h>
10#include <NotificationServer/NotificationClientEndpoint.h>
11#include <NotificationServer/NotificationServerEndpoint.h>
12#include <WindowServer/ScreenLayout.h>
13
14namespace NotificationServer {
15
16class ConnectionFromClient final : public IPC::ConnectionFromClient<NotificationClientEndpoint, NotificationServerEndpoint> {
17 C_OBJECT(ConnectionFromClient)
18public:
19 ~ConnectionFromClient() override = default;
20
21 virtual void die() override;
22
23private:
24 explicit ConnectionFromClient(NonnullOwnPtr<Core::LocalSocket>, int client_id);
25
26 virtual void show_notification(DeprecatedString const&, DeprecatedString const&, Gfx::ShareableBitmap const&) override;
27 virtual void close_notification() override;
28 virtual Messages::NotificationServer::UpdateNotificationIconResponse update_notification_icon(Gfx::ShareableBitmap const&) override;
29 virtual Messages::NotificationServer::UpdateNotificationTextResponse update_notification_text(DeprecatedString const&, DeprecatedString const&) override;
30 virtual Messages::NotificationServer::IsShowingResponse is_showing() override;
31};
32
33}