void
ply_boot_client_tell_daemon_to_quit (ply_boot_client_t *client,
+ bool retain_splash,
ply_boot_client_response_handler_t handler,
ply_boot_client_response_handler_t failed_handler,
void *user_data)
{
+ char arg[2] = "";
+
assert (client != NULL);
+ arg[0] = (char) (retain_splash != false);
ply_boot_client_queue_request (client, PLY_BOOT_PROTOCOL_REQUEST_TYPE_QUIT,
- NULL, handler, failed_handler, user_data);
+ arg, handler, failed_handler, user_data);
}
void
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,
ply_boot_client_response_handler_t failed_handler,
void *user_data);
on_failure, &state);
else if (should_quit)
ply_boot_client_tell_daemon_to_quit (state.client,
+ false,
(ply_boot_client_response_handler_t)
on_success,
(ply_boot_client_response_handler_t)
}
static void
-on_quit (state_t *state)
+on_quit (state_t *state,
+ bool retain_splash)
{
ply_trace ("time to quit, closing boot.log");
if (state->session != NULL)
ply_trace ("unloading splash");
if (state->boot_splash != NULL)
{
+ if (!retain_splash)
+ ply_boot_splash_hide (state->boot_splash);
ply_boot_splash_free (state->boot_splash);
state->boot_splash = NULL;
}
}
else if (strcmp (command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_QUIT) == 0)
{
+ bool retain_splash;
+
+ retain_splash = (bool) argument[0];
+
if (server->quit_handler != NULL)
- server->quit_handler (server->user_data, server);
+ server->quit_handler (server->user_data, retain_splash, server);
}
else if (strcmp (command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_PASSWORD) == 0)
{
ply_boot_server_t *server);
typedef void (* ply_boot_server_quit_handler_t) (void *user_data,
+ bool retain_splash,
ply_boot_server_t *server);
#ifndef PLY_HIDE_FUNCTION_DECLARATIONS