~ubuntu-branches/ubuntu/oneiric/libapache-mod-jk/oneiric

« back to all changes in this revision

Viewing changes to jk/native/common/jk_util.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2006-08-05 16:30:53 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060805163053-myf66gm6j1a21ps6
Tags: 1:1.2.18-1ubuntu1
Merge from Debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  Copyright 1999-2004 The Apache Software Foundation
3
 
 *
4
 
 *  Licensed under the Apache License, Version 2.0 (the "License");
5
 
 *  you may not use this file except in compliance with the License.
6
 
 *  You may obtain a copy of the License at
7
 
 *
8
 
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 
 *
10
 
 *  Unless required by applicable law or agreed to in writing, software
11
 
 *  distributed under the License is distributed on an "AS IS" BASIS,
12
 
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 
 *  See the License for the specific language governing permissions and
14
 
 *  limitations under the License.
15
 
 */
16
 
 
17
 
/***************************************************************************
18
 
 * Description: Various utility functions                                  *
19
 
 * Author:      Gal Shachor <shachor@il.ibm.com>                           *
20
 
 * Author:      Henri Gomez <hgomez@apache.org>                            *
21
 
 * Version:     $Revision: 1.34 $                                          *
22
 
 ***************************************************************************/
23
 
#ifndef _JK_UTIL_H
24
 
#define _JK_UTIL_H
25
 
 
26
 
#include "jk_global.h"
27
 
#include "jk_map.h"
28
 
#include "jk_pool.h"
29
 
#include "jk_logger.h"
30
 
#include "jk_service.h"
31
 
 
32
 
int jk_parse_log_level(const char *level);
33
 
 
34
 
int jk_open_file_logger(jk_logger_t **l, const char *file, int level);
35
 
 
36
 
int jk_close_file_logger(jk_logger_t **l);
37
 
 
38
 
int jk_log(jk_logger_t *l,
39
 
           const char *file, int line, const char *funcname, int level,
40
 
           const char *fmt, ...);
41
 
 
42
 
/* [V] Two general purpose functions. Should ease the function bloat. */
43
 
int jk_get_worker_str_prop(jk_map_t *m,
44
 
                           const char *wname, const char *pname, const char **prop);
45
 
 
46
 
int jk_get_worker_int_prop(jk_map_t *m,
47
 
                           const char *wname, const char *pname, int *prop);
48
 
 
49
 
const char *jk_get_worker_host(jk_map_t *m, const char *wname, const char *def);
50
 
 
51
 
const char *jk_get_worker_type(jk_map_t *m, const char *wname);
52
 
 
53
 
int jk_get_worker_port(jk_map_t *m, const char *wname, int def);
54
 
 
55
 
int jk_get_worker_cache_size(jk_map_t *m, const char *wname, int def);
56
 
 
57
 
int jk_get_worker_socket_timeout(jk_map_t *m, const char *wname, int def);
58
 
 
59
 
int jk_get_worker_socket_buffer(jk_map_t *m, const char *wname, int def);
60
 
 
61
 
int jk_get_worker_socket_keepalive(jk_map_t *m, const char *wname, int def);
62
 
 
63
 
int jk_get_worker_cache_timeout(jk_map_t *m, const char *wname, int def);
64
 
 
65
 
int jk_get_worker_recovery_opts(jk_map_t *m, const char *wname, int def);
66
 
 
67
 
int jk_get_worker_connect_timeout(jk_map_t *m, const char *wname, int def);
68
 
 
69
 
int jk_get_worker_reply_timeout(jk_map_t *m, const char *wname, int def);
70
 
 
71
 
int jk_get_worker_prepost_timeout(jk_map_t *m, const char *wname, int def);
72
 
 
73
 
int jk_get_worker_recycle_timeout(jk_map_t *m, const char *wname, int def);
74
 
 
75
 
int jk_get_worker_recover_timeout(jk_map_t *m, const char *wname, int def);
76
 
 
77
 
const char *jk_get_worker_domain(jk_map_t *m, const char *wname, const char *def);
78
 
 
79
 
const char *jk_get_worker_redirect(jk_map_t *m, const char *wname, const char *def);
80
 
 
81
 
const char *jk_get_worker_secret_key(jk_map_t *m, const char *wname);
82
 
 
83
 
