OSDN Git Service

* deleteing ChxjEngine directive.
[modchxj/mod_chxj.git] / src / chxj_hdml.h
1 /*
2  * Copyright (C) 2005 QSDN,Inc. All rights reserved.
3  * Copyright (C) 2005 Atsushi Konno All rights reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef __CHXJ_HDML_H__
18 #define __CHXJ_HDML_H__
19
20 /*============================================================================*/
21 /* The maximum number of form is up to ten.                                   */
22 /*============================================================================*/
23 #define MAX_FORM_COUNT  (10)
24 #define MAX_RADIO_COUNT (10)
25 #define MAX_RADIO_VALUE_COUNT (100)
26 #define MAX_SUBMIT_BUTTON_COUNT (10)
27 #define END_LINE        "\0"
28
29 #include "mod_chxj.h"
30
31 /*============================================================================*/
32 /* Structure for HDML                                                         */
33 /*============================================================================*/
34 typedef struct _hdml_t {
35   Doc*    doc;
36   char*   out;
37   int     center;
38   int     in_center;
39   char*   card;
40   int     card_cnt;
41   apr_time_t   form_cnt;
42
43   /*--------------------------------------------------------------------------*/
44   /* If the title tag is found, it becomes ``1''.                             */
45   /*--------------------------------------------------------------------------*/
46   int     found_title;
47   /*--------------------------------------------------------------------------*/
48   /* Counter of pure form tag                                                 */
49   /*--------------------------------------------------------------------------*/
50   int     pure_form_cnt;
51
52   int     var_cnt[MAX_FORM_COUNT];
53   char*   postdata[MAX_FORM_COUNT];
54   /*------------------------------*/
55   /* max <input type="radio"> tag */
56   /*------------------------------*/
57   char*   radio_value_list[MAX_RADIO_COUNT][MAX_RADIO_VALUE_COUNT];
58   char*   radio_name_list[MAX_RADIO_COUNT];
59   int     radio_out_cnt[MAX_RADIO_COUNT];
60   char*   radio_checked_value[MAX_RADIO_COUNT];
61   /*---------------------------------*/
62   /* for <input type="submit"> tag   */
63   /*---------------------------------*/
64   char*   submit_button[MAX_SUBMIT_BUTTON_COUNT];
65
66   /*---------------------------------*/
67   /* for <input type="checkbox"> tag */
68   /*---------------------------------*/
69   int     has_checkbox;
70
71   char*   form_tmp;
72   char*   init_vars;
73   int     out_len;
74   int     card_len;
75
76   /*------------------------------*/
77   /* Counter for variable of HDML */
78   /*------------------------------*/
79   int     qs_cnt;
80   int     option_flag;
81   int     div_right_flag;
82   int     div_center_flag;
83   int     div_in_center;
84   int     hdml_a_flag;
85   int     hdml_br_flag;
86
87   int     hdml_end_flag;
88
89   device_table_t* spec;
90
91   mod_chxj_config*  conf;
92 } hdml_t;
93 /*============================================================================*/
94 /* Prototype declaration.                                                     */
95 /*============================================================================*/
96 char* chxj_exchange_hdml(request_rec* r, device_table_t* spec, const char* src, apr_size_t srclen, apr_size_t* dstlen) ;
97 char* qs_out_apr_pstrcat(request_rec* r, char* o, char* s, int* len);
98 char* qs_conv_istyle_to_format(request_rec* r, char* is);
99
100 #endif