00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXUTIL_ENV_H
00019 #define AXUTIL_ENV_H
00020
00027 #include <axutil_allocator.h>
00028 #include <axutil_error.h>
00029 #include <axutil_log.h>
00030 #include <axutil_thread_pool.h>
00031
00032 #ifdef __cplusplus
00033 extern "C"
00034 {
00035 #endif
00036
00044 struct axutil_env;
00045 struct axutil_env_ops;
00046
00059 typedef struct axutil_env
00060 {
00061
00063 axutil_allocator_t *allocator;
00064
00066 axutil_error_t *error;
00067
00069 axutil_log_t *log;
00070
00072 axis2_bool_t log_enabled;
00073
00075 axutil_thread_pool_t *thread_pool;
00076
00077 int ref;
00078 }
00079 axutil_env_t;
00080
00088 AXIS2_EXTERN axutil_env_t *AXIS2_CALL
00089 axutil_env_create(
00090 axutil_allocator_t * allocator);
00091
00100 AXIS2_EXTERN axutil_env_t *AXIS2_CALL
00101 axutil_env_create_all(
00102 const axis2_char_t * log_file,
00103 const axutil_log_levels_t log_level);
00104
00105
00112 AXIS2_EXTERN axutil_env_t *AXIS2_CALL
00113 axutil_env_create_with_error(
00114 axutil_allocator_t * allocator,
00115 axutil_error_t * error);
00116
00125 AXIS2_EXTERN axutil_env_t *AXIS2_CALL
00126 axutil_env_create_with_error_log(
00127 axutil_allocator_t * allocator,
00128 axutil_error_t * error,
00129 axutil_log_t * log);
00130
00140 AXIS2_EXTERN axutil_env_t *AXIS2_CALL
00141 axutil_env_create_with_error_log_thread_pool(
00142 axutil_allocator_t * allocator,
00143 axutil_error_t * error,
00144 axutil_log_t * log,
00145 axutil_thread_pool_t * pool);
00146
00154 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00155 axutil_env_enable_log(
00156 axutil_env_t * env,
00157 axis2_bool_t enable);
00158
00165 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00166 axutil_env_check_status(
00167 const axutil_env_t * env);
00168
00174 AXIS2_EXTERN void AXIS2_CALL
00175 axutil_env_free(
00176 axutil_env_t * env);
00177
00178
00179 #define AXIS_ENV_FREE_LOG 0x1
00180 #define AXIS_ENV_FREE_ERROR 0x2
00181 #define AXIS_ENV_FREE_THREADPOOL 0x4
00182
00195 AXIS2_EXTERN void AXIS2_CALL
00196 axutil_env_free_masked(
00197 axutil_env_t * env,
00198 char mask);
00199
00207 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00208 axutil_env_increment_ref(
00209 axutil_env_t * env);
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222 #define AXIS2_ENV_CHECK(env, error_return)
00223
00226 #ifdef __cplusplus
00227 }
00228 #endif
00229
00230 #endif