00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef AXIS2_HTTP_SIMPLE_RESPONSE_H
00020 #define AXIS2_HTTP_SIMPLE_RESPONSE_H
00021
00033 #include <axis2_const.h>
00034 #include <axis2_defines.h>
00035 #include <axutil_env.h>
00036 #include <axutil_array_list.h>
00037 #include <axis2_http_status_line.h>
00038 #include <axis2_http_header.h>
00039 #include <axutil_stream.h>
00040
00041 #ifdef __cplusplus
00042 extern "C"
00043 {
00044 #endif
00045
00047 typedef struct axis2_http_simple_response axis2_http_simple_response_t;
00048
00057 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00058
00059 axis2_http_simple_response_set_status_line(
00060 struct axis2_http_simple_response *simple_response,
00061 const axutil_env_t * env,
00062 const axis2_char_t * http_ver,
00063 const int status_code,
00064 const axis2_char_t * phrase);
00065
00070 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00071
00072 axis2_http_simple_response_get_phrase(
00073 axis2_http_simple_response_t * simple_response,
00074 const axutil_env_t * env);
00075
00080 AXIS2_EXTERN int AXIS2_CALL
00081 axis2_http_simple_response_get_status_code(
00082 axis2_http_simple_response_t * simple_response,
00083 const axutil_env_t * env);
00084
00089 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00090
00091 axis2_http_simple_response_get_http_version(
00092 axis2_http_simple_response_t * simple_response,
00093 const axutil_env_t * env);
00094
00099 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00100
00101 axis2_http_simple_response_get_status_line(
00102 axis2_http_simple_response_t * simple_response,
00103 const axutil_env_t * env);
00104
00110 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
00111
00112 axis2_http_simple_response_contains_header(
00113 axis2_http_simple_response_t * simple_response,
00114 const axutil_env_t * env,
00115 const axis2_char_t * name);
00116
00121 AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
00122
00123 axis2_http_simple_response_get_headers(
00124 axis2_http_simple_response_t * simple_response,
00125 const axutil_env_t * env);
00126
00131 AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
00132 axis2_http_simple_response_extract_headers(
00133 axis2_http_simple_response_t * simple_response,
00134 const axutil_env_t * env);
00135
00141 AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL
00142
00143 axis2_http_simple_response_get_first_header(
00144 axis2_http_simple_response_t * simple_response,
00145 const axutil_env_t * env,
00146 const axis2_char_t * str);
00147
00154 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00155
00156 axis2_http_simple_response_remove_headers(
00157 axis2_http_simple_response_t * simple_response,
00158 const axutil_env_t * env,
00159 const axis2_char_t * str);
00160
00167 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00168
00169 axis2_http_simple_response_set_header(
00170 axis2_http_simple_response_t * simple_response,
00171 const axutil_env_t * env,
00172 axis2_http_header_t * header);
00173
00181 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00182
00183 axis2_http_simple_response_set_headers(
00184 axis2_http_simple_response_t * simple_response,
00185 const axutil_env_t * env,
00186 axis2_http_header_t ** headers,
00187 axis2_ssize_t array_size);
00188
00193 AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
00194
00195 axis2_http_simple_response_get_charset(
00196 axis2_http_simple_response_t * simple_response,
00197 const axutil_env_t * env);
00198
00203 AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
00204
00205 axis2_http_simple_response_get_content_length(
00206 axis2_http_simple_response_t * simple_response,
00207 const axutil_env_t * env);
00208
00213 AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
00214
00215 axis2_http_simple_response_get_content_type(
00216 axis2_http_simple_response_t * simple_response,
00217 const axutil_env_t * env);
00218
00225 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00226
00227 axis2_http_simple_response_set_body_string(
00228 axis2_http_simple_response_t * simple_response,
00229 const axutil_env_t * env,
00230 axis2_char_t * str);
00231
00238 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00239
00240 axis2_http_simple_response_set_body_stream(
00241 axis2_http_simple_response_t * simple_response,
00242 const axutil_env_t * env,
00243 axutil_stream_t * stream);
00244
00249 AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
00250
00251 axis2_http_simple_response_get_body(
00252 axis2_http_simple_response_t * simple_response,
00253 const axutil_env_t * env);
00254
00260 AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
00261
00262 axis2_http_simple_response_get_body_bytes(
00263 axis2_http_simple_response_t * simple_response,
00264 const axutil_env_t * env,
00265 axis2_char_t ** buf);
00266
00272 AXIS2_EXTERN void AXIS2_CALL
00273 axis2_http_simple_response_free(
00274 axis2_http_simple_response_t * simple_response,
00275 const axutil_env_t * env);
00276
00284 AXIS2_EXTERN axis2_http_simple_response_t *AXIS2_CALL
00285
00286 axis2_http_simple_response_create(
00287 const axutil_env_t * env,
00288 axis2_http_status_line_t * status_line,
00289 const axis2_http_header_t ** http_headers,
00290 const axis2_ssize_t http_hdr_count,
00291 axutil_stream_t * content);
00292
00296 AXIS2_EXTERN axis2_http_simple_response_t *AXIS2_CALL
00297
00298 axis2_http_simple_response_create_default(
00299 const axutil_env_t * env);
00300
00301 AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
00302 axis2_http_simple_response_get_mime_parts(
00303 axis2_http_simple_response_t * simple_response,
00304 const axutil_env_t * env);
00305
00306 AXIS2_EXTERN void AXIS2_CALL
00307 axis2_http_simple_response_set_mime_parts(
00308 axis2_http_simple_response_t * simple_response,
00309 const axutil_env_t * env,
00310 axutil_array_list_t *mime_parts);
00311
00312 axis2_status_t AXIS2_CALL
00313 axis2_http_simple_response_set_http_version(
00314 axis2_http_simple_response_t * simple_response,
00315 const axutil_env_t * env,
00316 axis2_char_t *http_version);
00317
00318 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00319 axis2_http_simple_response_get_mtom_sending_callback_name(
00320 axis2_http_simple_response_t * simple_response,
00321 const axutil_env_t * env);
00322
00323 void AXIS2_EXTERN AXIS2_CALL
00324 axis2_http_simple_response_set_mtom_sending_callback_name(
00325 axis2_http_simple_response_t * simple_response,
00326 const axutil_env_t * env,
00327 axis2_char_t *mtom_sending_callback_name);
00328
00329
00330
00331
00333 #ifdef __cplusplus
00334 }
00335 #endif
00336
00337 #endif