+
+const char * ventoy_code_get_cur_language(void)
+{
+ return g_cur_language;
+}
+
+int ventoy_code_get_cur_part_style(void)
+{
+ return g_cur_part_style;
+}
+
+void ventoy_code_set_cur_part_style(int style)
+{
+ pthread_mutex_lock(&g_api_mutex);
+
+ g_cur_part_style = style;
+ ventoy_http_save_cfg();
+
+ pthread_mutex_unlock(&g_api_mutex);
+}
+
+int ventoy_code_get_cur_show_all(void)
+{
+ return g_cur_show_all;
+}
+
+void ventoy_code_set_cur_show_all(int show_all)
+{
+ pthread_mutex_lock(&g_api_mutex);
+
+ g_cur_show_all = show_all;
+ ventoy_http_save_cfg();
+
+ pthread_mutex_unlock(&g_api_mutex);
+}
+
+void ventoy_code_set_cur_language(const char *lang)
+{
+ pthread_mutex_lock(&g_api_mutex);
+
+ scnprintf(g_cur_language, "%s", lang);
+ ventoy_http_save_cfg();
+
+ pthread_mutex_unlock(&g_api_mutex);
+}
+
+void ventoy_code_refresh_device(void)
+{
+ if (g_current_progress == PT_FINISH)
+ {
+ g_disk_num = 0;
+ ventoy_disk_enumerate_all();
+ }
+}
+
+int ventoy_code_is_busy(void)
+{
+ return (g_current_progress == PT_FINISH) ? 0 : 1;
+}
+
+int ventoy_code_get_percent(void)
+{
+ return g_current_progress * 100 / PT_FINISH;
+}
+
+int ventoy_code_get_result(void)
+{
+ return g_cur_process_result;
+}
+
+void ventoy_code_save_cfg(void)
+{
+ ventoy_http_save_cfg();
+}