UNPKG

645 Btext/x-cView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#pragma once
9
10#include <memory>
11
12namespace facebook {
13namespace react {
14
15/*
16 * Represents retrieved image bitmap and any assotiated platform-specific info.
17 */
18class ImageResponse final {
19 public:
20 enum class Status {
21 Loading,
22 Completed,
23 Failed,
24 };
25
26 ImageResponse(const std::shared_ptr<void> &image);
27
28 std::shared_ptr<void> getImage() const;
29
30 private:
31 std::shared_ptr<void> image_{};
32};
33
34} // namespace react
35} // namespace facebook