1 #include "NativeReanimatedModuleSpec.h"
2 
3 namespace reanimated {
4 
5 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_installCoreFunctions(
6     jsi::Runtime &rt,
7     TurboModule &turboModule,
8     const jsi::Value *args,
9     size_t count) {
10   static_cast<NativeReanimatedModuleSpec *>(&turboModule)
11     ->installCoreFunctions(rt, std::move(args[0]));
12   return jsi::Value::undefined();
13 }
14 
15 // SharedValue
16 
17 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_makeShareable(
18     jsi::Runtime &rt,
19     TurboModule &turboModule,
20     const jsi::Value *args,
21     size_t count) {
22   return static_cast<NativeReanimatedModuleSpec *>(&turboModule)
23     ->makeShareable(rt, std::move(args[0]));
24 }
25 
26 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_makeMutable(
27     jsi::Runtime &rt,
28     TurboModule &turboModule,
29     const jsi::Value *args,
30     size_t count) {
31   return static_cast<NativeReanimatedModuleSpec *>(&turboModule)
32     ->makeMutable(rt, std::move(args[0]));
33 }
34 
35 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_makeRemote(
36     jsi::Runtime &rt,
37     TurboModule &turboModule,
38     const jsi::Value *args,
39     size_t count) {
40   return static_cast<NativeReanimatedModuleSpec *>(&turboModule)
41     ->makeRemote(rt, std::move(args[0]));
42 }
43 
44 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_startMapper(
45     jsi::Runtime &rt,
46     TurboModule &turboModule,
47     const jsi::Value *args,
48     size_t count) {
49   return static_cast<NativeReanimatedModuleSpec *>(&turboModule)
50       ->startMapper(rt, std::move(args[0]), std::move(args[1]), std::move(args[2]));
51 }
52 
53 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_stopMapper(
54     jsi::Runtime &rt,
55     TurboModule &turboModule,
56     const jsi::Value *args,
57     size_t count) {
58   static_cast<NativeReanimatedModuleSpec *>(&turboModule)
59       ->stopMapper(rt, std::move(args[0]));
60   return jsi::Value::undefined();
61 }
62 
63 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_registerEventHandler(
64     jsi::Runtime &rt,
65     TurboModule &turboModule,
66     const jsi::Value *args,
67     size_t count) {
68   return static_cast<NativeReanimatedModuleSpec *>(&turboModule)
69       ->registerEventHandler(rt, std::move(args[0]), std::move(args[1]));
70 }
71 
72 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_unregisterEventHandler(
73     jsi::Runtime &rt,
74     TurboModule &turboModule,
75     const jsi::Value *args,
76     size_t count) {
77   static_cast<NativeReanimatedModuleSpec *>(&turboModule)
78       ->unregisterEventHandler(rt, std::move(args[0]));
79   return jsi::Value::undefined();
80 }
81 
82 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_getViewProp(
83     jsi::Runtime &rt,
84     TurboModule &turboModule,
85     const jsi::Value *args,
86     size_t count) {
87   static_cast<NativeReanimatedModuleSpec *>(&turboModule)
88         ->getViewProp(rt, std::move(args[0]), std::move(args[1]), std::move(args[2]));
89     return jsi::Value::undefined();
90 }
91 
92 NativeReanimatedModuleSpec::NativeReanimatedModuleSpec(std::shared_ptr<CallInvoker> jsInvoker)
93     : TurboModule("NativeReanimated", jsInvoker) {
94   methodMap_["installCoreFunctions"] = MethodMetadata{
95     1, __hostFunction_NativeReanimatedModuleSpec_installCoreFunctions};
96 
97 
98   methodMap_["makeShareable"] = MethodMetadata{
99       1, __hostFunction_NativeReanimatedModuleSpec_makeShareable};
100   methodMap_["makeMutable"] = MethodMetadata{
101       1, __hostFunction_NativeReanimatedModuleSpec_makeMutable};
102   methodMap_["makeRemote"] = MethodMetadata{
103       1, __hostFunction_NativeReanimatedModuleSpec_makeRemote};
104 
105 
106   methodMap_["startMapper"] = MethodMetadata{
107     3, __hostFunction_NativeReanimatedModuleSpec_startMapper};
108   methodMap_["stopMapper"] = MethodMetadata{
109     1, __hostFunction_NativeReanimatedModuleSpec_stopMapper};
110 
111   methodMap_["registerEventHandler"] = MethodMetadata{
112     2, __hostFunction_NativeReanimatedModuleSpec_registerEventHandler};
113   methodMap_["unregisterEventHandler"] = MethodMetadata{
114     1, __hostFunction_NativeReanimatedModuleSpec_unregisterEventHandler};
115 
116   methodMap_["getViewProp"] = MethodMetadata{
117     3, __hostFunction_NativeReanimatedModuleSpec_getViewProp};
118 }
119 
120 }
121 
122