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
00033 #include <axis2_const.h>
00034 #include <axis2_defines.h>
00035 #include <axis2_env.h>
00036
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041
00043 typedef struct axis2_http_header_ops axis2_http_header_ops_t;
00045 typedef struct axis2_http_header axis2_http_header_t;
00046
00047
00052 struct axis2_http_header_ops
00053 {
00058 axis2_char_t *(AXIS2_CALL *
00059 to_external_form)(
00060 axis2_http_header_t *header,
00061 const axis2_env_t *env);
00062
00067 axis2_char_t *(AXIS2_CALL *
00068 get_name)(
00069 const axis2_http_header_t *header,
00070 const axis2_env_t *env);
00071
00076 axis2_char_t *(AXIS2_CALL *
00077 get_value)(
00078 const axis2_http_header_t *header,
00079 const axis2_env_t *env);
00080
00086 axis2_status_t (AXIS2_CALL *
00087 free)(
00088 axis2_http_header_t *header,
00089 const axis2_env_t *env);
00090 };
00091
00096 struct axis2_http_header
00097 {
00099 axis2_http_header_ops_t *ops;
00100 };
00101
00102
00108 AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL
00109 axis2_http_header_create (
00110 const axis2_env_t *env,
00111 const axis2_char_t *name,
00112 const axis2_char_t *value);
00113
00118 AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL AXIS2_CALL
00119 axis2_http_header_create_by_str (
00120 const axis2_env_t *env,
00121 const axis2_char_t *str);
00122
00123
00124
00127 #define AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(header, env) \
00128 ((header)->ops->to_external_form(header, env))
00129
00132 #define AXIS2_HTTP_HEADER_GET_NAME(header, env) \
00133 ((header)->ops->get_name(header, env))
00134
00137 #define AXIS2_HTTP_HEADER_GET_VALUE(header, env) \
00138 ((header)->ops->get_value(header, env))
00139
00142 #define AXIS2_HTTP_HEADER_FREE(header, env) \
00143 ((header)->ops->free(header, env))
00144
00145
00146
00148 #ifdef __cplusplus
00149 }
00150 #endif
00151
00152 #endif