mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 03:08:13 +02:00
[client] Add new reactivate command
This tells the daemon to reactivate itself after having previously been suspended by the deactivate command.
This commit is contained in:
parent
1976a90cd4
commit
301d372416
3 changed files with 32 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue