00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_HTTP_HEADER_H
00019 #define AXIS2_HTTP_HEADER_H
00020
00034 #include <axis2_const.h>
00035 #include <axis2_defines.h>
00036 #include <axis2_env.h>
00037
00038 #ifdef __cplusplus
00039 extern "C"
00040 {
00041 #endif
00042
00044 typedef struct axis2_http_header_ops axis2_http_header_ops_t;
00046 typedef struct axis2_http_header axis2_http_header_t;
00047
00048
00053 struct axis2_http_header_ops
00054 {
00059 axis2_char_t *(AXIS2_CALL *
00060 to_external_form)(
00061 axis2_http_header_t *header,
00062 const axis2_env_t *env);
00063
00068 axis2_char_t *(AXIS2_CALL *
00069 get_name)(
00070 const axis2_http_header_t *header,
00071 const axis2_env_t *env);
00072
00077 axis2_char_t *(AXIS2_CALL *
00078 get_value)(
00079 const axis2_http_header_t *header,
00080 const axis2_env_t *env);
00081
00087 axis2_status_t (AXIS2_CALL *
00088 free)(
00089 axis2_http_header_t *header,
00090 const axis2_env_t *env);
00091 };
00092
00097 struct axis2_http_header
00098 {
00100 axis2_http_header_ops_t *ops;
00101 };
00102
00103
00109 AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL
00110 axis2_http_header_create (
00111 const axis2_env_t *env,
00112 const axis2_char_t *name,
00113 const axis2_char_t *value);
00114
00119 AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL AXIS2_CALL
00120 axis2_http_header_create_by_str (
00121 const axis2_env_t *env,
00122 const axis2_char_t *str);
00123
00124
00125
00128 #define AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(header, env) \
00129 ((header)->ops->to_external_form(header, env))
00130
00133 #define AXIS2_HTTP_HEADER_GET_NAME(header, env) \
00134 ((header)->ops->get_name(header, env))
00135
00138 #define AXIS2_HTTP_HEADER_GET_VALUE(header, env) \
00139 ((header)->ops->get_value(header, env))
00140
00143 #define AXIS2_HTTP_HEADER_FREE(header, env) \
00144 ((header)->ops->free(header, env))
00145
00146
00147
00149 #ifdef __cplusplus
00150 }
00151 #endif
00152
00153 #endif