From 5933f71f43b45a5d4a63b583c00d571580db43e0 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 21 Aug 2008 15:00:40 -0400 Subject: [PATCH] Make daemon pass client sent password prompt to splash plugins They don't currently do anything with the message but they at least now get it so they conceivably could. --- src/libplybootsplash/ply-boot-splash-plugin.h | 1 + src/main.c | 4 +++- src/ply-boot-server.c | 1 + src/ply-boot-server.h | 1 + src/ply-boot-splash.c | 2 ++ src/ply-boot-splash.h | 1 + src/splash-plugins/details/plugin.c | 2 ++ src/splash-plugins/fade-in/plugin.c | 1 + src/splash-plugins/spinfinity/plugin.c | 1 + src/splash-plugins/text/plugin.c | 1 + 10 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/libplybootsplash/ply-boot-splash-plugin.h b/src/libplybootsplash/ply-boot-splash-plugin.h index cc4b39a0..920bdccb 100644 --- a/src/libplybootsplash/ply-boot-splash-plugin.h +++ b/src/libplybootsplash/ply-boot-splash-plugin.h @@ -54,6 +54,7 @@ typedef struct ply_window_t *window); void (* ask_for_password) (ply_boot_splash_plugin_t *plugin, + const char *prompt, ply_answer_t *answer); } ply_boot_splash_plugin_interface_t; diff --git a/src/main.c b/src/main.c index 205cad1c..afa0f82f 100644 --- a/src/main.c +++ b/src/main.c @@ -135,6 +135,7 @@ show_default_splash (state_t *state) static void on_ask_for_password (state_t *state, + const char *prompt, ply_answer_t *answer) { if (state->boot_splash == NULL) @@ -145,7 +146,8 @@ on_ask_for_password (state_t *state, return; } - ply_boot_splash_ask_for_password (state->boot_splash, answer); + ply_boot_splash_ask_for_password (state->boot_splash, + prompt, answer); } static void diff --git a/src/ply-boot-server.c b/src/ply-boot-server.c index 8d6dee0a..ce053bfa 100644 --- a/src/ply-boot-server.c +++ b/src/ply-boot-server.c @@ -302,6 +302,7 @@ ply_boot_connection_on_request (ply_boot_connection_t *connection) if (server->ask_for_password_handler != NULL) server->ask_for_password_handler (server->user_data, + argument, answer, server); /* will reply later diff --git a/src/ply-boot-server.h b/src/ply-boot-server.h index 9550ffe0..acc95dc6 100644 --- a/src/ply-boot-server.h +++ b/src/ply-boot-server.h @@ -50,6 +50,7 @@ typedef void (* ply_boot_server_password_answer_handler_t) (void *a const char *password, ply_boot_server_t *server); typedef void (* ply_boot_server_ask_for_password_handler_t) (void *user_data, + const char *prompt, ply_answer_t *answer, ply_boot_server_t *server); diff --git a/src/ply-boot-splash.c b/src/ply-boot-splash.c index 3fd63318..69b7c356 100644 --- a/src/ply-boot-splash.c +++ b/src/ply-boot-splash.c @@ -216,6 +216,7 @@ ply_boot_splash_update_output (ply_boot_splash_t *splash, void ply_boot_splash_ask_for_password (ply_boot_splash_t *splash, + const char *prompt, ply_answer_t *answer) { @@ -231,6 +232,7 @@ ply_boot_splash_ask_for_password (ply_boot_splash_t *splash, } splash->plugin_interface->ask_for_password (splash->plugin, + prompt, answer); } diff --git a/src/ply-boot-splash.h b/src/ply-boot-splash.h index 367af1e7..94c032ce 100644 --- a/src/ply-boot-splash.h +++ b/src/ply-boot-splash.h @@ -47,6 +47,7 @@ void ply_boot_splash_update_output (ply_boot_splash_t *splash, size_t size); void ply_boot_splash_ask_for_password (ply_boot_splash_t *splash, + const char *prompt, ply_answer_t *answer); void ply_boot_splash_hide (ply_boot_splash_t *splash); void ply_boot_splash_attach_to_event_loop (ply_boot_splash_t *splash, diff --git a/src/splash-plugins/details/plugin.c b/src/splash-plugins/details/plugin.c index ae52b152..50e13abe 100644 --- a/src/splash-plugins/details/plugin.c +++ b/src/splash-plugins/details/plugin.c @@ -57,6 +57,7 @@ #define BACKSPACE "\b\033[0K" void ask_for_password (ply_boot_splash_plugin_t *plugin, + const char *prompt, ply_answer_t *answer); ply_boot_splash_plugin_interface_t *ply_boot_splash_plugin_get_interface (void); @@ -217,6 +218,7 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin, void ask_for_password (ply_boot_splash_plugin_t *plugin, + const char *prompt, ply_answer_t *answer) { plugin->pending_password_answer = answer; diff --git a/src/splash-plugins/fade-in/plugin.c b/src/splash-plugins/fade-in/plugin.c index f7b75907..2641217e 100644 --- a/src/splash-plugins/fade-in/plugin.c +++ b/src/splash-plugins/fade-in/plugin.c @@ -627,6 +627,7 @@ show_password_entry (ply_boot_splash_plugin_t *plugin) void ask_for_password (ply_boot_splash_plugin_t *plugin, + const char *prompt, ply_answer_t *answer) { plugin->pending_password_answer = answer; diff --git a/src/splash-plugins/spinfinity/plugin.c b/src/splash-plugins/spinfinity/plugin.c index 3b76518f..f2653d55 100644 --- a/src/splash-plugins/spinfinity/plugin.c +++ b/src/splash-plugins/spinfinity/plugin.c @@ -446,6 +446,7 @@ show_password_entry (ply_boot_splash_plugin_t *plugin) void ask_for_password (ply_boot_splash_plugin_t *plugin, + const char *prompt, ply_answer_t *answer) { plugin->pending_password_answer = answer; diff --git a/src/splash-plugins/text/plugin.c b/src/splash-plugins/text/plugin.c index d5c011bb..4e85a575 100644 --- a/src/splash-plugins/text/plugin.c +++ b/src/splash-plugins/text/plugin.c @@ -280,6 +280,7 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin, void ask_for_password (ply_boot_splash_plugin_t *plugin, + const char *prompt, ply_answer_t *answer) { int window_width, window_height; -- 2.47.3