Classes | |
struct | axis2_env |
Axis2 Environment struct. More... | |
Defines | |
#define | AXIS2_LOG(env, message, level) axis2_env_write_log (env,message, level) |
#define | AXIS2_ENV_CHECK(env, error_return) |
Typedefs | |
typedef axis2_env | axis2_env_t |
Axis2 Environment struct. | |
Functions | |
AXIS2_EXTERN axis2_env_t * | axis2_env_create_all (const axis2_char_t *log_file, const axis2_log_levels_t log_level) |
AXIS2_EXTERN axis2_env_t * | axis2_env_create (axis2_allocator_t *allocator) |
AXIS2_EXTERN axis2_env_t * | axis2_env_create_with_error (axis2_allocator_t *allocator, axis2_error_t *error) |
AXIS2_EXTERN axis2_env_t * | axis2_env_create_with_error_log (axis2_allocator_t *allocator, axis2_error_t *error, axis2_log_t *log) |
AXIS2_EXTERN axis2_env_t * | axis2_env_create_with_error_log_thread_pool (axis2_allocator_t *allocator, axis2_error_t *error, axis2_log_t *log, axis2_thread_pool_t *pool) |
AXIS2_EXTERN axis2_status_t | axis2_env_free (axis2_env_t *env) |
AXIS2_EXTERN axis2_status_t | axis2_env_free_masked (axis2_env_t *env, char mask) |
AXIS2_EXTERN axis2_status_t | axis2_env_enable_log (axis2_env_t *env, axis2_bool_t enable) |
AXIS2_EXTERN axis2_status_t | axis2_env_check_status (const axis2_env_t *env) |
AXIS2_EXTERN axis2_status_t | axis2_env_write_log (const axis2_env_t *env, const char *message, axis2_log_levels_t level) |
#define AXIS2_ENV_CHECK | ( | env, | |||
error_return | ) |
Value:
if(!env) \ { \ return error_return; \ }
typedef struct axis2_env axis2_env_t |
Axis2 Environment struct.
Environment acts as a container for error, log, memory allocator and other routines
AXIS2_EXTERN axis2_status_t axis2_env_check_status | ( | const axis2_env_t * | env | ) |
Checks the status code of environment
AXIS2_EXTERN axis2_env_t* axis2_env_create | ( | axis2_allocator_t * | allocator | ) |
Creates an environment struct. Users of axis2 should not use this function to create an environment. He should use the other two create functions.
allocator | pointer to an instance of allocator struct. Must be non-NULL |
AXIS2_EXTERN axis2_env_t* axis2_env_create_all | ( | const axis2_char_t * | log_file, | |
const axis2_log_levels_t | log_level | |||
) |
Creates an environment struct with all of its default parts, that is an allocator, error, log and a thread pool.
log_file | name of the log file | |
log_level | log level to be used |
AXIS2_EXTERN axis2_env_t* axis2_env_create_with_error | ( | axis2_allocator_t * | allocator, | |
axis2_error_t * | error | |||
) |
Creates an environment struct
allocator | pointer to an instance of allocator struct. Must be non-NULL | |
error | pointer to an instance of error struct. Must be non-NULL. it would be taken as a flag for no logging. |
AXIS2_EXTERN axis2_env_t* axis2_env_create_with_error_log | ( | axis2_allocator_t * | allocator, | |
axis2_error_t * | error, | |||
axis2_log_t * | log | |||
) |
Creates an environment struct
allocator | pointer to an instance of allocator struct. Must be non-NULL | |
error | pointer to an instance of error struct. Must be non-NULL. | |
log | pointer to an instance of log struct. May be NULL. If NULL it would be taken as a flag for no logging. |
AXIS2_EXTERN axis2_env_t* axis2_env_create_with_error_log_thread_pool | ( | axis2_allocator_t * | allocator, | |
axis2_error_t * | error, | |||
axis2_log_t * | log, | |||
axis2_thread_pool_t * | pool | |||
) |
Creates an environment struct
allocator | pointer to an instance of allocator struct. Must be non-NULL | |
error | pointer to an instance of error struct. Must be non-NULL. | |
log | pointer to an instance of log struct. May be NULL. If NULL it would be taken as a flag for no logging. | |
pool | pointer to an instance of thread_pool. May be NULL. If NULL |
AXIS2_EXTERN axis2_status_t axis2_env_enable_log | ( | axis2_env_t * | env, | |
axis2_bool_t | enable | |||
) |
Enables logging
AXIS2_EXTERN axis2_status_t axis2_env_free | ( | axis2_env_t * | env | ) |
Creates an environment struct
allocator | pointer to an instance of allocator struct. Mandatory, cannot be NULL | |
error | pointer to an instance of error struct. Optional, can be NULL. If NULL default error handler would be used. | |
log | pointer to an instance of log struct. Optional, can be NULL. If NULL default log handler would be used. | |
string | pointer to an instance of string struct. Optional, can be NULL. If NULL default string handler would be used. |
AXIS2_EXTERN axis2_status_t axis2_env_free_masked | ( | axis2_env_t * | env, | |
char | mask | |||
) |
Frees the environment
env | environment to be freed | |
mask | bit pattern to according to which the components of the env struct are freed 0x1 - Frees the log 0x2 - Frees the error 0x4 - Frees the thread pool You can use combinations to free multiple components as well Eg : 0x3 frees both log and error |
AXIS2_EXTERN axis2_status_t axis2_env_write_log | ( | const axis2_env_t * | env, | |
const char * | message, | |||
axis2_log_levels_t | level | |||
) |
Writes given message to the log