⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 provif.c

📁 是一个手机功能的模拟程序
💻 C
字号:
/*
 * Copyright (C) Ericsson Mobile Communications AB, 2000.
 * Licensed to AU-System AB.
 * All rights reserved.
 *
 * This software is covered by the license agreement between
 * the end user and AU-System AB, and may be used and copied
 * only in accordance with the terms of the said agreement.
 *
 * Neither Ericsson Mobile Communications AB nor AU-System AB
 * assumes any responsibility or liability for any errors or inaccuracies in
 * this software, or any consequential, incidental or indirect damage arising
 * out of the use of the Generic WAP Client software.
 */
/*========================================================================

	WAP Implementation Project

==========================================================================

	File: provif.c

	Description:

	TBD

	Author: Kent Olsson, AU-System Radio AB

	Revision history:
  	Date      Sign	Comment
  	010313    KEOL   First version

==========================================================================*/

#include "provif.h"
#include "WAE_Cmmn.h"
#include "aapiclnt.h"
#include "URL.h"

#ifdef CONFIG_WTLS
#include "wtlsdef.h"
#endif

#define check_ProxyID			1
#define check_Name				2
#define check_PxAuthType		4
#define check_PortNbr			8
#define check_PhysicalProxyID	16
#define check_PxAddr			32
#define	check_Napid				64
#define check_NapAddr			128
#define check_AuthType			256
#define check_ClientId			512
#define check_ToNapid			1024
#define check_PxPhysical		2048


typedef struct
{
	WCHAR* pwchStrTab;
	UINT16 iStringIndex;
	UINT16 iElemCheck;
	BOOL bClientIDflag;
	BOOL bPxLogicalFlag;
	UINT16 iResult;
} PROV_HELPSTRUCT, *pPROV_HELPSTRUCT;




/*========================================================================
	Internal Functions
==========================================================================*/

/*========================================================================
	getTotalStringLen
==========================================================================*/
void getTotalStringLen(pPROV_PROVELEMENT pStartElem, UINT16* iLength)
{
	ELEMENTTYPE* pTemp = NULL;
	UINT16 iLocalLength = *iLength;

	do
	{
		pTemp = pStartElem->pContent;
		do
		{
			if ( pTemp->iType == Prov_Type_Characteristic)
			{
				getTotalStringLen ((PROV_PROVELEMENT*)pTemp, &iLocalLength);
				*iLength += (iLocalLength);
				pTemp = NULL;
			}
			else if (pTemp->iType == Prov_Type_Parm && ((PROV_PARMELEMENT*)pTemp)->pwchValue != NULL)
			{
				if (((PROV_PARMELEMENT*)pTemp)->iName == PRVNG_Parm_LITERAL  && ((PROV_PARMELEMENT*)pTemp)->pwchName != NULL)
					*iLength += ((STRINGLENGTH(((PROV_PARMELEMENT*)pTemp)->pwchName))+1);
				*iLength += ((STRINGLENGTH(((PROV_PARMELEMENT*)pTemp)->pwchValue))+1);
				pTemp = pTemp->pNextElement;
			}
			else if (pTemp->iType == Prov_Type_Parm && ((PROV_PARMELEMENT*)pTemp)->iValue == PRVNG_AUTOBAUDING)
			{
				*iLength += 12;
				pTemp = pTemp->pNextElement;
			}
			else
				pTemp = pTemp->pNextElement;
		}
		while (pTemp != NULL);
		pStartElem = (PROV_PROVELEMENT*)(pStartElem->pNextElement);
	}
	while (pStartElem != NULL);
}

/*========================================================================
	combinedLists
	S鋞ter ihop tv

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -