RCTBlobPlugins.mm 801 B

123456789101112131415161718192021222324252627282930313233
  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. * @generated by an internal plugin build system
  8. */
  9. #ifndef RN_DISABLE_OSS_PLUGIN_HEADER
  10. // OSS-compatibility layer
  11. #import "RCTBlobPlugins.h"
  12. #import <string>
  13. #import <unordered_map>
  14. Class RCTBlobClassProvider(const char *name) {
  15. static std::unordered_map<std::string, Class (*)(void)> sCoreModuleClassMap = {
  16. {"FileReaderModule", RCTFileReaderModuleCls},
  17. {"BlobModule", RCTBlobManagerCls},
  18. };
  19. auto p = sCoreModuleClassMap.find(name);
  20. if (p != sCoreModuleClassMap.end()) {
  21. auto classFunc = p->second;
  22. return classFunc();
  23. }
  24. return nil;
  25. }
  26. #endif // RN_DISABLE_OSS_PLUGIN_HEADER