/* * 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 { IPC_CLIENT_CONNECTION(ClipboardServerConnection, "/tmp/portal/clipboard") public: Function on_data_changed; RefPtr get_bitmap(); void set_bitmap(Gfx::Bitmap const& bitmap); private: ClipboardServerConnection(NonnullOwnPtr socket) : IPC::ServerConnection(*this, move(socket)) { } virtual void clipboard_data_changed(String const&) override { on_data_changed(); } };