2018-06-22 14:28:38 +00:00
|
|
|
/**
|
2018-09-11 22:27:47 +00:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2018-06-22 14:28:38 +00:00
|
|
|
*
|
|
|
|
* 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>
|
|
|
|
|
|
|
|
#include <fabric/imagemanager/ImageRequest.h>
|
|
|
|
#include <fabric/imagemanager/primitives.h>
|
|
|
|
|
|
|
|
namespace facebook {
|
|
|
|
namespace react {
|
|
|
|
|
|
|
|
class ImageManager;
|
|
|
|
|
|
|
|
using SharedImageManager = std::shared_ptr<ImageManager>;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Cross platform facade for iOS-specific RCTImageManager.
|
|
|
|
*/
|
|
|
|
class ImageManager {
|
|
|
|
public:
|
|
|
|
|
|
|
|
ImageManager(void *platformSpecificCounterpart);
|
|
|
|
~ImageManager();
|
|
|
|
|
|
|
|
ImageRequest requestImage(const ImageSource &imageSource) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void *self_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace react
|
|
|
|
} // namespace facebook
|