diff options
Diffstat (limited to 'src/ply-boot-server.c')
-rw-r--r-- | src/ply-boot-server.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ply-boot-server.c b/src/ply-boot-server.c index 5d3ecc9..d34d04a 100644 --- a/src/ply-boot-server.c +++ b/src/ply-boot-server.c @@ -51,6 +51,7 @@ struct _ply_boot_server ply_boot_server_update_handler_t update_handler; ply_boot_server_system_initialized_handler_t system_initialized_handler; + ply_boot_server_show_splash_handler_t show_splash_handler; ply_boot_server_ask_for_password_handler_t ask_for_password_handler; ply_boot_server_quit_handler_t quit_handler; void *user_data; @@ -61,6 +62,7 @@ struct _ply_boot_server ply_boot_server_t * ply_boot_server_new (ply_boot_server_update_handler_t update_handler, ply_boot_server_ask_for_password_handler_t ask_for_password_handler, + ply_boot_server_show_splash_handler_t show_splash_handler, ply_boot_server_system_initialized_handler_t initialized_handler, ply_boot_server_quit_handler_t quit_handler, void *user_data) @@ -74,6 +76,7 @@ ply_boot_server_new (ply_boot_server_update_handler_t update_handler, server->update_handler = update_handler; server->ask_for_password_handler = ask_for_password_handler; server->system_initialized_handler = initialized_handler; + server->show_splash_handler = show_splash_handler; server->quit_handler = quit_handler; server->user_data = user_data; @@ -192,6 +195,12 @@ ply_boot_connection_on_request (ply_boot_connection_t *connection) if (server->system_initialized_handler != NULL) server->system_initialized_handler (server->user_data, server); } + else if (strcmp (command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_SHOW_SPLASH) == 0) + { + ply_trace ("got show splash request"); + if (server->show_splash_handler != NULL) + server->show_splash_handler (server->user_data, server); + } else if (strcmp (command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_QUIT) == 0) { if (server->quit_handler != NULL) @@ -343,6 +352,12 @@ on_system_initialized (ply_event_loop_t *loop) } static void +on_show_splash (ply_event_loop_t *loop) +{ + printf ("got show splash request\n"); +} + +static void on_quit (ply_event_loop_t *loop) { printf ("got quit request, quiting...\n"); @@ -371,6 +386,7 @@ main (int argc, server = ply_boot_server_new ((ply_boot_server_update_handler_t) on_update, (ply_boot_server_ask_for_password_handler_t) on_ask_for_password, + (ply_boot_server_show_splash_handler_t) on_show_splash, (ply_boot_server_system_initialized_handler_t) on_system_initialized, (ply_boot_server_quit_handler_t) on_quit, loop); |