diff options
Diffstat (limited to 'src/webserver.c')
-rw-r--r-- | src/webserver.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/webserver.c b/src/webserver.c index 331dfd9..68c23e6 100644 --- a/src/webserver.c +++ b/src/webserver.c @@ -30,6 +30,8 @@ #include "ui-icons_454545_256x240-png.h" #include "ui-icons_888888_256x240-png.h" #include "ui-icons_cd0a0a_256x240-png.h" +#include "loading-gif.h" +#include "jquery.ui.waitbutton.js.h" static struct MHD_Daemon *d; @@ -203,6 +205,15 @@ static int handle_request( void *cls, struct MHD_Connection *connection, memcpy( biruda_msg, images_ui_icons_cd0a0a_256x240_png, images_ui_icons_cd0a0a_256x240_png_len ); content_type = CONTENT_TYPE_IMAGE_PNG; biruda_msg_len = images_ui_icons_cd0a0a_256x240_png_len; + } else if( strcmp( url, "/web/images/loading.gif" ) == 0 ) { + memcpy( biruda_msg, images_loading_gif, images_loading_gif_len ); + content_type = CONTENT_TYPE_IMAGE_PNG; + biruda_msg_len = images_loading_gif_len; + } else if( strcmp( url, "/web/jquery.ui.waitbutton.js" ) == 0 ) { + strncpy( biruda_msg, (char *)jquery_ui_waitbutton_js, jquery_ui_waitbutton_js_len ); + biruda_msg[jquery_ui_waitbutton_js_len] = '\0'; + content_type = CONTENT_TYPE_TEXT_JS; + biruda_msg_len = strlen( biruda_msg ); } else { strcat( biruda_msg, "<html><body><p>This is biruda, the REST api. You can access the web interface <a href=\"/web\">here</a>.</p></body></html>" ); biruda_msg_len = strlen( biruda_msg ); |