1 /* |
|
2 * Copyright (c) 1999 - 2001 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef FRSTACK_H |
|
20 #define FRSTACK_H |
|
21 |
|
22 #include "scr_val.h" |
|
23 #include "scr_fcns.h" |
|
24 #include "scr_ptrstack.h" |
|
25 |
|
26 typedef struct |
|
27 { |
|
28 val_t *vars; |
|
29 NW_Ucs2 *url; |
|
30 NW_Ucs2 *postfields; |
|
31 NW_Ucs2 *referer; |
|
32 NW_Uint32 chkSum; |
|
33 NW_Int16 code_offset; |
|
34 NW_Int16 var_cnt; |
|
35 NW_Byte func_index; |
|
36 } frame_t; |
|
37 |
|
38 |
|
39 #define frstack_t pstack_t |
|
40 |
|
41 void init_frames(void); |
|
42 NW_Bool push_frame(NW_Ucs2 *url, NW_Ucs2 *postfields, NW_Uint32 chkSum, |
|
43 NW_Int32 func_index, NW_Ucs2 *referer); |
|
44 void NW_Wmls_PopFrame(void); |
|
45 NW_Bool is_frstack_empty(void); |
|
46 |
|
47 void jump_opcode(NW_Int32 offset); |
|
48 void set_code_offset(NW_Uint16 s); |
|
49 NW_Uint16 get_code_offset(void); |
|
50 NW_Bool get_opcode(NW_Byte *b); |
|
51 NW_Bool get_next_opcode_byte(NW_Byte *b); |
|
52 NW_Bool get_next_opcode_int16(NW_Uint16 *i16); |
|
53 |
|
54 NW_Ucs2 *get_curr_referer(void); |
|
55 NW_Ucs2 *get_first_referer(void); |
|
56 NW_Ucs2 *get_curr_url(void); |
|
57 NW_Uint32 get_curr_chkSum(void); |
|
58 NW_Ucs2 *get_curr_postfields(void); |
|
59 |
|
60 function_t *get_curr_func(void); |
|
61 NW_Int16 get_curr_func_size(void); |
|
62 |
|
63 val_t get_func_var(NW_Byte i); |
|
64 void set_func_var(NW_Byte i, val_t v); |
|
65 void free_frstack(frstack_t *st); |
|
66 |
|
67 /* frees all the frames in stack.*/ |
|
68 void free_all_frames(void); |
|
69 |
|
70 #endif |
|