@@ -37,18 +37,37 @@ struct EXTERNAL INativeJS : virtual public Core::IUnknown {
37
37
// @json:omit
38
38
virtual Core::hresult Deinitialize () = 0;
39
39
40
- /* * Launches the NativeJS plugin */
41
- // @text launchApplication
42
- // @brief Launch a NativeJS application.
43
- // @param url The URL of the application to launch.
44
- // @param options Additional options for launching the application.
45
- virtual Core::hresult LaunchApplication (const std::string url, const std::string options) = 0;
40
+ /* * Creates the NativeJS plugin */
41
+ // @text createApplication
42
+ // @brief Create a NativeJS application.
43
+ // @param options Additional options for creating the application.
44
+ // @param id This should have the id of the created application
45
+ virtual Core::hresult CreateApplication (const std::string options /* @in */ , uint32_t & id /* @out */ ) = 0;
46
+
47
+ /* * Run the created NativeJS plugin */
48
+ // @text runApplication
49
+ // @brief run a NativeJS application.
50
+ // @param id The ID for the application to run.
51
+ // @param url URL for the application to run.
52
+ virtual Core::hresult RunApplication (uint32_t id /* @in */ , const std::string url /* @in */ ) = 0;
53
+
54
+ /* * Run the created NativeJS plugin */
55
+ // @text runJavaScript
56
+ // @brief run a NativeJS code.
57
+ // @param id The ID for the code to run.
58
+ // @param options Additional options for creating the application.
59
+ virtual Core::hresult RunJavaScript (uint32_t id /* @in */ , const std::string code /* @in */ ) = 0;
60
+
61
+ /* * Get all the existing NativeJS plugin */
62
+ // @text getApplications
63
+ // @brief Get details of existing plugin.
64
+ virtual Core::hresult GetApplications () = 0;
46
65
47
66
/* * Stops the NativeJS plugin */
48
- // @text destroyApplication
67
+ // @text terminateApplication
49
68
// @brief Destroy a running NativeJS application.
50
- // @param url The URL of the application to destroy.
51
- virtual Core::hresult DestroyApplication ( const std::string url ) = 0;
69
+ // @param id The ID of the application to destroy.
70
+ virtual Core::hresult TerminateApplication ( uint32_t id /* @in */ ) = 0;
52
71
};
53
72
54
73
} // Exchange
0 commit comments