/* * Copyright (c) 2021, Kyle Pereira * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include #include #pragma once class ClipboardServerConnection final : public IPC::ServerConnection , public ClipboardClientEndpoint { C_OBJECT(ClipboardServerConnection); Function on_data_changed; RefPtr get_bitmap(); void set_bitmap(Gfx::Bitmap const& bitmap); private: ClipboardServerConnection() : IPC::ServerConnection(*this, "/tmp/portal/clipboard") { } virtual void clipboard_data_changed(String const&) override { on_data_changed(); } };