Main Page | Modules | Class List | Directories | File List | Class Members | File Members

Environment Container
[Axis2 utilities]


Classes

struct  axis2_environment
 Axis2 Environment struct. More...

Defines

#define AXIS2_LOG(env, message)   axis2_env_write_log (env,message)
#define AXIS2_ENV_CHECK(env, error_return)

Typedefs

typedef axis2_environment axis2_env_t
 Axis2 Environment struct.

Functions

axis2_env_taxis2_env_create (axis2_allocator_t *allocator)
axis2_env_taxis2_env_create_with_error_stream (axis2_allocator_t *allocator, axis2_error_t *error, axis2_stream_t *stream)
axis2_env_taxis2_env_create_with_error_stream_log (axis2_allocator_t *allocator, axis2_error_t *error, axis2_stream_t *stream, axis2_log_t *log)
axis2_status_t axis2_env_free (axis2_env_t *env)
axis2_status_t axis2_env_enable_log (axis2_env_t **env, axis2_bool_t enable)
axis2_status_t axis2_env_check_status (axis2_env_t **env)
axis2_status_t axis2_env_write_log (axis2_env_t **env, const char *message)

Define Documentation

#define AXIS2_ENV_CHECK env,
error_return   ) 
 

Value:

if(!env || !(*env))  \
        { \
                axis2_allocator_t *allocator = axis2_allocator_init (NULL); \
        *env = axis2_env_create (allocator); \
                AXIS2_ERROR_SET_STATUS_CODE((*env)->error, AXIS2_CRTICAL_FAILURE);  \
                AXIS2_ERROR_SET_ERROR_NUMBER((*env)->error, \
                        AXIS2_ERROR_ENVIRONMENT_IS_NULL); \
                return error_return; \
        } \
    else \
    { \
        AXIS2_ERROR_SET_STATUS_CODE((*env)->error, AXIS2_SUCCESS); \
    }


Typedef Documentation

typedef struct axis2_environment axis2_env_t
 

Axis2 Environment struct.

Environment acts as a container for error, log, memory allocator and other routines


Function Documentation

axis2_status_t axis2_env_check_status axis2_env_t **  env  ) 
 

Checks the status code of environment

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.

Parameters:
allocator pointer to an instance of allocator struct. Must be non-NULL
Returns:
pointer to the newly created environment struct

axis2_env_t* axis2_env_create_with_error_stream axis2_allocator_t allocator,
axis2_error_t error,
axis2_stream_t stream
 

Creates an environment struct

Parameters:
allocator pointer to an instance of allocator struct. Must be non-NULL
error pointer to an instance of error struct. Must be non-NULL.
stream pointer to an instance of stream struct. Must be non-NULL. it would be taken as a flag for no logging.
Returns:
pointer to the newly created environment struct

axis2_env_t* axis2_env_create_with_error_stream_log axis2_allocator_t allocator,
axis2_error_t error,
axis2_stream_t stream,
axis2_log_t log
 

Creates an environment struct

Parameters:
allocator pointer to an instance of allocator struct. Must be non-NULL
error pointer to an instance of error struct. Must be non-NULL.
stream pointer to an instance of stream 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.
Returns:
pointer to the newly created environment struct

axis2_status_t axis2_env_enable_log axis2_env_t **  env,
axis2_bool_t  enable
 

Enables logging

axis2_status_t axis2_env_free axis2_env_t env  ) 
 

Creates an environment struct

Parameters:
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.
stream pointer to an instance of stream struct. Optional, can be NULL. If NULL default stream 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.
Returns:
pointer to the newly created environment struct

axis2_status_t axis2_env_write_log axis2_env_t **  env,
const char *  message
 

Writes given message to the log


Generated on Wed Dec 7 07:58:28 2005 for Axis2/C by  doxygen 1.4.2