00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_HTTP_HEADER_H
00018 #define AXIS2_HTTP_HEADER_H
00019
00020
00026 #include <axis2_const.h>
00027 #include <axis2_defines.h>
00028 #include <axis2_env.h>
00029
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034
00040 typedef struct axis2_http_header_ops axis2_http_header_ops_t;
00041 typedef struct axis2_http_header axis2_http_header_t;
00042
00043
00048 AXIS2_DECLARE_DATA struct axis2_http_header_ops
00049 {
00050 axis2_char_t* (AXIS2_CALL *to_external_form) (axis2_http_header_t *header,
00051 const axis2_env_t *env);
00052
00053 axis2_char_t* (AXIS2_CALL *get_name) (axis2_http_header_t *header,
00054 const axis2_env_t *env);
00055
00056 axis2_char_t* (AXIS2_CALL *get_value) (axis2_http_header_t *header,
00057 const axis2_env_t *env);
00058
00059 axis2_status_t (AXIS2_CALL *free) (axis2_http_header_t *header,
00060 const axis2_env_t *env);
00061 };
00062
00067 AXIS2_DECLARE_DATA struct axis2_http_header
00068 {
00069 axis2_http_header_ops_t *ops;
00070 };
00071
00072
00073 AXIS2_EXTERN axis2_http_header_t * AXIS2_CALL
00074 axis2_http_header_create (const axis2_env_t *env,
00075 const axis2_char_t *name,
00076 const axis2_char_t *value);
00077
00078 AXIS2_EXTERN axis2_http_header_t * AXIS2_CALL AXIS2_CALL
00079 axis2_http_header_create_by_str (const axis2_env_t *env, const axis2_char_t *str);
00080
00081
00082 #define AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(header, env) \
00083 ((header)->ops->to_external_form(header, env))
00084 #define AXIS2_HTTP_HEADER_GET_NAME(header, env) \
00085 ((header)->ops->get_name(header, env))
00086 #define AXIS2_HTTP_HEADER_GET_VALUE(header, env) \
00087 ((header)->ops->get_value(header, env))
00088 #define AXIS2_HTTP_HEADER_FREE(header, env) \
00089 ((header)->ops->free(header, env))
00090
00091
00092
00094 #ifdef __cplusplus
00095 }
00096 #endif
00097
00098 #endif