#include <avr/pgmspace.h>\r
#include <string.h>\r
\r
+ #include <LUFA/Version.h>\r
+\r
#include <uip.h>\r
#include <ff.h>\r
\r
/** States for each HTTP connection to the webserver. */\r
enum Webserver_States_t\r
{\r
- WEBSERVER_STATE_OpenRequestedFile, /** Currently opening requested file */\r
+ WEBSERVER_STATE_OpenRequestedFile, /**< Currently opening requested file */\r
WEBSERVER_STATE_SendResponseHeader, /**< Currently sending HTTP response headers to the client */\r
- WEBSERVER_STATE_SendMIMETypeHeader, /**< Currently sending HTTP MIME type header to the client */\r
- WEBSERVER_STATE_SendData, /**< Currently sending HTTP page data to the client */\r
- WEBSERVER_STATE_Closed, /**< Connection closed after all data sent */\r
+ WEBSERVER_STATE_SendData, /**< Currently sending HTTP page data to the client */\r
+ WEBSERVER_STATE_Closing, /**< Ready to close the connection to the client */\r
+ WEBSERVER_STATE_Closed, /**< Connection closed after all data sent */\r
};\r
\r
/* Type Defines: */\r
/** Type define for a MIME type handler. */\r
typedef struct\r
{\r
- char Extension[4]; /**< 3 or less character file extension */\r
- char MIMEType[30]; /**< Appropriate MIME type to send when the extension is encountered */\r
+ char* Extension; /**< File extension (no leading '.' character) */\r
+ char* MIMEType; /**< Appropriate MIME type to send when the extension is encountered */\r
} MIME_Type_t;\r
\r
/* Macros: */\r
- /** TCP listen port for incomming HTTP traffic */\r
+ /** TCP listen port for incoming HTTP traffic */\r
#define HTTP_SERVER_PORT 80\r
\r
/* Function Prototypes: */\r
- void WebserverApp_Init(void);\r
- void WebserverApp_Callback(void);\r
+ void HTTPServerApp_Init(void);\r
+ void HTTPServerApp_Callback(void);\r
+ \r
+ #if defined(INCLUDE_FROM_HTTPSERVERAPP_C)\r
+ static void HTTPServerApp_OpenRequestedFile(void);\r
+ static void HTTPServerApp_SendResponseHeader(void);\r
+ static void HTTPServerApp_SendData(void);\r
+ #endif\r
\r
#endif\r