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
|
|
|
|
|
|
|
|
|
|
#include <LibIPC/ClientConnection.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 {
|
|
|
|
|
|
2021-05-03 08:33:59 -03:00
|
|
|
class ClientConnection final : public IPC::ClientConnection<NotificationClientEndpoint, NotificationServerEndpoint> {
|
2020-02-16 15:28:08 -03:00
|
|
|
C_OBJECT(ClientConnection)
|
|
|
|
|
public:
|
|
|
|
|
~ClientConnection() override;
|
|
|
|
|
|
|
|
|
|
virtual void die() override;
|
|
|
|
|
|
|
|
|
|
private:
|
2020-07-06 08:23:39 -03:00
|
|
|
explicit ClientConnection(NonnullRefPtr<Core::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
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|