UNPKG

680 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 <react/imagemanager/ImageResponse.h>
11
12namespace facebook {
13namespace react {
14
15/*
16 * Represents any observer of ImageResponse progression, completion, or failure.
17 */
18class ImageResponseObserver {
19 public:
20 virtual void didReceiveProgress(float) = 0;
21 virtual void didReceiveImage(const ImageResponse &imageResponse) = 0;
22 virtual void didReceiveFailure() = 0;
23 virtual ~ImageResponseObserver() noexcept = default;
24};
25
26} // namespace react
27} // namespace facebook