@@ -71,64 +71,7 @@ void api::OBS_API_getPerformanceStatistics(const v8::FunctionCallbackInfo<v8::Va
7171 return ;
7272}
7373
74- void api::OBS_API_getOBS_existingProfiles (const v8::FunctionCallbackInfo<v8::Value>& args)
75- {
76- auto conn = GetConnection ();
77- if (!conn)
78- return ;
79-
80- std::vector<ipc::value> response = conn->call_synchronous_helper (" API" , " OBS_API_getOBS_existingProfiles" , {});
81-
82- if (!ValidateResponse (response))
83- return ;
84-
85- v8::Local<v8::Array> existingProfiles = v8::Array::New (args.GetIsolate ());
86-
87- for (int i = 1 ; i < response.size (); i++) {
88- existingProfiles->Set (i, v8::String::NewFromUtf8 (args.GetIsolate (), response.at (i).value_str .c_str ()));
89- }
90-
91- args.GetReturnValue ().Set (existingProfiles);
92- }
93-
94- void api::OBS_API_getOBS_existingSceneCollections (const v8::FunctionCallbackInfo<v8::Value>& args)
95- {
96- auto conn = GetConnection ();
97- if (!conn)
98- return ;
99-
100- std::vector<ipc::value> response =
101- conn->call_synchronous_helper (" API" , " OBS_API_getOBS_existingSceneCollections" , {});
102-
103- if (!ValidateResponse (response))
104- return ;
105-
106- v8::Local<v8::Array> existingSceneCollections = v8::Array::New (args.GetIsolate ());
107-
108- for (int i = 1 ; i < response.size (); i++) {
109- existingSceneCollections->Set (i, v8::String::NewFromUtf8 (args.GetIsolate (), response.at (i).value_str .c_str ()));
110- }
111-
112- args.GetReturnValue ().Set (existingSceneCollections);
113- return ;
114- }
115-
116- void api::OBS_API_isOBS_installed (const v8::FunctionCallbackInfo<v8::Value>& args)
117- {
118- auto conn = GetConnection ();
119- if (!conn)
120- return ;
121-
122- std::vector<ipc::value> response = conn->call_synchronous_helper (" API" , " OBS_API_isOBS_installed" , {});
123-
124- if (!ValidateResponse (response))
125- return ;
126-
127- args.GetReturnValue ().Set (utilv8::ToValue (response[1 ].value_union .ui32 ));
128- }
129-
130- void api::SetWorkingDirectory (const v8::FunctionCallbackInfo<v8::Value>& args)
131- {
74+ void api::SetWorkingDirectory (const v8::FunctionCallbackInfo<v8::Value>& args) {
13275 Nan::Utf8String param0 (args[0 ]);
13376 std::string path = *param0;
13477
@@ -147,10 +90,6 @@ INITIALIZER(nodeobs_api)
14790 NODE_SET_METHOD (exports, " OBS_API_initAPI" , api::OBS_API_initAPI);
14891 NODE_SET_METHOD (exports, " OBS_API_destroyOBS_API" , api::OBS_API_destroyOBS_API);
14992 NODE_SET_METHOD (exports, " OBS_API_getPerformanceStatistics" , api::OBS_API_getPerformanceStatistics);
150- NODE_SET_METHOD (exports, " OBS_API_getOBS_existingProfiles" , api::OBS_API_getOBS_existingProfiles);
151- NODE_SET_METHOD (
152- exports, " OBS_API_getOBS_existingSceneCollections" , api::OBS_API_getOBS_existingSceneCollections);
153- NODE_SET_METHOD (exports, " OBS_API_isOBS_installed" , api::OBS_API_isOBS_installed);
15493 NODE_SET_METHOD (exports, " SetWorkingDirectory" , api::SetWorkingDirectory);
15594 });
15695}
0 commit comments