/*********************************************************************
 * FileName: HTTPPrint.h
 * Provides callback headers and resolution for user's custom
 * HTTP Application.
 * Processor: PIC18,PIC24E, PIC24F, PIC24H, dsPIC30F, dsPIC33F, dsPIC33E,PIC32
 * Compiler:  Microchip C18, C30, C32
 * 
 * This file is automatically generated by the MPFS Utility
 * ALL MODIFICATIONS WILL BE OVERWRITTEN BY THE MPFS GENERATOR
 *
 * Software License Agreement
 *
 * Copyright (C) 2012 Microchip Technology Inc.  All rights
 * reserved.
 *
 * Microchip licenses to you the right to use, modify, copy, and 
  * distribute: 
 * (i)  the Software when embedded on a Microchip microcontroller or 
 *      digital signal controller product ("Device") which is 
 *      integrated into Licensee's product; or 
 * (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h,
 *		ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device
 *		used in conjunction with a Microchip ethernet controller for
 *		the sole purpose of interfacing with the ethernet controller.
 *
 * You should refer to the license agreement accompanying this 
 * Software for additional information regarding your rights and 
 * obligations.
 *
 * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
 * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
 * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A 
 * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR
 * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF
 * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS
 * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE 
 * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER 
 * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT
 * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE.
 *
 *********************************************************************/

#ifndef __HTTPPRINT_H
#define __HTTPPRINT_H

#include "TCPIP Stack/TCPIP.h"

#if defined(STACK_USE_HTTP2_SERVER)

extern HTTP_STUB httpStubs[MAX_HTTP_CONNECTIONS];
extern BYTE curHTTPID;

void HTTPPrint(DWORD callbackID);
void HTTPPrint_adat(WORD);

void HTTPPrint(DWORD callbackID)
{
//	PIE1bits.RC1IE=Ki;
//	PIE1bits.TX1IE=Ki;
	switch(callbackID)
	{
        case 0x0000004b:
			HTTPPrint_adat(0);
			break;
        case 0x0000005b:
			HTTPPrint_adat(1);
			break;
        case 0x0000005c:
			HTTPPrint_adat(2);
			break;
        case 0x0000005d:
			HTTPPrint_adat(3);
			break;
        case 0x0000005e:
			HTTPPrint_adat(4);
			break;
        case 0x0000005f:
			HTTPPrint_adat(5);
			break;
        case 0x00000060:
			HTTPPrint_adat(6);
			break;
        case 0x00000061:
			HTTPPrint_adat(7);
			break;
        case 0x00000062:
			HTTPPrint_adat(8);
			break;
        case 0x00000063:
			HTTPPrint_adat(9);
			break;
        case 0x00000064:
			HTTPPrint_adat(10);
			break;
        case 0x00000065:
			HTTPPrint_adat(11);
			break;
        case 0x00000066:
			HTTPPrint_adat(12);
			break;
        case 0x00000067:
			HTTPPrint_adat(13);
			break;
        case 0x00000068:
			HTTPPrint_adat(14);
			break;
        case 0x00000069:
			HTTPPrint_adat(15);
			break;
        case 0x0000006a:
			HTTPPrint_adat(16);
			break;
        case 0x0000006b:
			HTTPPrint_adat(17);
			break;
        case 0x0000006c:
			HTTPPrint_adat(18);
			break;
        case 0x0000006d:
			HTTPPrint_adat(19);
			break;
        case 0x0000006e:
			HTTPPrint_adat(20);
			break;
        case 0x0000006f:
			HTTPPrint_adat(21);
			break;
        case 0x00000070:
			HTTPPrint_adat(22);
			break;
		default:
			// Output notification for undefined values
			TCPPutROMArray(sktHTTP, (ROM BYTE*)"!DEF", 4);
	}
//	PIE1bits.RC1IE=Be;
//	PIE1bits.TX1IE=Be;
	return;
}

void HTTPPrint_(void)
{
	TCPPut(sktHTTP, '~');
	return;
}

#endif

#endif
