Files
react-native/ReactCommon/react/renderer/imagemanager/ImageResponse.h
T
Paige Sun acda299453 6/6 Log image-rendered for Fabric image logging
Reviewed By: fkgozali

Differential Revision: D23450649

fbshipit-source-id: 58265a2c7855a2f4371d68637f09a07921821adf
2020-09-11 15:09:12 -07:00

42 lines
780 B
C++

/*
* 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
#include <memory>
namespace facebook {
namespace react {
/*
* Represents retrieved image bitmap and any associated platform-specific info.
*/
class ImageResponse final {
public:
enum class Status {
Loading,
Completed,
Failed,
};
ImageResponse(
const std::shared_ptr<void> &image,
const std::shared_ptr<void> &metadata);
std::shared_ptr<void> getImage() const;
std::shared_ptr<void> getMetadata() const;
private:
std::shared_ptr<void> image_{};
std::shared_ptr<void> metadata_{};
};
} // namespace react
} // namespace facebook