/**************************************************************
 * HTTPPrint.h
 * Provides callback headers and resolution for user's custom
 * HTTP Application.
 * 
 * This file is automatically generated by the MPFS Utility
 * ALL MODIFICATIONS WILL BE OVERWRITTEN BY THE MPFS GENERATOR
 **************************************************************/

#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_hellomsg(void);
void HTTPPrint_config_mac(void);
void HTTPPrint_config_dhcpchecked(void);
void HTTPPrint_config_ip(void);
void HTTPPrint_config_gw(void);
void HTTPPrint_config_subnet(void);
void HTTPPrint_config_dns1(void);
void HTTPPrint_config_dns2(void);
void HTTPPrint_reboot(void);
void HTTPPrint_rebootaddr(void);
void HTTPPrint_out_port(void);
void HTTPPrint_in_port(void);
void HTTPPrint_RoomName(void);
void HTTPPrint_NtpName(void);
void HTTPPrint_TimeZone(void);
void HTTPPrint_CurDate(void);
void HTTPPrint_CurTime(void);
void HTTPPrint_user_id(void);
void HTTPPrint_user_pass(void);
void HTTPPrint_user_passC(void);
void HTTPPrint_TimeZoneMinutes(void);
void HTTPPrint_server_ip_address(void);
void HTTPPrint_log_port(void);
void HTTPPrint_LogName(void);
void HTTPPrint_NdTable(void);

void HTTPPrint(DWORD callbackID)
{
	switch(callbackID)
	{
        case 0x00000001:
			HTTPPrint_hellomsg();
			break;
        case 0x00000002:
			HTTPIncFile((ROM BYTE*)"footer.inc");
			break;
        case 0x00000025:
			HTTPPrint_config_mac();
			break;
        case 0x00000027:
			HTTPPrint_config_dhcpchecked();
			break;
        case 0x00000028:
			HTTPPrint_config_ip();
			break;
        case 0x00000029:
			HTTPPrint_config_gw();
			break;
        case 0x0000002a:
			HTTPPrint_config_subnet();
			break;
        case 0x0000002b:
			HTTPPrint_config_dns1();
			break;
        case 0x0000002c:
			HTTPPrint_config_dns2();
			break;
        case 0x0000002d:
			HTTPPrint_reboot();
			break;
        case 0x0000002e:
			HTTPPrint_rebootaddr();
			break;
        case 0x00000033:
			HTTPIncFile((ROM BYTE*)"header.inc");
			break;
        case 0x0000004b:
			HTTPPrint_out_port();
			break;
        case 0x0000004c:
			HTTPPrint_in_port();
			break;
        case 0x0000004d:
			HTTPPrint_RoomName();
			break;
        case 0x00000060:
			HTTPPrint_NtpName();
			break;
        case 0x00000061:
			HTTPPrint_TimeZone();
			break;
        case 0x00000063:
			HTTPPrint_CurDate();
			break;
        case 0x00000064:
			HTTPPrint_CurTime();
			break;
        case 0x0000006a:
			HTTPPrint_user_id();
			break;
        case 0x0000006b:
			HTTPPrint_user_pass();
			break;
        case 0x0000006c:
			HTTPPrint_user_passC();
			break;
        case 0x0000006d:
			HTTPPrint_TimeZoneMinutes();
			break;
        case 0x00000089:
			HTTPPrint_server_ip_address();
			break;
        case 0x0000008a:
			HTTPPrint_log_port();
			break;
        case 0x0000008b:
			HTTPPrint_LogName();
			break;
        case 0x0000008d:
			HTTPPrint_NdTable();
			break;
		default:
			// Output notification for undefined values
			TCPPutROMArray(sktHTTP, (ROM BYTE*)"!DEF", 4);
	}

	return;
}

void HTTPPrint_(void)
{
	TCPPut(sktHTTP, '~');
	return;
}

#endif

#endif
