mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
acda299453
Reviewed By: fkgozali Differential Revision: D23450649 fbshipit-source-id: 58265a2c7855a2f4371d68637f09a07921821adf
42 lines
780 B
C++
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
|