/* * 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 { IPC_CLIENT_CONNECTION(Client, "/tmp/portal/image"); public: Optional decode_image(ReadonlyBytes); Function on_death; private: Client(NonnullOwnPtr); virtual void die() override; }; }