/* * Copyright (c) 2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace ImageDecoderClient { struct Frame { RefPtr bitmap; u32 duration { 0 }; }; struct DecodedImage { bool is_animated { false }; u32 loop_count { 0 }; Vector frames; }; class Client final : public IPC::ServerConnection , public ImageDecoderClientEndpoint { C_OBJECT(Client); public: virtual void handshake() override; Optional decode_image(const ByteBuffer&); Function on_death; private: Client(); virtual void die() override; virtual void handle(const Messages::ImageDecoderClient::Dummy&) override; }; }