/* * 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: Optional decode_image(const ByteBuffer&); Function on_death; private: Client(); virtual void die() override; virtual void dummy() override; }; }