#include "p_apps.h"

#define SNTP_DNS_LENGTH		17
CCHAR g_cSntpDns[SNTP_DNS_NUM][SNTP_DNS_LENGTH] = {
"time.windows.com",
"time.nist.gov",
};

void _Load_String(UCHAR iDstIndexLow, PCCHAR pSrc)
{
	p_strcpy_c2x((PXCHAR)Sdram_pDataCache, pSrc);
	X_VAL(Sdram_pDataCache, SDRAM_DATA_LENGTH) = p_strlen_x((PXCHAR)Sdram_pDataCache);
	sdram_write(STRING_SDRAM_HI, iDstIndexLow, SRAM_DMA_HALF_DWORD);
}

#define _Load_Strings(iIndexLo, cSrc, iMax)		for (i = 0; i < iMax; i ++)	_Load_String((UCHAR)(iIndexLo + i), cSrc[i]); 

void LoadStrings()
{
	DCHAR i;

	_Load_Strings(AUDIO_TYPE_SDRAM_LO, g_cAudioTypeDisplay, CODEC_MAX); 
	_Load_Strings(TIME_ZONE_SDRAM_LO, g_cTimezoneDisplay, TIME_ZONE_MAX); 
	_Load_Strings(SNTP_DNS_SDRAM_LO, g_cSntpDns, SNTP_DNS_NUM); 
	_Load_Strings(IP_TYPE_SDRAM_LO, g_cIpTypeDisplay, IP_TYPE_MAX); 
	_Load_Strings(RING_TYPE_SDRAM_LO, g_cRingTypeDisplay, RING_TYPE_MAX); 
	_Load_Strings(DUAL_MODE_SDRAM_LO, g_cDualModeDisplay, DUAL_MODE_MAX); 
	_Load_Strings(DIALPLAN_SDRAM_LO, g_cDialplanDisplay, DIALPLAN_MAX); 
	_Load_Strings(INNER_LINE_SDRAM_LO, g_cInnerLineDisplay, INNER_LINE_MAX); 
	_Load_Strings(DEBUG_LEVEL_SDRAM_LO, g_cDebugDisplay, DEBUG_LEVEL_MAX); 
	_Load_Strings(UPGRADE_TYPE_SDRAM_LO, g_cUpgradeTypeDisplay, UPGRADE_TYPE_MAX); 

#ifdef CALL_H323
	_Load_Strings(LOCAL_TYPE_SDRAM_LO, g_cH323LocalTypeDisplay, H323_LOCAL_TYPE_MAX); 
#elif defined CALL_MGCP
	_Load_Strings(LOCAL_TYPE_SDRAM_LO, g_cMgcpLocalTypeDisplay, MGCP_LOCAL_TYPE_MAX); 
#endif

#ifdef CALL_H323
	_Load_Strings(PROXY_SDRAM_LO, g_cH323NatTraversalDisplay, H323_NAT_TRAVERSAL_MAX); 
#elif defined CALL_SIP
	_Load_Strings(PROXY_SDRAM_LO, g_cSipNatTraversalDisplay, SIP_NAT_TRAVERSAL_MAX); 
#elif defined CALL_MGCP
	_Load_Strings(PROXY_SDRAM_LO, g_cMgcpNatTraversalDisplay, MGCP_NAT_TRAVERSAL_MAX); 
#endif

#ifdef CALL_H323
	_Load_Strings(DTMF_TYPE_SDRAM_LO, g_cH323DtmfDisplay, H323_DTMF_TYPE_MAX); 
#elif defined CALL_SIP
	_Load_Strings(DTMF_TYPE_SDRAM_LO, g_cSipDtmfDisplay, SIP_DTMF_TYPE_MAX); 
#elif defined CALL_MGCP
	_Load_Strings(DTMF_TYPE_SDRAM_LO, g_cMgcpDtmfDisplay, MGCP_DTMF_TYPE_MAX); 
#elif defined CALL_N2P
	_Load_Strings(DTMF_TYPE_SDRAM_LO, g_cN2pDtmfDisplay, N2P_DTMF_TYPE_MAX); 
#elif defined CALL_IAX2 || defined CALL_WP || defined CALL_EPN
	_Load_Strings(DTMF_TYPE_SDRAM_LO, g_cDtmfDisplay, DTMF_TYPE_MAX); 
#endif

#ifdef CALL_H323
	_Load_Strings(SERVICE_TYPE_SDRAM_LO, g_cH323ServiceTypeDisplay, H323_SERVICE_TYPE_MAX); 
#elif defined CALL_SIP
	_Load_Strings(SERVICE_TYPE_SDRAM_LO, g_cSipServiceTypeDisplay, SIP_SERVICE_TYPE_MAX); 
#elif defined CALL_MGCP
	_Load_Strings(SERVICE_TYPE_SDRAM_LO, g_cMgcpServiceTypeDisplay, MGCP_SERVICE_TYPE_MAX); 
#endif
}

