2020-02-16 15:28:08 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-02-16 15:28:08 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-02-25 07:18:30 -03:00
|
|
|
#include <LibIPC/ConnectionFromClient.h>
|
2021-06-15 00:19:56 -03:00
|
|
|
#include <WindowServer/ScreenLayout.h>
|
|
|
|
|
|
|
|
|
|
// Must be included after WindowServer/ScreenLayout.h
|
2020-09-12 06:44:00 -03:00
|
|
|
#include <NotificationServer/NotificationClientEndpoint.h>
|
2020-02-16 15:28:08 -03:00
|
|
|
#include <NotificationServer/NotificationServerEndpoint.h>
|
|
|
|
|
|
|
|
|
|
namespace NotificationServer {
|
|
|
|
|
|
2022-02-25 07:18:30 -03:00
|
|
|
class ConnectionFromClient final : public IPC::ConnectionFromClient<NotificationClientEndpoint, NotificationServerEndpoint> {
|
|
|
|
|
C_OBJECT(ConnectionFromClient)
|
2020-02-16 15:28:08 -03:00
|
|
|
public:
|
2022-03-23 23:58:03 -03:00
|
|
|
~ConnectionFromClient() override = default;
|
2020-02-16 15:28:08 -03:00
|
|
|
|
|
|
|
|
virtual void die() override;
|
|
|
|
|
|
|
|
|
|
private:
|
2022-02-25 07:18:30 -03:00
|
|
|
explicit ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket>, int client_id);
|
2020-02-16 15:28:08 -03:00
|
|
|
|
2021-05-02 14:54:34 -03:00
|
|
|
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;
|
2020-02-16 15:28:08 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|