From: Scott James Remnant Date: Thu, 18 Mar 2010 20:56:39 +0000 (+0000) Subject: [client] Add new reactivate command X-Git-Tag: 0.8.0~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=301d3724168afa2bbd90051061af88965fb45a2a;p=thirdparty%2Fplymouth.git [client] Add new reactivate command This tells the daemon to reactivate itself after having previously been suspended by the deactivate command. --- diff --git a/src/client/ply-boot-client.c b/src/client/ply-boot-client.c index fef7fb13..58c5e44d 100644 --- a/src/client/ply-boot-client.c +++ b/src/client/ply-boot-client.c @@ -674,6 +674,18 @@ ply_boot_client_tell_daemon_to_deactivate (ply_boot_client_t *c NULL, handler, failed_handler, user_data); } +void +ply_boot_client_tell_daemon_to_reactivate (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_REACTIVATE, + 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 0e9122c4..046b6f75 100644 --- a/src/client/ply-boot-client.h +++ b/src/client/ply-boot-client.h @@ -108,6 +108,10 @@ void ply_boot_client_tell_daemon_to_deactivate (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_reactivate (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 a5209014..5dffba81 100644 --- a/src/client/plymouth.c +++ b/src/client/plymouth.c @@ -678,6 +678,17 @@ on_deactivate_request (state_t *state, on_failure, state); } +static void +on_reactivate_request (state_t *state, + const char *command) +{ + ply_boot_client_tell_daemon_to_reactivate (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) @@ -826,6 +837,11 @@ main (int argc, (ply_command_handler_t) on_deactivate_request, &state, NULL); + ply_command_parser_add_command (state.command_parser, + "reactivate", "Tell boot daemon to reactivate", + (ply_command_handler_t) + on_reactivate_request, &state, NULL); + ply_command_parser_add_command (state.command_parser, "quit", "Tell boot daemon to quit", (ply_command_handler_t)