3      Copyright (C) Dean Camera, 2012. 
   5   dean [at] fourwalledcubicle [dot] com 
  10   Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com) 
  12   Permission to use, copy, modify, distribute, and sell this 
  13   software and its documentation for any purpose is hereby granted 
  14   without fee, provided that the above copyright notice appear in 
  15   all copies and that both that the copyright notice and this 
  16   permission notice and warranty disclaimer appear in supporting 
  17   documentation, and that the name of the author not be used in 
  18   advertising or publicity pertaining to distribution of the 
  19   software without specific, written prior permission. 
  21   The author disclaim all warranties with regard to this 
  22   software, including all implied warranties of merchantability 
  23   and fitness.  In no event shall the author be liable for any 
  24   special, indirect or consequential damages or any damages 
  25   whatsoever resulting from loss of use, data or profits, whether 
  26   in an action of contract, negligence or other tortious action, 
  27   arising out of or in connection with the use or performance of 
  33  *  Header file for HTTPServerApp.c. 
  36 #ifndef _HTTPSERVER_APP_H_ 
  37 #define _HTTPSERVER_APP_H_ 
  40                 #include <avr/pgmspace.h> 
  43                 #include <LUFA/Version.h> 
  45                 #include "Config/AppConfig.h" 
  51                 /** States for each HTTP connection to the webserver. */ 
  52                 enum Webserver_States_t
 
  54                         WEBSERVER_STATE_OpenRequestedFile
, /**< Currently opening requested file */ 
  55                         WEBSERVER_STATE_SendResponseHeader
, /**< Currently sending HTTP response headers to the client */ 
  56                         WEBSERVER_STATE_SendData
, /**< Currently sending HTTP page data to the client */ 
  57                         WEBSERVER_STATE_Closing
, /**< Ready to close the connection to the client */ 
  58                         WEBSERVER_STATE_Closed
, /**< Connection closed after all data sent */ 
  62                 /** Type define for a MIME type handler. */ 
  65                         char* Extension
; /**< File extension (no leading '.' character) */ 
  66                         char* MIMEType
;  /**< Appropriate MIME type to send when the extension is encountered */ 
  70                 /** TCP listen port for incoming HTTP traffic. */ 
  71                 #define HTTP_SERVER_PORT  80 
  73         /* Function Prototypes: */ 
  74                 void HTTPServerApp_Init(void); 
  75                 void HTTPServerApp_Callback(void); 
  77                 #if defined(INCLUDE_FROM_HTTPSERVERAPP_C) 
  78                         static void HTTPServerApp_OpenRequestedFile(void); 
  79                         static void HTTPServerApp_SendResponseHeader(void); 
  80                         static void HTTPServerApp_SendData(void);