|
1 /* |
|
2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Provides a single header for the cXML Parser |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef _CXML_XMLP_INT_ENTITY_H_ |
|
21 #define _CXML_XMLP_INT_ENTITY_H_ |
|
22 #include <e32std.h> |
|
23 #include <xml/cxml/cxml_proj.h> |
|
24 |
|
25 #ifdef __cplusplus |
|
26 extern "C" { |
|
27 #endif |
|
28 |
|
29 |
|
30 typedef struct CXML_Internal_Entity_s { |
|
31 NW_Ucs2 * name; |
|
32 NW_Ucs2 * value; |
|
33 NW_Uint32 nameLen; |
|
34 }CXML_Internal_Entity_t; |
|
35 |
|
36 |
|
37 /** ----------------------------------------------------------------------- ** |
|
38 @function: CXML_XML_Parser_Store_I_Entity |
|
39 @synopsis: Function to store the internal entity. |
|
40 @scope: public |
|
41 |
|
42 @parameters: |
|
43 [in] entityVal |
|
44 |
|
45 |
|
46 [in] NW_XML_Reader_Interval_t* I_entityName |
|
47 Internal Entity Name |
|
48 |
|
49 |
|
50 [in] NW_XML_Reader_Interval_t* I_entityValue |
|
51 Internal Entity Value |
|
52 |
|
53 @description: This extracts the Internal Entity name from the XML buffer |
|
54 and stores in the Link list. |
|
55 |
|
56 @returns: |
|
57 In case of file related failures: Error codes is returned defined in |
|
58 nwx_status.h |
|
59 NW_STAT_FAILURE : For any general error and entity is not predefined |
|
60 entity. |
|
61 NW_STAT_SUCCESS: For success |
|
62 -----------------------------------------------------------------------------------**/ |
|
63 |
|
64 NW_Status_t CXML_XML_Parser_Store_I_Entity(NW_XML_Reader_t* pT, |
|
65 NW_XML_Reader_Interval_t* I_entityName, |
|
66 NW_XML_Reader_Interval_t* I_entityValue, |
|
67 RPointerArray <CXML_Internal_Entity_t>* internalEntityList); |
|
68 |
|
69 /** ----------------------------------------------------------------------- ** |
|
70 @function: CXML_XML_Parser_Free_I_Entity_List |
|
71 @synopsis: Function to free the internal entity list. |
|
72 @scope: public |
|
73 |
|
74 @parameters: void |
|
75 |
|
76 |
|
77 @description: Function to free the internal entity list. |
|
78 |
|
79 @returns: |
|
80 void |
|
81 -----------------------------------------------------------------------------------**/ |
|
82 |
|
83 void CXML_XML_Parser_Free_I_Entity_List(RPointerArray <CXML_Internal_Entity_t> internalEntityList); |
|
84 |
|
85 /** ----------------------------------------------------------------------- ** |
|
86 @function: CXML_XML_Resolve_Internal_Entity |
|
87 @synopsis: Function to resolve the internal entity. |
|
88 @scope: public |
|
89 |
|
90 @parameters: |
|
91 [in] NW_Ucs2* entityName: Name of Entity |
|
92 |
|
93 |
|
94 [out] CXML_Uint8** entityValStr |
|
95 If the entity name is the internal entity then this |
|
96 contains the entiy value string otherwise NULL. |
|
97 |
|
98 |
|
99 |
|
100 [out] NW_Bool* entityFound |
|
101 If it is internal entity then it is true otherwise false. |
|
102 [in] NW_Uint32 encoding: |
|
103 Original encoding of the buffer so that entityValStr contain |
|
104 correct. |
|
105 [in] void* internalEntityList: Internal Entity list |
|
106 |
|
107 @description: This extracts the Internal Entity name from the XML buffer |
|
108 and stores in the Link list. |
|
109 |
|
110 @returns: |
|
111 In case of file related failures: Error codes is returned defined in |
|
112 nwx_status.h |
|
113 NW_STAT_FAILURE : For any general error and entity is not predefined |
|
114 entity. |
|
115 NW_STAT_SUCCESS: For success |
|
116 -----------------------------------------------------------------------------------**/ |
|
117 |
|
118 NW_Status_t CXML_XML_Resolve_Internal_Entity(NW_Ucs2* entityName, |
|
119 CXML_Uint8** entityValStr, |
|
120 NW_Bool* entityFound, |
|
121 NW_Uint32 encoding, |
|
122 void* internalEntityList); |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 #ifdef __cplusplus |
|
128 } // extern "C" { |
|
129 #endif /* __cplusplus */ |
|
130 |
|
131 #endif //_CXML_XMLP_INT_ENTITY_H_ |