40 #include <gdk/gdkkeysyms.h> 44 #include <glib/gprintf.h> 47 #include <webkit2/webkit2.h> 48 #if WEBKIT_CHECK_VERSION(2, 21, 1) 55 #define GET_PLUGIN_DATA(gp) (RemminaPluginWWWData *)g_object_get_data(G_OBJECT(gp), "plugin-data") 79 webkit_download_set_allow_overwrite(download, TRUE);
80 g_signal_connect(G_OBJECT(download),
"notify::response",
82 g_signal_connect(download,
"created-destination",
89 remmina_plugin_service->
debug(
"Download response received");
95 remmina_plugin_service->
debug(
"Download is finished");
96 const gchar *dest = webkit_download_get_destination(download);
104 WebKitPolicyDecision * decision,
105 WebKitPolicyDecisionType decision_type,
108 TRACE_CALL(__func__);
112 switch (decision_type) {
113 case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION:
116 case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION:
119 case WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
123 webkit_policy_decision_ignore(decision);
130 TRACE_CALL(__func__);
131 remmina_plugin_service->
debug(
"Policy decision navigation");
132 const gchar *
url = NULL;
133 WebKitNavigationAction *a =
134 webkit_navigation_policy_decision_get_navigation_action(
135 WEBKIT_NAVIGATION_POLICY_DECISION(decision));
137 switch (webkit_navigation_action_get_navigation_type(a)) {
138 case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED:
139 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_LINK_CLICKED");
140 url = webkit_uri_request_get_uri(
141 webkit_navigation_action_get_request(a));
142 remmina_plugin_service->
debug(
"url is %s ", url);
144 case WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED:
145 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED");
147 case WEBKIT_NAVIGATION_TYPE_BACK_FORWARD:
148 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_BACK_FORWARD");
150 case WEBKIT_NAVIGATION_TYPE_RELOAD:
151 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_RELOAD");
153 case WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED:
154 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED");
156 case WEBKIT_NAVIGATION_TYPE_OTHER:
157 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_OTHER");
161 if (webkit_navigation_policy_decision_get_frame_name(
162 WEBKIT_NAVIGATION_POLICY_DECISION(decision))) {
163 webkit_policy_decision_ignore(decision);
168 webkit_policy_decision_use(decision);
176 TRACE_CALL(__func__);
177 remmina_plugin_service->
debug(
"New web-view");
179 const gchar *
url = NULL;
184 switch (webkit_navigation_action_get_navigation_type(a)) {
185 case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED:
186 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_LINK_CLICKED");
187 url = webkit_uri_request_get_uri(
188 webkit_navigation_action_get_request(a));
189 remmina_plugin_service->
debug(
"Downloading url %s ", url);
190 WebKitDownload *d = webkit_web_view_download_uri(gpdata->
webview, url);
193 case WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED:
194 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED");
196 case WEBKIT_NAVIGATION_TYPE_BACK_FORWARD:
197 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_BACK_FORWARD");
199 case WEBKIT_NAVIGATION_TYPE_RELOAD:
200 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_RELOAD");
202 case WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED:
203 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED");
207 url = webkit_uri_request_get_uri(
208 webkit_navigation_action_get_request(a));
209 remmina_plugin_service->
debug(
"Trying to open url: %s", url);
210 webkit_web_view_load_uri(gpdata->
webview, url);
212 case WEBKIT_NAVIGATION_TYPE_OTHER:
213 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_OTHER");
217 url = webkit_uri_request_get_uri(
218 webkit_navigation_action_get_request(a));
219 remmina_plugin_service->
debug(
"Trying to open url: %s", url);
220 webkit_web_view_load_uri(gpdata->
webview, url);
225 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE is %d", webkit_navigation_action_get_navigation_type(a));
230 TRACE_CALL(__func__);
231 remmina_plugin_service->
debug(
"Policy decision new window");
233 const gchar *
url = NULL;
238 WebKitNavigationAction *a =
239 webkit_navigation_policy_decision_get_navigation_action(
240 WEBKIT_NAVIGATION_POLICY_DECISION(decision));
242 switch (webkit_navigation_action_get_navigation_type(a)) {
243 case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED:
244 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_LINK_CLICKED");
245 url = webkit_uri_request_get_uri(
246 webkit_navigation_action_get_request(a));
247 remmina_plugin_service->
debug(
"Downloading url %s ", url);
248 WebKitDownload *d = webkit_web_view_download_uri(gpdata->
webview, url);
252 case WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED:
253 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED");
255 case WEBKIT_NAVIGATION_TYPE_BACK_FORWARD:
256 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_BACK_FORWARD");
258 case WEBKIT_NAVIGATION_TYPE_RELOAD:
259 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_RELOAD");
261 case WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED:
262 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED");
266 url = webkit_uri_request_get_uri(
267 webkit_navigation_action_get_request(a));
268 remmina_plugin_service->
debug(
"Trying to open url: %s", url);
269 webkit_web_view_load_uri(gpdata->
webview, url);
271 case WEBKIT_NAVIGATION_TYPE_OTHER:
272 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE_OTHER");
276 url = webkit_uri_request_get_uri(
277 webkit_navigation_action_get_request(a));
278 remmina_plugin_service->
debug(
"Trying to open url: %s", url);
279 webkit_web_view_load_uri(gpdata->
webview, url);
284 remmina_plugin_service->
debug(
"WEBKIT_NAVIGATION_TYPE is %d", webkit_navigation_action_get_navigation_type(a));
286 webkit_policy_decision_ignore(decision);
290 TRACE_CALL(__func__);
291 remmina_plugin_service->
debug(
"Policy decision resource");
292 WebKitResponsePolicyDecision *response_decision =
293 WEBKIT_RESPONSE_POLICY_DECISION(decision);
294 WebKitURIResponse *response =
295 webkit_response_policy_decision_get_response(response_decision);;
296 const gchar *request_uri = webkit_uri_response_get_uri(response);
299 WebKitWebResource *main_resource;
301 const char *mime_type;
306 mime_type = webkit_uri_response_get_mime_type(response);
308 remmina_plugin_service->
debug(
"The media type is %s", mime_type);
312 if (webkit_response_policy_decision_is_mime_type_supported(response_decision))
316 request = webkit_response_policy_decision_get_request(response_decision);
317 request_uri = webkit_uri_request_get_uri(request);
318 main_resource = webkit_web_view_get_main_resource(gpdata->
webview);
319 if (g_strcmp0(webkit_web_resource_get_uri(main_resource), request_uri) != 0)
323 if (!strcmp(mime_type,
"text/html") || !strcmp(mime_type,
"text/plain"))
325 else if (!strcmp(mime_type,
"application/xhtml+xml"))
327 else if (!strncmp(mime_type,
"image/", 6))
329 else if (!strncmp(mime_type,
"application/octet-stream", 6))
332 remmina_plugin_service->
debug(
"Document type is %i", type);
343 webkit_policy_decision_download(decision);
349 TRACE_CALL(__func__);
353 WebKitJavascriptResult *js_result;
354 GError *error = NULL;
356 js_result = webkit_web_view_run_javascript_finish(WEBKIT_WEB_VIEW(
object), result, &error);
358 g_warning(
"Could not run JavaScript code: %s", error->message);
363 #if WEBKIT_CHECK_VERSION(2, 21, 1) 365 JSCValue *value = webkit_javascript_result_get_js_value(js_result);
366 if (jsc_value_is_string(value) || jsc_value_is_boolean(value)) {
367 JSCException *exception;
369 str_value = jsc_value_to_string(value);
370 exception = jsc_context_get_exception(jsc_value_get_context(value));
372 g_warning(
"Could not run JavaScript code: %s", jsc_exception_get_message(exception));
374 g_print(
"Script result: %s\n", str_value);
377 str_value = jsc_value_to_string(value);
378 g_warning(
"Received something other than a string from JavaScript: %s", str_value);
382 if (js_result) webkit_javascript_result_unref(js_result);
388 TRACE_CALL(__func__);
393 gchar *failing_uri, GTlsCertificate *certificate,
396 TRACE_CALL(__func__);
398 remmina_plugin_service->
debug(
"Ignoring certificate and return TRUE");
404 TRACE_CALL(__func__);
412 g_object_set_data_full(G_OBJECT(gp),
"plugin-data", gpdata, g_free);
422 datapath = g_build_path(
"/",
423 g_path_get_dirname(remmina_plugin_service->
file_get_path(remminafile)),
426 cache_dir = g_build_path(
"/", datapath,
"cache", NULL);
427 remmina_plugin_service->
debug(
"WWW data path is %s", datapath);
430 gchar *indexeddb_dir = g_build_filename(datapath,
"indexeddb", NULL);
431 gchar *local_storage_dir = g_build_filename(datapath,
"local_storage", NULL);
432 gchar *applications_dir = g_build_filename(datapath,
"applications", NULL);
433 gchar *websql_dir = g_build_filename(datapath,
"websql", NULL);
434 gpdata->
data_mgr = webkit_website_data_manager_new(
435 "disk-cache-directory", cache_dir,
436 "indexeddb-directory", indexeddb_dir,
437 "local-storage-directory", local_storage_dir,
438 "offline-application-cache-directory", applications_dir,
439 "websql-directory", websql_dir,
442 g_free(indexeddb_dir);
443 g_free(local_storage_dir);
444 g_free(applications_dir);
448 gpdata->
data_mgr = webkit_website_data_manager_new_ephemeral();
453 gpdata->
url = g_strdup(remmina_plugin_service->
file_get_string(remminafile,
"server"));
455 gpdata->
url =
"https://remmina.org";
456 g_info(
"URL is set to %s", gpdata->
url);
458 gpdata->
settings = webkit_settings_new();
459 gpdata->
context = webkit_web_context_new_with_website_data_manager(gpdata->
data_mgr);
465 webkit_settings_set_enable_developer_extras(gpdata->
settings, TRUE);
466 webkit_settings_set_enable_write_console_messages_to_stdout(gpdata->
settings, TRUE);
470 webkit_settings_set_allow_file_access_from_file_urls(gpdata->
settings, TRUE);
472 webkit_settings_set_allow_modal_dialogs(gpdata->
settings, TRUE);
474 webkit_settings_set_enable_caret_browsing(gpdata->
settings, TRUE);
476 webkit_settings_set_enable_html5_database(gpdata->
settings, TRUE);
479 if (remmina_plugin_service->
file_get_string(remminafile,
"user-agent")) {
480 gchar *useragent = g_strdup(remmina_plugin_service->
file_get_string(remminafile,
"user-agent"));
481 webkit_settings_set_user_agent(gpdata->
settings, useragent);
482 g_info(
"User Agent set to: %s", useragent);
486 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-java", FALSE)) {
487 webkit_settings_set_enable_java(gpdata->
settings, TRUE);
488 g_info(
"Enable Java");
491 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-smooth-scrolling", FALSE)) {
492 webkit_settings_set_enable_smooth_scrolling(gpdata->
settings, TRUE);
493 g_info(
"enable-smooth-scrolling enabled");
496 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-spatial-navigation", FALSE)) {
497 webkit_settings_set_enable_spatial_navigation(gpdata->
settings, TRUE);
498 g_info(
"enable-spatial-navigation enabled");
501 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-webaudio", FALSE)) {
502 webkit_settings_set_enable_webaudio(gpdata->
settings, TRUE);
503 g_info(
"enable-webaudio enabled");
506 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-plugins", FALSE)) {
507 webkit_settings_set_enable_plugins(gpdata->
settings, TRUE);
508 g_info(
"Enable plugins");
511 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-webgl", FALSE)) {
512 webkit_settings_set_enable_webgl(gpdata->
settings, TRUE);
513 webkit_settings_set_enable_accelerated_2d_canvas(gpdata->
settings, TRUE);
514 g_info(
"enable-webgl enabled");
517 if (remmina_plugin_service->
file_get_int(remminafile,
"ignore-tls-errors", FALSE)) {
518 webkit_web_context_set_tls_errors_policy(gpdata->
context, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
519 g_info(
"Ignore TLS errors");
521 if (remmina_plugin_service->
file_get_string(remminafile,
"proxy-url")) {
522 gchar *proxyurl = g_strdup(remmina_plugin_service->
file_get_string(remminafile,
"proxy-url"));
523 WebKitNetworkProxySettings *proxy_settings = webkit_network_proxy_settings_new (proxyurl, NULL);
524 webkit_web_context_set_network_proxy_settings(gpdata->
context, WEBKIT_NETWORK_PROXY_MODE_CUSTOM, proxy_settings);
525 webkit_network_proxy_settings_free(proxy_settings);
529 webkit_web_context_set_automation_allowed(gpdata->
context, TRUE);
530 webkit_settings_set_javascript_can_open_windows_automatically(gpdata->
settings, TRUE);
531 webkit_settings_set_allow_modal_dialogs(gpdata->
settings, TRUE);
537 if (!webkit_settings_get_enable_frame_flattening(gpdata->
settings)) {
538 webkit_settings_set_enable_frame_flattening(gpdata->
settings,
true);
540 webkit_settings_set_enable_resizable_text_areas(gpdata->
settings,
true);
542 g_signal_connect(G_OBJECT(gpdata->
context),
"download-started",
548 TRACE_CALL(__func__);
550 gchar *s_username, *s_password;
554 gboolean disablepasswordstoring;
559 g_info(
"Authenticate");
563 disablepasswordstoring = remmina_plugin_service->
file_get_int(remminafile,
"disablepasswordstoring", FALSE);
566 _(
"Enter WWW authentication credentials"),
571 if (ret == GTK_RESPONSE_OK) {
577 remmina_plugin_service->
file_set_string(remminafile,
"username", s_username);
578 remmina_plugin_service->
file_set_string(remminafile,
"password", s_password);
580 remmina_plugin_service->
file_set_string(remminafile,
"username", NULL);
581 remmina_plugin_service->
file_set_string(remminafile,
"password", NULL);
585 g_strdup(s_username),
586 g_strdup(s_password),
587 WEBKIT_CREDENTIAL_PERSISTENCE_FOR_SESSION);
588 webkit_authentication_request_authenticate(request, gpdata->
credentials);
591 if (s_username) g_free(s_username);
592 if (s_password) g_free(s_password);
604 TRACE_CALL(__func__);
610 gchar *www_js_file = NULL;
611 GError *error = NULL;
619 remmina_plugin_service->
debug(
"load-changed emitted");
622 const gchar *
const *dirs = g_get_system_data_dirs();
625 for (i = 0; dirs[i] != NULL; ++i) {
626 remmina_dir = g_build_path(
"/", dirs[i],
"remmina",
"res", NULL);
627 GDir *system_data_dir = g_dir_open(remmina_dir, 0, &error);
633 if (system_data_dir) {
634 g_dir_close(system_data_dir);
636 www_js_file = g_strdup_printf(
"%s/www-js.js", remmina_dir);
637 if (g_file_test(www_js_file, G_FILE_TEST_EXISTS))
644 switch (load_event) {
645 case WEBKIT_LOAD_STARTED:
646 remmina_plugin_service->
debug(
"Load started");
648 case WEBKIT_LOAD_REDIRECTED:
649 remmina_plugin_service->
debug(
"Load redirected");
651 case WEBKIT_LOAD_COMMITTED:
657 remmina_plugin_service->
debug(
"Load committed");
659 case WEBKIT_LOAD_FINISHED:
662 remmina_plugin_service->
debug(
"Load finished");
666 if (remmina_plugin_service->
file_get_string(remminafile,
"username") ||
668 remmina_plugin_service->
debug(
"Authentication is enabled");
671 if (g_file_get_contents(www_js_file, &s_js, NULL, &error)) {
672 jsstr = g_string_new(s_js);
679 s_js = g_string_free(jsstr, FALSE);
681 if (!s_js || s_js[0] ==
'\0') {
684 remmina_plugin_service->
debug(
"Trying to send this JavaScript: %s", s_js);
685 webkit_web_view_run_javascript(
695 remmina_plugin_service->
debug(
"Unable to read file: %s\n", error->message);
698 remmina_plugin_service->
debug(
"Unable to read file. No error returned from glib.\n");
709 TRACE_CALL(__func__);
713 webkit_web_view_stop_loading(gpdata->
webview);
714 webkit_web_view_try_close(gpdata->
webview);
716 if (gpdata->
url) g_free(gpdata->
url);
725 g_object_steal_data(G_OBJECT(gp),
"plugin-data");
733 TRACE_CALL(__func__);
742 gpdata->
box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
743 gtk_container_add(GTK_CONTAINER(gp), gpdata->
box);
747 gpdata->
webview = WEBKIT_WEB_VIEW(webkit_web_view_new_with_context(gpdata->
context));
750 if (remmina_plugin_service->
file_get_string(remminafile,
"username") ||
752 remmina_plugin_service->
debug(
"Authentication is enabled");
765 gtk_widget_set_hexpand(GTK_WIDGET(gpdata->
webview), TRUE);
766 gtk_widget_set_vexpand(GTK_WIDGET(gpdata->
webview), TRUE);
767 gtk_container_add(GTK_CONTAINER(gpdata->
box), GTK_WIDGET(gpdata->
webview));
768 webkit_web_view_load_uri(gpdata->
webview, gpdata->
url);
770 if (remmina_plugin_service->
file_get_int(remminafile,
"enable-webinspector", FALSE)) {
771 g_info(
"WebInspector enabled");
772 WebKitWebInspector *inspector = webkit_web_view_get_inspector(WEBKIT_WEB_VIEW(gpdata->
webview));
773 webkit_web_inspector_attach(inspector);
774 webkit_web_inspector_show(WEBKIT_WEB_INSPECTOR(inspector));
778 gtk_widget_show_all(gpdata->
box);
785 TRACE_CALL(__func__);
787 WebKitWebView *
webview = WEBKIT_WEB_VIEW(
object);
792 cairo_surface_t *surface;
796 GdkPixbuf *screenshot;
800 GDateTime *date = g_date_time_new_now_utc();
804 surface = webkit_web_view_get_snapshot_finish(WEBKIT_WEB_VIEW(webview), result, &err);
806 g_warning(
"An error happened generating the snapshot: %s\n", err->message);
808 width = cairo_image_surface_get_width(surface);
809 height = cairo_image_surface_get_height(surface);
812 screenshot = gdk_pixbuf_get_from_surface(surface, 0, 0, width, height);
813 if (screenshot == NULL)
814 remmina_plugin_service->
debug(
"WWW: gdk_pixbuf_get_from_surface failed");
816 pngstr = g_string_new(g_strdup_printf(
"%s/%s.png",
823 g_strdup_printf(
"%d", g_date_time_get_year(date)));
825 g_date_time_get_month(date)));
827 g_strdup_printf(
"%d", g_date_time_get_day_of_month(date)));
829 g_strdup_printf(
"%d", g_date_time_get_hour(date)));
831 g_strdup_printf(
"%d", g_date_time_get_minute(date)));
833 g_strdup_printf(
"%f", g_date_time_get_seconds(date)));
834 g_date_time_unref(date);
835 pngname = g_string_free(pngstr, FALSE);
836 remmina_plugin_service->
debug(
"Saving screenshot as %s", pngname);
838 cairo_surface_write_to_png(surface, pngname);
839 if (g_file_test(pngname, G_FILE_TEST_EXISTS))
842 cairo_surface_destroy(surface);
846 TRACE_CALL(__func__);
850 webkit_web_view_get_snapshot(gpdata->
webview,
851 WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT,
852 WEBKIT_SNAPSHOT_OPTIONS_NONE,
935 TRACE_CALL(__func__);
936 remmina_plugin_service = service;
938 bindtextdomain(GETTEXT_PACKAGE, REMMINA_RUNTIME_LOCALEDIR);
939 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)
void(* debug)(const gchar *fmt,...)
static gboolean remmina_plugin_www_on_auth(WebKitWebView *webview, WebKitAuthenticationRequest *request, RemminaProtocolWidget *gp)
typedefG_BEGIN_DECLS struct _RemminaFile RemminaFile
static 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)
static gboolean remmina_plugin_www_load_failed_tls_cb(WebKitWebView *webview, gchar *failing_uri, GTlsCertificate *certificate, GTlsCertificateFlags errors, 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 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)