OSDN Git Service

*** empty log message ***
[modchxj/mod_chxj.git] / include / 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 #include "chxj_cookie.h"
31
32 /*============================================================================*/
33 /* Structure for HDML                                                         */
34 /*============================================================================*/
35 typedef struct hdml_t hdml_t;
36
37 struct hdml_t {
38   Doc*    doc;
39   char*   out;
40   int     center;
41   int     in_center;
42   char*   card;
43   int     card_cnt;
44   apr_time_t   form_cnt;
45
46   /*--------------------------------------------------------------------------*/
47   /* If the title tag is found, it becomes ``1''.                             */
48   /*--------------------------------------------------------------------------*/
49   int     found_title;
50   /*--------------------------------------------------------------------------*/
51   /* Counter of pure form tag                                                 */
52   /*--------------------------------------------------------------------------*/
53   int     pure_form_cnt;
54
55   int     var_cnt[MAX_FORM_COUNT];
56   char*   postdata[MAX_FORM_COUNT];
57   /*------------------------------*/
58   /* max <input type="radio"> tag */
59   /*------------------------------*/
60   char*   radio_value_list[MAX_RADIO_COUNT][MAX_RADIO_VALUE_COUNT];
61   char*   radio_name_list[MAX_RADIO_COUNT];
62   int     radio_out_cnt[MAX_RADIO_COUNT];
63   char*   radio_checked_value[MAX_RADIO_COUNT];
64   /*---------------------------------*/
65   /* for <input type="submit"> tag   */
66   /*---------------------------------*/
67   char*   submit_button[MAX_SUBMIT_BUTTON_COUNT];
68
69   /*---------------------------------*/
70   /* for <input type="checkbox"> tag */
71   /*---------------------------------*/
72   int     has_checkbox;
73
74   char*   form_tmp;
75   char*   init_vars;
76   int     out_len;
77   int     card_len;
78
79   /*------------------------------*/
80   /* Counter for variable of HDML */
81   /*------------------------------*/
82   int     qs_cnt;
83   int     option_flag;
84   int     div_right_flag;
85   int     div_center_flag;
86   int     div_in_center;
87   int     hdml_a_flag;
88   int     hdml_br_flag;
89
90   int     hdml_end_flag;
91
92   device_table* spec;
93
94   mod_chxj_config*  conf;
95
96   chxjconvrule_entry* entryp;
97   cookie_t*           cookie;
98 };
99
100
101 /*============================================================================*/
102 /* Prototype declaration.                                                     */
103 /*============================================================================*/
104 extern char* chxj_exchange_hdml(
105   request_rec*        r, 
106   device_table*       spec,
107   const char*         src,
108   apr_size_t          srclen,
109   apr_size_t*         dstlen,
110   chxjconvrule_entry* entryp,
111   cookie_t*           cookie);
112
113 extern char* qs_out_apr_pstrcat(
114   request_rec* r, 
115   char*        o, 
116   char*        s, 
117   int*         len);
118
119 extern char* qs_conv_istyle_to_format(
120   request_rec* r, 
121   char*        is);
122
123 #endif