about summary refs log tree commit diff
path: root/android/app/src/main/jni/MainComponentsRegistry.h
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-06-07 17:50:05 -0500
committerPaul Frazee <pfrazee@gmail.com>2022-06-07 17:50:05 -0500
commit47250e7ed7d608e499ae8f3ec99494269db30292 (patch)
treeaf6b1bacba4b8e56149505f49a4022a92e7025aa /android/app/src/main/jni/MainComponentsRegistry.h
downloadvoidsky-47250e7ed7d608e499ae8f3ec99494269db30292.tar.zst
Initial commit
Diffstat (limited to 'android/app/src/main/jni/MainComponentsRegistry.h')
-rw-r--r--android/app/src/main/jni/MainComponentsRegistry.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/android/app/src/main/jni/MainComponentsRegistry.h b/android/app/src/main/jni/MainComponentsRegistry.h
new file mode 100644
index 000000000..b3ddfe703
--- /dev/null
+++ b/android/app/src/main/jni/MainComponentsRegistry.h
@@ -0,0 +1,32 @@
+#pragma once
+
+#include <ComponentFactory.h>
+#include <fbjni/fbjni.h>
+#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
+#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
+
+namespace facebook {
+namespace react {
+
+class MainComponentsRegistry
+    : public facebook::jni::HybridClass<MainComponentsRegistry> {
+ public:
+  // Adapt it to the package you used for your Java class.
+  constexpr static auto kJavaDescriptor =
+      "Lcom/app/newarchitecture/components/MainComponentsRegistry;";
+
+  static void registerNatives();
+
+  MainComponentsRegistry(ComponentFactory *delegate);
+
+ private:
+  static std::shared_ptr<ComponentDescriptorProviderRegistry const>
+  sharedProviderRegistry();
+
+  static jni::local_ref<jhybriddata> initHybrid(
+      jni::alias_ref<jclass>,
+      ComponentFactory *delegate);
+};
+
+} // namespace react
+} // namespace facebook