home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / wapuniverse-src-0.3.5.build9.tar.gz / wapuniverse-src-0.3.5.build9.tar / wapuniverse-0.3.5.build9 / wml.h < prev    next >
C/C++ Source or Header  |  2000-11-12  |  7KB  |  239 lines

  1. #ifndef _wml_h_
  2. #define _wml_h_
  3. //---------------------------------------------------------------------------
  4. // wml.h
  5. // Contains all platform independant WAP/WML code 
  6. //
  7. // Project: WAPUniverse for PalmOS
  8. // Copyright ⌐ 1999-2000 Filip Onkelinx
  9. //
  10. // http://www.wapuniverse.com/
  11. // filip@onkelinx.com
  12. //
  13. // This program is free software; you can redistribute it and/or
  14. // modify it under the terms of the GNU General Public License
  15. // as published by the Free Software Foundation; either version 2
  16. // of the License, or (at your option) any later version.
  17. //
  18. // This program is distributed in the hope that it will be useful,
  19. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. // GNU General Public License for more details.
  22. //
  23. // You should have received a copy of the GNU General Public License
  24. // along with this program; if not, write to the Free Software 
  25. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  26. //
  27. //
  28. // $Workfile: wml.h $  
  29. // $Author: wapuniverse $  
  30. // $Date: 2000/11/11 20:51:09 $     
  31. // $Revision: 1.10 $
  32. //
  33. // $Header: /cvsroot/wapuniverse/wapuniverse/src/wml.h,v 1.10 2000/11/11 20:51:09 wapuniverse Exp $
  34. //
  35. //---------------------------------------------------------------------------
  36. #include "WAP.h"
  37. #include "wsp.h"
  38. #include "WAPUniverse.h"
  39.  
  40.  
  41. #define MAX_HISTORY      20 // min. 10 cfr SPEC-WML 12.2.1 
  42.  
  43. #define ACTION_RENDER 1
  44. #define ACTION_PARSE  2
  45. #define ACTION_SRC    3
  46.  
  47. #define WML_ERR_BASE  -1000
  48. #define WML_ERR_MEM   -1001
  49.  
  50. //
  51. // WBXML bitmasks
  52. //
  53. #define WBXML_has_attributes    0x80
  54. #define WBXML_has_content        0x40
  55. #define WBXML_tag_id            0x3F
  56.  
  57. #define SWITCH_PAGE 0x00
  58. #define END         0x01
  59. #define ENTITY      0x02
  60. #define STR_I       0x03
  61. #define LITERAL     0x04
  62. #define EXT_I_0     0x40
  63. #define EXT_I_1     0x41
  64. #define EXT_I_2     0x42
  65. #define PI          0x43
  66. #define LITERAL_C   0x44
  67. #define EXT_T_0     0x80
  68. #define EXT_T_1     0x81
  69. #define EXT_T_2     0x82
  70. #define STR_T       0x83
  71. #define LITERAL_A   0x084
  72. #define EXT_0       0x0c0
  73. #define EXT_1       0x0c1
  74. #define EXT_2       0x0c2
  75. #define OPAQUE      0x0c3
  76. #define LITERAL_AC  0x0c4
  77.  
  78.  
  79.  
  80.  
  81.  
  82. ////
  83. // WML TAG Tokens, according to WAP WML 16-Jun-1999 V1.1 (SPEC-WML-19990616.PDF Ch.14.3.2)
  84. //  
  85. #define WML_a            0x1C
  86. #define WML_anchor        0x22
  87. #define WML_access        0x23
  88. #define WML_b            0x24
  89. #define WML_big            0x25
  90. #define WML_br            0x26
  91. #define WML_card        0x27
  92. #define WML_do            0x28
  93. #define WML_em            0x29
  94. #define WML_fieldset    0x2A
  95. #define WML_go            0x2B
  96. #define WML_head        0x2C
  97. #define WML_i            0x2D
  98. #define WML_img            0x2E
  99. #define WML_input        0x2F
  100. #define WML_meta        0x30
  101. #define WML_noop        0x31
  102. #define WML_p            0x20
  103. #define WML_postfield    0x21
  104. #define WML_prev        0x32
  105. #define WML_onevent        0x33
  106. #define WML_optgroup    0x34
  107. #define WML_option        0x35
  108. #define WML_refresh        0x36
  109. #define WML_select        0x37
  110. #define WML_setvar        0x3E
  111. #define WML_small        0x38
  112. #define WML_strong        0x39
  113. #define WML_table        0x1F
  114. #define WML_td            0x1D
  115. #define WML_template    0x3B
  116. #define WML_timer        0x3C
  117. #define WML_tr            0x1E
  118. #define WML_u            0x3d
  119. #define WML_wml         0x3F
  120.  
  121. //
  122. // WML Attribute Start Tokens, according to WAP WML 16-Jun-1999 V1.1 (SPEC-WML-19990616.PDF Ch.14.3.3)
  123. //  
  124. #define WML_accept_charset        0x05
  125. #define WML_align                0x52
  126. #define WML_align_bottom        0x06
  127. #define WML_align_center        0x07
  128. #define WML_align_left            0x08
  129. #define WML_align_middle        0x09
  130. #define WML_align_right            0x0A
  131. #define WML_align_top            0x0B
  132. #define WML_alt                    0x0C
  133. #define WML_class                0x54
  134. #define WML_columns                0x53
  135. #define WML_content                0x0D
  136. #define WML_content_wmlc        0x5C
  137. #define WML_domain                0x0F
  138. #define WML_emptyok_false        0x10
  139. #define WML_emptyok_true        0x11
  140. #define WML_format                0x12
  141. #define WML_forua_false            0x56
  142. #define WML_forua_true            0x57
  143. #define WML_height                0x13
  144. #define WML_href                0x4A
  145. #define WML_href_http            0x4B    
  146. #define WML_href_https            0x4C
  147. #define WML_hspace                0x14
  148. #define WML_http_equiv            0x5A
  149. #define WML_http_equiv_content    0x5B
  150. #define WML_http_equiv_expires    0x5D
  151. #define WML_id                    0x55
  152. #define WML_ivalue                0x15
  153. #define WML_iname                0x16
  154. #define WML_label                0x18
  155. #define WML_localsrc            0x19
  156. #define WML_maxlength            0x1C
  157. #define WML_method_get            0x1B
  158. #define WML_method_post            0x1C
  159. #define WML_mode_nowrap            0x1D
  160. #define WML_mode_wrap            0x1E
  161. #define WML_multiple_false        0x1F
  162. #define WML_multiple_true        0x20
  163. #define WML_name                0x21
  164. #define WML_newcontect_false    0x22
  165. #define WML_newcontext_true        0x23
  166. #define WML_onenterbackward        0x25
  167. #define WML_onenterforward        0x26
  168. #define WML_onpick                0x24
  169. #define WML_ontimer                0x27
  170. #define WML_optional_false        0x28
  171. #define WML_optional_true        0x29
  172. #define WML_path                0x2A
  173. #define WML_scheme                0x2E
  174. #define WML_sendreferer_false    0x2F
  175. #define WML_sendreferer_true    0x30
  176. #define WML_size                0x31
  177. #define WML_src                    0x32
  178. #define WML_src_http            0x58
  179. #define WML_src_https            0x59
  180. #define WML_ordered_true        0x33
  181. #define WML_ordered_false        0x34
  182. #define WML_tabindex            0x35
  183. #define WML_title                0x36
  184. #define WML_type                0x37
  185. #define WML_type_accept            0x38
  186. #define WML_type_delete            0x39
  187. #define WML_type_help            0x3A
  188. #define WML_type_password        0x3B
  189. #define WML_type_onpick            0x3C
  190. #define WML_type_onenterback    0x3D
  191. #define WML_type_onenterforward    0x3E
  192. #define WML_type_ontimer        0x3F
  193. #define WML_type_options        0x45
  194. #define WML_type_prev            0x46
  195. #define WML_type_reset            0x47
  196. #define WML_type_text            0x48
  197. #define WML_type_vnd            0x49
  198. #define WML_value                0x4D
  199. #define WML_vspace                0x4E
  200. #define WML_width                0x4F
  201. #define WML_xml_lang            0x50
  202.  
  203.  
  204. //
  205. // WML Attribute Value Tokens, according to WAP WML 16-Jun-1999 V1.1 (SPEC-WML-19990616.PDF Ch.14.3.4)
  206. //  
  207. #define WML_com                    0x85
  208. #define WML_edu                    0x86
  209. #define WML_net                    0x87
  210. #define WML_org                    0x88
  211. #define WML_accept                0x89
  212. #define WML_bottom                0x8A
  213. #define WML_clear                0x8B
  214. #define WML_delete                0x8C
  215. #define WML_help                0x8D
  216. #define WML_http                0x8E
  217. #define WML_http_www            0x8F
  218. #define WML_https                0x90
  219. #define WML_https_www            0x91
  220. #define WML_middle                0x93
  221. #define WML_nowrap                0x94
  222. #define WML_val_onenterbackward    0x96
  223. #define WML_val_onenterforward    0x97
  224. #define WML_val_onpick            0x95
  225. #define WML_val_ontimer            0x98
  226. #define WML_options                0x99
  227. #define WML_password            0x9A
  228. #define WML_reset                0x9B
  229. #define WML_text                0x9D
  230. #define WML_top                    0x9E
  231. #define WML_unknown                0x9F
  232. #define WML_wrap                0xA0
  233. #define WML_www                    0xA1
  234.  
  235. extern int wbxml_parse(WSPPDUPtr wsppdu, int action, WMLDeckPtr wmldck, int offset, GlobalsType *g);
  236. extern int wbxml_free_wmldck( WMLDeckPtr wmldck);
  237.  
  238. #endif _wml_h_
  239.