int jk_get_worker_retries(jk_map_t *m, const char *wname, int def);
84
 
 
85
 
int jk_get_is_worker_disabled(jk_map_t *m, const char *wname);
86
 
 
87
 
int jk_get_is_worker_stopped(jk_map_t *m, const char *wname);
88
 
 
89
 
void jk_set_log_format(const char *logformat);
90
 
 
91
 
int jk_get_worker_list(jk_map_t *m, char ***list, unsigned *num_of_wokers);
92
 
 
93
 
int jk_get_lb_factor(jk_map_t *m, const char *wname);
94
 
 
95
 
int jk_get_is_sticky_session(jk_map_t *m, const char *wname);
96
 
 
97
 
int jk_get_is_sticky_session_force(jk_map_t *m, const char *wname);
98
 
 
99
 
int jk_get_lb_method(jk_map_t *m, const char *wname);
100
 
 
101
 
int jk_get_lb_lock(jk_map_t *m, const char *wname);
102
 
 
103
 
int jk_get_lb_worker_list(jk_map_t *m,
104
 
                          const char *lb_wname,
105
 
                          char ***list, unsigned int *num_of_wokers);
106
 
int jk_get_worker_mount_list(jk_map_t *m,
107
 
                             const char *wname,
108
 
                             char ***list, unsigned int *num_of_maps);
109
 
const char *jk_get_worker_secret(jk_map_t *m, const char *wname);
110
 
 
111
 
int jk_get_worker_mx(jk_map_t *m, const char *wname, unsigned *mx);
112
 
 
113
 
int jk_get_worker_ms(jk_map_t *m, const char *wname, unsigned *ms);
114
 
 
115
 
int jk_get_worker_classpath(jk_map_t *m, const char *wname, const char **cp);
116
 
 
117
 
 
118
 
int jk_get_worker_bridge_type(jk_map_t *m, const char *wname, unsigned *bt);
119
 
 
120
 
int jk_get_worker_jvm_path(jk_map_t *m, const char *wname, const char **vm_path);
121
 
 
122
 
int jk_get_worker_callback_dll(jk_map_t *m,
123
 
                               const char *wname, const char **cb_path);
124
 
 
125
 
int jk_get_worker_cmd_line(jk_map_t *m, const char *wname, const char **cmd_line);
126
 
 
127
 
int jk_file_exists(const char *f);
128
 
 
129
 
int jk_is_path_poperty(const char *prp_name);
130
 
 
131
 
int jk_is_cmd_line_poperty(const char *prp_name);
132
 
 
133
 
int jk_is_unique_property(const char *prp_name);
134
 
 
135
 
int jk_get_worker_stdout(jk_map_t *m, const char *wname, const char **stdout_name);
136
 
 
137
 
int jk_get_worker_stderr(jk_map_t *m, const char *wname, const char **stderr_name);
138
 
 
139
 
int jk_get_worker_sysprops(jk_map_t *m, const char *wname, const char **sysprops);
140
 
 
141
 
int jk_get_worker_libpath(jk_map_t *m, const char *wname, const char **libpath);
142
 
 
143
 
char **jk_parse_sysprops(jk_pool_t *p, const char *sysprops);
144
 
 
145
 
 
146
 
void jk_append_libpath(jk_pool_t *p, const char *libpath);
147
 
 
148
 
void jk_set_worker_def_cache_size(int sz);
149
 
 
150
 
int jk_get_worker_def_cache_size(int protocol);
151
 
 
152
 
int jk_get_worker_maintain_time(jk_map_t *m);
153
 
 
154
 
#define TC32_BRIDGE_TYPE    32
155
 
#define TC33_BRIDGE_TYPE    33
156
 
#define TC40_BRIDGE_TYPE    40
157
 
#define TC41_BRIDGE_TYPE    41
158
 
#define TC50_BRIDGE_TYPE    50
159
 
 
160
 
#ifdef __cplusplus
161
 
extern "C"
162
 
{
163
 
#endif                          /* __cplusplus */
164
 
 
165
 
 
166
 
#ifdef __cplusplus
167
 
}
168
 
#endif                          /* __cplusplus */
169
 
#endif                          /* _JK_UTIL_H */