📄 rephdr.h
字号:
/*
* 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.
*/
#ifndef _RepHdr_H
#define _RepHdr_H
/*========================================================================
WAP Implementation Project
==========================================================================
File: RepHdr.H
Description:
Author: Charlotte Ek鰂, AU-System Radio AB
Revision history:
Date Rev Sign Comment
990723 PA1 CEF First version
991221 JPR Minor Corrections
000103 JPR Minor Corrections
001011 ASPN Lower-case filenames
=========================================================================*/
#include "cmmnrsrc.h"
#include "hdrutil.h" /* ? */
/* Private include statements */
typedef struct
{
UINT32 iLastMod;
BYTE* pbEtag;
} HEADERPARAMSTRUCT, *pHEADERPARAMSTRUCT;
typedef struct
{
UINT8 iStatus;
UINT32 iExpiryDate;
WCHAR* pwchTitle;
WCHAR* pwchAbstract;
WCHAR* pwchEventId;
WCHAR* pwchchannelid;
BOOL useraccess;
UINT32* piAllResInChList;
UINT32 iResCounter;
} CHCONTENTSTRUCT, *pCHCONTENTSTRUCT;
typedef struct
{
BYTE* pbUrl;
UINT8 iStatus;
UINT8 iRefCounter;
UINT8 iInstallCounter;
HEADERDEF* pHeaderHandle;
BYTE* pbBodyData;
UINT32 iBodyLength;
} RESCONTENTSTRUCT, *pRESCONTENTSTRUCT;
typedef struct
{
UINT8 Type;
UINT32 iId;
union {
CHCONTENTSTRUCT* pChContentStruct;
RESCONTENTSTRUCT* pResContentStruct;
} content;
} REPCONTENTSTRUCT, *pREPCONTENTSTRUCT;
#define CONTENT_ACTIVE 1
#define CONTENT_INSTALLING 2
#define CONTENT_STALE 3
#define CONTENT_RUNNING 4
#define CONTENT_WAITINSTALL 5
#define CONTENTTYPE_CHANNEL 1
#define CONTENTTYPE_RESOURCE 2
#define REPROOT_STATUS_OK 1
#define REPROOT_STATUS_PROCESSING 2
#define REPROOT_STATUS_CORRUPT 3
#define STOREFLAG_CHANNEL 0
#define STOREFLAG_RESOURCE 1
#define STOREFLAG_UPDATERESOURCE 2
#define REQUPDATETOREP 0
#define STOREDINREP 1
/* #define LOADEDTOREP 2, Removed 1999-12-21 JPR */
#define NOTSTOREDINREP 3
#define NOCHECKDONE 4
/***********************/
/* Debug stuff */
/***********************/
#ifdef WAE_DEBUG
#if defined XSCT_CMICRO || defined NOT_USING_SDL
#define URL_DEBUG_PRINT(a) printf(a)
#else
#define URL_DEBUG_PRINT(a) xTraceAlg(a)
#endif
#endif
/*========================================================================
INTERNAL FUNCTIONS
=========================================================================*/
/*========================================================================
EXTERNAL FUNCTIONS
=========================================================================*/
/*========================================================================
Functions called from several processes
=========================================================================*/
/*========================================================================
Free_RepContent
==========================================================================
Purpose: Free the RepContent struct
Params: pvRepContentStruct(IN)
Return: void
=========================================================================*/
void Free_RepContent(void* pvRepContentStruct);
/*========================================================================
Functions called from the process RepH_ME
=========================================================================*/
/*========================================================================
ME_Free_RepContentStructResource
==========================================================================
Purpose: Remove the Resource RepContentStruct. If the parameter boolStatus
is set to FALSE the pHeaderHandle and pbBodyData will not be
deleted. Used when a resource is fetched from the Repository
memory. The pHeaderHandle and pbBodyData will be sent
in the SDL struct type ResponseStruct.
Params: pvRepContentStruct(IN) and boolStatus(IN).
Return: void
=========================================================================*/
void Free_RepContentStructResource(void* pvRepContentStruct, BOOL
boolStatus);
/*========================================================================
ME_CompareString
==========================================================================
Purpose: Compares two strings.
Params: pwch1(IN) and pwch2(IN).
Return: TRUE if the two string are equal, FAlSE otherwise.
=========================================================================*/
BOOL ME_CompareString(WCHAR* pwch1, WCHAR* pwch2);
/*========================================================================
RepCh_List functions, each element stores information ( EventId,
LLRepHId and the LLRepHId to the first resource )about a channel
stored in the repository. The list is used at either a 'Control of
global binding' request or at a request from WSPIF.
=========================================================================*/
/*========================================================================
ME_RepCh_List_Add
==========================================================================
Purpose: Create a new element (REPCHSTRUCT*) and add it to the Repository
Channels List.
Params: pvRepChList(IN), pvEventId(IN), iLLRepHId(IN),
iLLRepHIdToFirstRes(IN) and iStatus(IN).
Return: TRUE if ok, otherwise FALSE.
=========================================================================*/
BOOL ME_RepCh_List_Add( void* pvRepChList, void* pvEventId,
void* pvchannelid, UINT32 iLLRepHId,
UINT32 iLLRepHIdToFirstRes);
/*========================================================================
ME_RepCh_List_CheckEventId
==========================================================================
Purpose: Check if an element with the same EventId is stored in the RepCh_
List.
Params: pvRepChList(IN) and pvEventId(IN).
Return: (void*)(REPCHSTRUCT*)
=========================================================================*/
void* ME_RepCh_List_CheckEventId( void* pvRepChList, void* pvEventId );
/*========================================================================
ME_RepCh_List_Checkchannelid
==========================================================================
Purpose: Check if an element with the same channelid is stored in the RepCh_
List.
Params: pvRepChList(IN) and pvchannelid(IN).
Return: (void*)(REPCHSTRUCT*)
=========================================================================*/
void* ME_RepCh_List_Checkchannelid( void* pvRepChList, void* pvchannelid );
/*========================================================================
ME_RepCh_List_CheckchEventid
==========================================================================
Purpose: Check if an element with the same channelid or EventId is stored
in the RepCh_List.
Params: pvRepChList(IN) and pvchannelid(IN).
Return: (void*)(REPCHSTRUCT*)
=========================================================================*/
void* ME_RepCh_List_CheckchEventid( void* pvRepChList, void* pvchannelid,
void* pvEventId, UINT32 iLLRepHId,
UINT32 iLLRepHIdToFirstRes);
/*========================================================================
ME_RepCh_List_GetIdForChannel
==========================================================================
Purpose: Get low level Id for next channel.
Params: pvRepChList (IN), pliRepHLLId(OUT) and pvPrevChannel(IN);
Return:
=========================================================================*/
void* ME_RepCh_List_GetIdForChannel( void* pvRepChList,
unsigned long int* pliRepHLLId,
void* pvPrevChannel );
/*========================================================================
ME_RepCh_List_RemoveCh
==========================================================================
Purpose: Remove an element (REPCHSTRUCT*) from the RepCh_List.
Params: pvRepChList(IN) and pvRepChStruct(IN).
Return: TRUE if ok, otherwise FALSE.
=========================================================================*/
BOOL ME_RepCh_List_RemoveCh( void* pvRepChList, void* pvRepChStruct );
/*========================================================================
ME_RepCh_List_RemoveChWithRepHLLId
==========================================================================
Purpose: Remove an element (REPCHSTRUCT*) from the RepCh_List.
Params: pvRepChList(IN) and iLLRepHId(IN).
Return: BOOL
=========================================================================*/
BOOL ME_RepCh_List_RemoveChWithRepHLLId( void* pvRepChList, UINT32 iLLRepHId );
/*========================================================================
ME_RepCh_List_RemoveList
==========================================================================
Purpose: Remove all elements in the RepCh_List and delete the REPCHSTRUCT
that the elemets points to. When all the elements are removed the
list header is removed if the indata boolRemoveHeader is set.
Params: pvRepChList(IN) and boolRemoveHeader(IN).
Return: void
=========================================================================*/
void ME_RepCh_List_RemoveList( void** ppvRepChList, BOOL boolRemoveHeader);
/*========================================================================
ME_ServiceList_Init
==========================================================================
Purpose: Initiate the service list.
Params: iLength(IN).
Return: (void*)pServiceList
=========================================================================*/
void* ME_ServiceList_Init(UINT32 iLength);
/*========================================================================
ME_ServiceList_Add
==========================================================================
Purpose: Add a new Service to the Service List.
Params: pvServiceList(IN) and pvRepContent(IN).
Return:
=========================================================================*/
void ME_ServiceList_Add(void** ppvServiceList, void* pvRepContent);
/*========================================================================
ME_ServiceList_Delete
==========================================================================
Purpose: Deletes a Service List
Params: pvServiceList(IN)
Return:
=========================================================================*/
void ME_ServiceList_Delete(void** ppvServiceList);
/*========================================================================
ME_InstallPId_List_Add
==========================================================================
Purpose: Adds a new PId Id to the Installation PId list.
Params: pvInstallPIdList(IN) and iPId(IN).
Return: void
=========================================================================*/
void ME_InstallPId_List_Add( void* pvInstallPIdList, UINT32 iPId,
INT8 iInstallId);
/*========================================================================
ME_InstallPId_List_GetFirstPId
==========================================================================
Purpose: Remove a PId from the InstallPId_List.
Params: pvInstallPIdList(IN).
Return: PId.
=========================================================================*/
UINT32 ME_InstallPId_List_GetFirstPId( void* pvInstallPIdList);
/*========================================================================
ME_InstallPId_List_RemovePId
==========================================================================
Purpose: Remove a PId from the InstallPId_List.
Params: pvInstallPIdList(IN) and iPId(IN).
Return: TRUE if ok, otherwise FALSE.
=========================================================================*/
void ME_InstallPId_List_RemovePId( void* pvInstallPIdList, UINT32 iPId);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -