2019-08-02 06:01:19 +03:00
|
|
|
/**
|
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-08-08 17:13:22 +03:00
|
|
|
#import "RCTImageResponseDelegate.h"
|
2019-08-02 06:01:19 +03:00
|
|
|
|
|
|
|
#include <react/imagemanager/ImageResponseObserver.h>
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
namespace facebook {
|
|
|
|
namespace react {
|
2019-08-08 17:13:22 +03:00
|
|
|
class RCTImageResponseObserverProxy : public ImageResponseObserver {
|
2019-08-02 06:01:19 +03:00
|
|
|
public:
|
2019-08-08 17:13:22 +03:00
|
|
|
RCTImageResponseObserverProxy(void *delegate);
|
2019-08-02 06:01:19 +03:00
|
|
|
void didReceiveImage(const ImageResponse &imageResponse) override;
|
|
|
|
void didReceiveProgress(float p) override;
|
|
|
|
void didReceiveFailure() override;
|
|
|
|
|
|
|
|
private:
|
2019-08-08 17:13:22 +03:00
|
|
|
__weak id<RCTImageResponseDelegate> delegate_;
|
2019-08-02 06:01:19 +03:00
|
|
|
};
|
|
|
|
} // namespace react
|
|
|
|
} // namespace facebook
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|