/********************************************************************* * * HTTP definitions on Microchip TCP/IP Stack * ********************************************************************* * FileName: Http.h * Dependencies: None * Processor: PIC18 * Complier: MCC18 v1.00.50 or higher * HITECH PICC-18 V8.10PL1 or higher * Company: Microchip Technology, Inc. * * Software License Agreement * * The software supplied herewith by Microchip Technology Incorporated * (the “Company”) for its PICmicro® Microcontroller is intended and * supplied to you, the Company’s customer, for use solely and * exclusively on Microchip PICmicro Microcontroller products. The * software is owned by the Company and/or its supplier, and is * protected under applicable copyright laws. All rights are reserved. * Any use in violation of the foregoing restrictions may subject the * user to criminal sanctions under applicable laws, as well as to * civil liability for the breach of the terms and conditions of this * license. * * THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES, * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. * * * Author Date Comment *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Nilesh Rajbharti 8/14/01 Original (Rev. 1.0) * Nilesh Rajbharti 2/9/02 Cleanup * Nilesh Rajbharti 5/22/02 Rev 2.0 (See version.log for detail) ********************************************************************/ #ifndef HTTP_H #define HTTP_H #define HTTP_PORT (80) #define HTTP_START_OF_VAR (0x0000) #define HTTP_END_OF_VAR (0xFFFF) /********************************************************************* * Function: void HTTPInit(void) * * PreCondition: TCP must already be initialized. * * Input: None * * Output: HTTP FSM and connections are initialized * * Side Effects: None * * Overview: Set all HTTP connections to Listening state. * Initialize FSM for each connection. * * Note: This function is called only one during lifetime * of the application. ********************************************************************/ void HTTPInit(void); /********************************************************************* * Function: void HTTPServer(void) * * PreCondition: HTTPInit() must already be called. * * Input: None * * Output: Opened HTTP connections are served. * * Side Effects: None * * Overview: Browse through each connections and let it * handle its connection. * If a connection is not finished, do not process * next connections. This must be done, all * connections use some static variables that are * common. * * Note: This function acts as a task (similar to one in * RTOS). This function performs its task in * co-operative manner. Main application must call * this function repeatdly to ensure all open * or new connections are served on time. ********************************************************************/ void HTTPServer(void); #if defined(THIS_IS_HTTP_SERVER) /* * Main application must implement these callback functions * to complete Http.c implementation. */ extern WORD HTTPGetVar(BYTE var, WORD ref, BYTE* val); extern void HTTPExecCmd(BYTE** argv, BYTE argc); #endif #endif