40 #include <gdk/gdkkeysyms.h> 44 #include <glib/gprintf.h> 47 #include <webkit2/webkit2.h> 48 #if WEBKIT_CHECK_VERSION(2, 21, 1) 54 #define UNUSED(x) (void)(x) 56 #define GET_PLUGIN_DATA(gp) (RemminaPluginWWWData *)g_object_get_data(G_OBJECT(gp), "plugin-data") 80 webkit_download_set_allow_overwrite(download, TRUE);
81 g_signal_connect(G_OBJECT(download),
"notify::response",
83 g_signal_connect(download,
"created-destination",
90 REMMINA_PLUGIN_DEBUG(
"Download response received");
96 REMMINA_PLUGIN_DEBUG(
"Download is finished");
97 const gchar *dest = webkit_download_get_destination(download);
106 WebKitPolicyDecision * decision,
107 WebKitPolicyDecisionType decision_type,
110 TRACE_CALL(__func__);
114 switch (decision_type) {
115 case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION:
118 case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION:
121 case WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
125 webkit_policy_decision_ignore(decision);
132 TRACE_CALL(__func__);
133 REMMINA_PLUGIN_DEBUG(
"Policy decision navigation");
134 const gchar *
url = NULL;
135 WebKitNavigationAction *a =
136 webkit_navigation_policy_decision_get_navigation_action(
137 WEBKIT_NAVIGATION_POLICY_DECISION(decision));
139 switch (webkit_navigation_action_get_navigation_type(a)) {
140 case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED:
141 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_LINK_CLICKED");
142 url = webkit_uri_request_get_uri(
143 webkit_navigation_action_get_request(a));
144 REMMINA_PLUGIN_DEBUG(
"url is %s ", url);
146 case WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED:
147 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED");
149 case WEBKIT_NAVIGATION_TYPE_BACK_FORWARD:
150 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_BACK_FORWARD");
152 case WEBKIT_NAVIGATION_TYPE_RELOAD:
153 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_RELOAD");
155 case WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED:
156 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED");
158 case WEBKIT_NAVIGATION_TYPE_OTHER:
159 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_OTHER");
163 if (webkit_navigation_policy_decision_get_frame_name(
164 WEBKIT_NAVIGATION_POLICY_DECISION(decision))) {
165 webkit_policy_decision_ignore(decision);
170 webkit_policy_decision_use(decision);
178 TRACE_CALL(__func__);
179 REMMINA_PLUGIN_DEBUG(
"New web-view");
181 const gchar *
url = NULL;
187 switch (webkit_navigation_action_get_navigation_type(a)) {
188 case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED:
189 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_LINK_CLICKED");
190 url = webkit_uri_request_get_uri(
191 webkit_navigation_action_get_request(a));
192 REMMINA_PLUGIN_DEBUG(
"Downloading url %s ", url);
193 WebKitDownload *d = webkit_web_view_download_uri(gpdata->
webview, url);
197 case WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED:
198 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED");
200 case WEBKIT_NAVIGATION_TYPE_BACK_FORWARD:
201 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_BACK_FORWARD");
203 case WEBKIT_NAVIGATION_TYPE_RELOAD:
204 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_RELOAD");
206 case WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED:
207 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED");
211 url = webkit_uri_request_get_uri(
212 webkit_navigation_action_get_request(a));
213 REMMINA_PLUGIN_DEBUG(
"Trying to open url: %s", url);
214 webkit_web_view_load_uri(gpdata->
webview, url);
216 case WEBKIT_NAVIGATION_TYPE_OTHER:
217 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_OTHER");
221 url = webkit_uri_request_get_uri(
222 webkit_navigation_action_get_request(a));
223 REMMINA_PLUGIN_DEBUG(
"Trying to open url: %s", url);
224 webkit_web_view_load_uri(gpdata->
webview, url);
229 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE is %d", webkit_navigation_action_get_navigation_type(a));
234 TRACE_CALL(__func__);
235 REMMINA_PLUGIN_DEBUG(
"Policy decision new window");
237 const gchar *
url = NULL;
243 WebKitNavigationAction *a =
244 webkit_navigation_policy_decision_get_navigation_action(
245 WEBKIT_NAVIGATION_POLICY_DECISION(decision));
247 switch (webkit_navigation_action_get_navigation_type(a)) {
248 case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED:
249 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_LINK_CLICKED");
250 url = webkit_uri_request_get_uri(
251 webkit_navigation_action_get_request(a));
252 REMMINA_PLUGIN_DEBUG(
"Downloading url %s ", url);
253 WebKitDownload *d = webkit_web_view_download_uri(gpdata->
webview, url);
258 case WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED:
259 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED");
261 case WEBKIT_NAVIGATION_TYPE_BACK_FORWARD:
262 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_BACK_FORWARD");
264 case WEBKIT_NAVIGATION_TYPE_RELOAD:
265 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_RELOAD");
267 case WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED:
268 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED");
272 url = webkit_uri_request_get_uri(
273 webkit_navigation_action_get_request(a));
274 REMMINA_PLUGIN_DEBUG(
"Trying to open url: %s", url);
275 webkit_web_view_load_uri(gpdata->
webview, url);
277 case WEBKIT_NAVIGATION_TYPE_OTHER:
278 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE_OTHER");
282 url = webkit_uri_request_get_uri(
283 webkit_navigation_action_get_request(a));
284 REMMINA_PLUGIN_DEBUG(
"Trying to open url: %s", url);
285 webkit_web_view_load_uri(gpdata->
webview, url);
290 REMMINA_PLUGIN_DEBUG(
"WEBKIT_NAVIGATION_TYPE is %d", webkit_navigation_action_get_navigation_type(a));
292 webkit_policy_decision_ignore(decision);
296 TRACE_CALL(__func__);
297 REMMINA_PLUGIN_DEBUG(
"Policy decision resource");
298 WebKitResponsePolicyDecision *response_decision =
299 WEBKIT_RESPONSE_POLICY_DECISION(decision);
300 WebKitURIResponse *response =
301 webkit_response_policy_decision_get_response(response_decision);;
302 const gchar *request_uri = webkit_uri_response_get_uri(response);
305 WebKitWebResource *main_resource;
307 const char *mime_type;
313 mime_type = webkit_uri_response_get_mime_type(response);
315 REMMINA_PLUGIN_DEBUG(
"The media type is %s", mime_type);
319 if (webkit_response_policy_decision_is_mime_type_supported(response_decision))
323 request = webkit_response_policy_decision_get_request(response_decision);
324 request_uri = webkit_uri_request_get_uri(request);
325 main_resource = webkit_web_view_get_main_resource(gpdata->
webview);
326 if (g_strcmp0(webkit_web_resource_get_uri(main_resource), request_uri) != 0)
330 if (!strcmp(mime_type,
"text/html") || !strcmp(mime_type,
"text/plain"))
332 else if (!strcmp(mime_type,
"application/xhtml+xml"))
334 else if (!strncmp(mime_type,
"image/", 6))
336 else if (!strncmp(mime_type,
"application/octet-stream", 6))
339 REMMINA_PLUGIN_DEBUG(
"Document type is %i", type);
350 webkit_policy_decision_download(decision);
356 TRACE_CALL(__func__);
358 WebKitJavascriptResult *js_result;
359 GError *error = NULL;
361 js_result = webkit_web_view_run_javascript_finish(WEBKIT_WEB_VIEW(
object), result, &error);
363 REMMINA_PLUGIN_DEBUG(
"Could not run JavaScript code: %s", error->message);
368 #if WEBKIT_CHECK_VERSION(2, 21, 1) 370 JSCValue *value = webkit_javascript_result_get_js_value(js_result);
371 if (jsc_value_is_string(value) || jsc_value_is_boolean(value)) {
372 JSCException *exception;
374 str_value = jsc_value_to_string(value);
375 exception = jsc_context_get_exception(jsc_value_get_context(value));
377 REMMINA_PLUGIN_DEBUG(
"Could not run JavaScript code: %s", jsc_exception_get_message(exception));
379 g_print(
"Script result: %s\n", str_value);
382 str_value = jsc_value_to_string(value);
383 REMMINA_PLUGIN_DEBUG(
"Received something other than a string from JavaScript: %s", str_value);
387 if (js_result) webkit_javascript_result_unref(js_result);
392 TRACE_CALL(__func__);
398 gchar *failing_uri, GTlsCertificate *certificate,
401 TRACE_CALL(__func__);
403 REMMINA_PLUGIN_DEBUG(
"Ignoring certificate and return TRUE");
409 TRACE_CALL(__func__);
417 g_object_set_data_full(G_OBJECT(gp),
"plugin-data", gpdata, g_free);
427 datapath = g_build_path(
"/",
428 g_path_get_dirname(remmina_plugin_service->
file_get_path(remminafile)),
431 cache_dir = g_build_path(
"/", datapath,
"cache", NULL);
432 REMMINA_PLUGIN_DEBUG(
"WWW data path is %s", datapath);
435 gchar *indexeddb_dir = g_build_filename(datapath,
"indexeddb", NULL);
436 gchar *local_storage_dir = g_build_filename(datapath,
"local_storage", NULL);
437 gchar *applications_dir = g_build_filename(datapath,
"applications", NULL);
438 gchar *websql_dir = g_build_filename(datapath,
"websql", NULL);
439 gpdata->
data_mgr = webkit_website_data_manager_new(
440 "disk-cache-directory", cache_dir,
441 "indexeddb-directory", indexeddb_dir,
442 "local-storage-directory", local_storage_dir,
443 "offline-application-cache-directory", applications_dir,
444 "websql-directory", websql_dir,
447 g_free(indexeddb_dir);
448 g_free(local_storage_dir);
449 g_free(applications_dir);
453 gpdata->
data_mgr = webkit_website_data_manager_new_ephemeral();
458 gpdata->
url = g_strdup(remmina_plugin_service->
file_get_string(remminafile,
"server"));
460 gpdata->
url =
"https://remmina.org";
461 REMMINA_PLUGIN_DEBUG(
"URL is set to %s", gpdata->
url);
463 gpdata->
settings = webkit_settings_new();
464 gpdata->
context = webkit_web_context_new_with_website_data_manager(gpdata->
data_mgr);
470 webkit_settings_set_enable_developer_extras(gpdata->
settings, TRUE);
471 webkit_settings_set_enable_write_console_messages_to_stdout(gpdata->
settings, TRUE);
475 webkit_settings_set_allow_file_access_from_file_urls(gpdata->
settings, TRUE);
477 webkit_settings_set_allow_modal_dialogs(gpdata->
settings, TRUE);
479 webkit_settings_set_enable_caret_browsing(gpdata->
settings, TRUE);
481 webkit_settings_set_enable_html5_database(gpdata->
settings, TRUE);
484 if (remmina_plugin_service->
file_get_string(remminafile,
"user-agent")) {
485 gchar *useragent = g_strdup(remmina_plugin_service->
file_get_string(remminafile,
"user-agent"));
486 webkit_settings_set_user_agent(gpdata->
settings, useragent);
487 REMMINA_PLUGIN_DEBUG(
"User Agent set to: %s", useragent);
491 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-java", FALSE)) {
492 webkit_settings_set_enable_java(gpdata->
settings, TRUE);
493 REMMINA_PLUGIN_DEBUG(
"Enable Java");
496 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-smooth-scrolling", FALSE)) {
497 webkit_settings_set_enable_smooth_scrolling(gpdata->
settings, TRUE);
498 REMMINA_PLUGIN_DEBUG(
"enable-smooth-scrolling enabled");
501 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-spatial-navigation", FALSE)) {
502 webkit_settings_set_enable_spatial_navigation(gpdata->
settings, TRUE);
503 REMMINA_PLUGIN_DEBUG(
"enable-spatial-navigation enabled");
506 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-webaudio", FALSE)) {
507 webkit_settings_set_enable_webaudio(gpdata->
settings, TRUE);
508 REMMINA_PLUGIN_DEBUG(
"enable-webaudio enabled");
511 #if WEBKIT_CHECK_VERSION(2, 32, 0) 513 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-plugins", FALSE)) {
514 webkit_settings_set_enable_plugins(gpdata->
settings, TRUE);
515 REMMINA_PLUGIN_DEBUG(
"Enable plugins");
519 #if WEBKIT_CHECK_VERSION(2, 32, 0) 521 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-webgl", FALSE)) {
522 webkit_settings_set_enable_webgl(gpdata->
settings, TRUE);
523 webkit_settings_set_enable_accelerated_2d_canvas(gpdata->
settings, TRUE);
524 REMMINA_PLUGIN_DEBUG(
"enable-webgl enabled");
528 if (remmina_plugin_service->
file_get_int(remminafile,
"ignore-tls-errors", FALSE)) {
529 #if WEBKIT_CHECK_VERSION(2, 32, 0) 530 webkit_website_data_manager_set_tls_errors_policy(
531 gpdata->
data_mgr, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
533 webkit_web_context_set_tls_errors_policy(
534 gpdata->
context, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
536 REMMINA_PLUGIN_DEBUG(
"Ignore TLS errors");
538 if (remmina_plugin_service->
file_get_string(remminafile,
"proxy-url")) {
539 gchar *proxyurl = g_strdup(remmina_plugin_service->
file_get_string(remminafile,
"proxy-url"));
540 WebKitNetworkProxySettings *proxy_settings = webkit_network_proxy_settings_new(proxyurl, NULL);
541 #if WEBKIT_CHECK_VERSION(2, 32, 0) 542 webkit_website_data_manager_set_network_proxy_settings(
543 gpdata->
data_mgr, WEBKIT_NETWORK_PROXY_MODE_CUSTOM, proxy_settings);
545 webkit_web_context_set_network_proxy_settings(
546 gpdata->
context, WEBKIT_NETWORK_PROXY_MODE_CUSTOM, proxy_settings);
548 webkit_network_proxy_settings_free(proxy_settings);
552 webkit_web_context_set_automation_allowed(gpdata->
context, TRUE);
553 webkit_settings_set_javascript_can_open_windows_automatically(gpdata->
settings, TRUE);
554 webkit_settings_set_allow_modal_dialogs(gpdata->
settings, TRUE);
556 #if !WEBKIT_CHECK_VERSION(2, 38, 0) 562 if (!webkit_settings_get_enable_frame_flattening(gpdata->
settings))
563 webkit_settings_set_enable_frame_flattening(gpdata->
settings,
true);
566 webkit_settings_set_enable_resizable_text_areas(gpdata->
settings,
true);
568 g_signal_connect(G_OBJECT(gpdata->
context),
"download-started",
574 TRACE_CALL(__func__);
576 gchar *s_username, *s_password;
580 gboolean disablepasswordstoring;
585 REMMINA_PLUGIN_DEBUG(
"Authenticate");
589 disablepasswordstoring = remmina_plugin_service->
file_get_int(remminafile,
"disablepasswordstoring", FALSE);
592 _(
"Enter WWW authentication credentials"),
597 if (ret == GTK_RESPONSE_OK) {
603 remmina_plugin_service->
file_set_string(remminafile,
"username", s_username);
604 remmina_plugin_service->
file_set_string(remminafile,
"password", s_password);
606 remmina_plugin_service->
file_set_string(remminafile,
"username", NULL);
607 remmina_plugin_service->
file_set_string(remminafile,
"password", NULL);
611 g_strdup(s_username),
612 g_strdup(s_password),
613 WEBKIT_CREDENTIAL_PERSISTENCE_FOR_SESSION);
614 webkit_authentication_request_authenticate(request, gpdata->
credentials);
617 if (s_username) g_free(s_username);
618 if (s_password) g_free(s_password);
630 TRACE_CALL(__func__);
636 gchar *www_js_file = NULL;
637 GError *error = NULL;
645 REMMINA_PLUGIN_DEBUG(
"load-changed emitted");
648 const gchar *
const *dirs = g_get_system_data_dirs();
652 for (i = 0; dirs[i] != NULL; ++i) {
653 remmina_dir = g_build_path(
"/", dirs[i],
"remmina",
"res", NULL);
654 GDir *system_data_dir = g_dir_open(remmina_dir, 0, &error);
660 if (system_data_dir) {
661 g_dir_close(system_data_dir);
663 www_js_file = g_strdup_printf(
"%s/www-js.js", remmina_dir);
664 if (g_file_test(www_js_file, G_FILE_TEST_EXISTS))
671 switch (load_event) {
672 case WEBKIT_LOAD_STARTED:
673 REMMINA_PLUGIN_DEBUG(
"Load started");
675 case WEBKIT_LOAD_REDIRECTED:
676 REMMINA_PLUGIN_DEBUG(
"Load redirected");
678 case WEBKIT_LOAD_COMMITTED:
684 REMMINA_PLUGIN_DEBUG(
"Load committed");
686 case WEBKIT_LOAD_FINISHED:
689 REMMINA_PLUGIN_DEBUG(
"Load finished");
693 if (remmina_plugin_service->
file_get_string(remminafile,
"username") ||
695 REMMINA_PLUGIN_DEBUG(
"Authentication is enabled");
698 if (g_file_get_contents(www_js_file, &s_js, NULL, &error)) {
699 jsstr = g_string_new(s_js);
706 s_js = g_string_free(jsstr, FALSE);
708 if (!s_js || s_js[0] ==
'\0') {
711 REMMINA_PLUGIN_DEBUG(
"Trying to send this JavaScript: %s", s_js);
712 webkit_web_view_run_javascript(
722 REMMINA_PLUGIN_DEBUG(
"Unable to read file: %s\n", error->message);
725 REMMINA_PLUGIN_DEBUG(
"Unable to read file. No error returned from glib.\n");
736 TRACE_CALL(__func__);
741 webkit_web_view_stop_loading(gpdata->
webview);
742 webkit_web_view_try_close(gpdata->
webview);
744 if (gpdata->
url) g_free(gpdata->
url);
753 g_object_steal_data(G_OBJECT(gp),
"plugin-data");
761 TRACE_CALL(__func__);
770 gpdata->
box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
771 gtk_container_add(GTK_CONTAINER(gp), gpdata->
box);
775 gpdata->
webview = WEBKIT_WEB_VIEW(webkit_web_view_new_with_context(gpdata->
context));
778 if (remmina_plugin_service->
file_get_string(remminafile,
"username") ||
780 REMMINA_PLUGIN_DEBUG(
"Authentication is enabled");
793 gtk_widget_set_hexpand(GTK_WIDGET(gpdata->
webview), TRUE);
794 gtk_widget_set_vexpand(GTK_WIDGET(gpdata->
webview), TRUE);
795 gtk_container_add(GTK_CONTAINER(gpdata->
box), GTK_WIDGET(gpdata->
webview));
796 webkit_web_view_load_uri(gpdata->
webview, gpdata->
url);
798 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-webinspector", FALSE)) {
799 REMMINA_PLUGIN_DEBUG(
"WebInspector enabled");
800 WebKitWebInspector *inspector = webkit_web_view_get_inspector(WEBKIT_WEB_VIEW(gpdata->
webview));
801 webkit_web_inspector_attach(inspector);
802 webkit_web_inspector_show(WEBKIT_WEB_INSPECTOR(inspector));
806 gtk_widget_show_all(gpdata->
box);
813 TRACE_CALL(__func__);
815 WebKitWebView *
webview = WEBKIT_WEB_VIEW(
object);
820 cairo_surface_t *surface;
824 GdkPixbuf *screenshot;
828 GDateTime *date = g_date_time_new_now_utc();
832 surface = webkit_web_view_get_snapshot_finish(WEBKIT_WEB_VIEW(webview), result, &err);
834 REMMINA_PLUGIN_DEBUG(
"An error happened generating the snapshot: %s\n", err->message);
836 width = cairo_image_surface_get_width(surface);
837 height = cairo_image_surface_get_height(surface);
840 screenshot = gdk_pixbuf_get_from_surface(surface, 0, 0, width, height);
841 if (screenshot == NULL)
842 REMMINA_PLUGIN_DEBUG(
"WWW: gdk_pixbuf_get_from_surface failed");
844 pngstr = g_string_new(g_strdup_printf(
"%s/%s.png",
851 g_strdup_printf(
"%d", g_date_time_get_year(date)));
853 g_date_time_get_month(date)));
855 g_strdup_printf(
"%d", g_date_time_get_day_of_month(date)));
857 g_strdup_printf(
"%d", g_date_time_get_hour(date)));
859 g_strdup_printf(
"%d", g_date_time_get_minute(date)));
861 g_strdup_printf(
"%f", g_date_time_get_seconds(date)));
862 g_date_time_unref(date);
863 pngname = g_string_free(pngstr, FALSE);
864 REMMINA_PLUGIN_DEBUG(
"Saving screenshot as %s", pngname);
866 cairo_surface_write_to_png(surface, pngname);
867 if (g_file_test(pngname, G_FILE_TEST_EXISTS))
870 cairo_surface_destroy(surface);
874 TRACE_CALL(__func__);
879 webkit_web_view_get_snapshot(gpdata->
webview,
880 WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT,
881 WEBKIT_SNAPSHOT_OPTIONS_NONE,
929 #if WEBKIT_CHECK_VERSION(2, 32, 0) 977 TRACE_CALL(__func__);
978 remmina_plugin_service = service;
980 bindtextdomain(GETTEXT_PACKAGE, REMMINA_RUNTIME_LOCALEDIR);
981 bind_textdomain_codeset(GETTEXT_PACKAGE,
"UTF-8");
static void remmina_plugin_www_save_snapshot(GObject *object, GAsyncResult *result, RemminaProtocolWidget *gp)
static void remmina_plugin_www_init(RemminaProtocolWidget *gp)
void remmina_plugin_www_decide_newwin(WebKitPolicyDecision *decision, RemminaProtocolWidget *gp)
WebKitCredential * credentials
gboolean formauthenticated
static gboolean remmina_plugin_www_close_connection(RemminaProtocolWidget *gp)
static gboolean remmina_plugin_www_get_snapshot(RemminaProtocolWidget *gp, RemminaPluginScreenshotData *rpsd)
static gboolean remmina_plugin_www_on_auth(WebKitWebView *webview, WebKitAuthenticationRequest *request, RemminaProtocolWidget *gp)
typedefG_BEGIN_DECLS struct _RemminaFile RemminaFile
RemminaPluginService * remmina_plugin_service
G_MODULE_EXPORT gboolean remmina_plugin_entry(RemminaPluginService *service)
static void remmina_plugin_www_form_auth(WebKitWebView *webview, WebKitLoadEvent load_event, RemminaProtocolWidget *gp)
WebKitWebContext * context
void(* protocol_plugin_signal_connection_closed)(RemminaProtocolWidget *gp)
gint(* file_get_int)(RemminaFile *remminafile, const gchar *setting, gint default_value)
static gboolean remmina_plugin_www_open_connection(RemminaProtocolWidget *gp)
guint www_utils_string_replace_all(GString *haystack, const gchar *needle, const gchar *replace)
Replaces all occurrences of needle in haystack with replace.
void(* protocol_plugin_signal_connection_opened)(RemminaProtocolWidget *gp)
WWWWebViewDocumentType document_type
static gboolean remmina_plugin_www_load_failed_tls_cb(WebKitWebView *webview, gchar *failing_uri, GTlsCertificate *certificate, GTlsCertificateFlags errors, RemminaProtocolWidget *gp) __attribute__((unused))
static const RemminaProtocolFeature remmina_www_features[]
gboolean(* protocol_plugin_init_get_savepassword)(RemminaProtocolWidget *gp)
gboolean(* register_plugin)(RemminaPlugin *plugin)
static const RemminaProtocolSetting remmina_plugin_www_basic_settings[]
static const RemminaProtocolSetting remmina_plugin_www_advanced_settings[]
static gboolean remmina_www_query_feature(RemminaProtocolWidget *gp, const RemminaProtocolFeature *feature)
void remmina_plugin_www_download_started(WebKitWebContext *context, WebKitDownload *download, RemminaProtocolWidget *gp)
gchar *(* pref_get_value)(const gchar *key)
WebKitLoadEvent load_event
gboolean remmina_plugin_www_decide_resource(WebKitPolicyDecision *decision, RemminaProtocolWidget *gp)
gint(* protocol_plugin_init_auth)(RemminaProtocolWidget *gp, RemminaMessagePanelFlags pflags, const gchar *title, const gchar *default_username, const gchar *default_password, const gchar *default_domain, const gchar *password_prompt)
struct _RemminaPluginWWWData RemminaPluginWWWData
RemminaFile *(* protocol_plugin_get_file)(RemminaProtocolWidget *gp)
const gchar *(* file_get_path)(RemminaFile *remminafile)
void remmina_plugin_www_decide_nav(WebKitPolicyDecision *decision, RemminaProtocolWidget *gp)
void remmina_plugin_www_response_received(WebKitDownload *download, GParamSpec *ps, RemminaProtocolWidget *gp)
static RemminaProtocolPlugin remmina_plugin
gchar *(* protocol_plugin_init_get_username)(RemminaProtocolWidget *gp)
gchar *(* protocol_plugin_init_get_password)(RemminaProtocolWidget *gp)
WebKitSettings * settings
void(* protocol_plugin_register_hostkey)(RemminaProtocolWidget *gp, GtkWidget *widget)
void www_utils_send_notification(const gchar *notification_id, const gchar *notification_title, const gchar *notification_message)
void(* file_set_string)(RemminaFile *remminafile, const gchar *setting, const gchar *value)
static gboolean remmina_plugin_www_decide_policy_cb(WebKitWebView *webview, WebKitPolicyDecision *decision, WebKitPolicyDecisionType decision_type, RemminaProtocolWidget *gp)
void remmina_plugin_www_notify_download(WebKitDownload *download, gchar *destination, RemminaProtocolWidget *gp)
const gchar *(* file_get_string)(RemminaFile *remminafile, const gchar *setting)
WebKitAuthenticationRequest * request
N_("Unable to connect to VNC server")
static void remmina_www_web_view_js_finished(GObject *object, GAsyncResult *result, gpointer user_data)
WebKitWebsiteDataManager * data_mgr
void remmina_plugin_www_on_create(WebKitWebView *webview, WebKitNavigationAction *a, RemminaProtocolWidget *gp)