From: Ray Strode Date: Sat, 28 Nov 2009 04:34:05 +0000 (-0500) Subject: [client] Add new deactivate subcommand X-Git-Tag: 0.8.0~104^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fno-fbcon;p=thirdparty%2Fplymouth.git [client] Add new deactivate subcommand This tells the daemon we're about to start X with -nr and to get ready for the transition. --- diff --git a/src/client/ply-boot-client.c b/src/client/ply-boot-client.c index 5f7bb54f..917a6199 100644 --- a/src/client/ply-boot-client.c +++ b/src/client/ply-boot-client.c @@ -652,6 +652,18 @@ ply_boot_client_tell_daemon_to_hide_splash (ply_boot_client_t * NULL, handler, failed_handler, user_data); } +void +ply_boot_client_tell_daemon_to_deactivate (ply_boot_client_t *client, + ply_boot_client_response_handler_t handler, + ply_boot_client_response_handler_t failed_handler, + void *user_data) +{ + assert (client != NULL); + + ply_boot_client_queue_request (client, PLY_BOOT_PROTOCOL_REQUEST_TYPE_DEACTIVATE, + NULL, handler, failed_handler, user_data); +} + void ply_boot_client_tell_daemon_to_quit (ply_boot_client_t *client, bool retain_splash, diff --git a/src/client/ply-boot-client.h b/src/client/ply-boot-client.h index 43684ac4..0e9122c4 100644 --- a/src/client/ply-boot-client.h +++ b/src/client/ply-boot-client.h @@ -104,6 +104,10 @@ void ply_boot_client_tell_daemon_to_hide_splash (ply_boot_client_t ply_boot_client_response_handler_t handler, ply_boot_client_response_handler_t failed_handler, void *user_data); +void ply_boot_client_tell_daemon_to_deactivate (ply_boot_client_t *client, + ply_boot_client_response_handler_t handler, + ply_boot_client_response_handler_t failed_handler, + void *user_data); void ply_boot_client_tell_daemon_to_quit (ply_boot_client_t *client, bool retain_splash, ply_boot_client_response_handler_t handler, diff --git a/src/client/plymouth.c b/src/client/plymouth.c index 80b0ec65..8669fd2a 100644 --- a/src/client/plymouth.c +++ b/src/client/plymouth.c @@ -593,6 +593,17 @@ on_report_error_request (state_t *state, } +static void +on_deactivate_request (state_t *state, + const char *command) +{ + ply_boot_client_tell_daemon_to_deactivate (state->client, + (ply_boot_client_response_handler_t) + on_success, + (ply_boot_client_response_handler_t) + on_failure, state); +} + static void on_quit_request (state_t *state, const char *command) @@ -709,6 +720,11 @@ main (int argc, on_report_error_request, &state, NULL); + ply_command_parser_add_command (state.command_parser, + "deactivate", "Tell boot daemon to deactivate", + (ply_command_handler_t) + on_deactivate_request, &state, NULL); + ply_command_parser_add_command (state.command_parser, "quit", "Tell boot daemon to quit", (ply_command_handler_t)