axis2_http_simple_response.h

00001 
00002 /*
00003  * Licensed to the Apache Software Foundation (ASF) under one or more
00004  * contributor license agreements.  See the NOTICE file distributed with
00005  * this work for additional information regarding copyright ownership.
00006  * The ASF licenses this file to You under the Apache License, Version 2.0
00007  * (the "License"); you may not use this file except in compliance with
00008  * the License.  You may obtain a copy of the License at
00009  *
00010  *      http://www.apache.org/licenses/LICENSE-2.0
00011  *
00012  * Unless required by applicable law or agreed to in writing, software
00013  * distributed under the License is distributed on an "AS IS" BASIS,
00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  * See the License for the specific language governing permissions and
00016  * limitations under the License.
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 
00132     AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL
00133 
00134     axis2_http_simple_response_get_first_header(
00135         axis2_http_simple_response_t * simple_response,
00136         const axutil_env_t * env,
00137         const axis2_char_t * str);
00138 
00145     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00146 
00147     axis2_http_simple_response_remove_headers(
00148         axis2_http_simple_response_t * simple_response,
00149         const axutil_env_t * env,
00150         const axis2_char_t * str);
00151 
00158     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00159 
00160     axis2_http_simple_response_set_header(
00161         axis2_http_simple_response_t * simple_response,
00162         const axutil_env_t * env,
00163         axis2_http_header_t * header);
00164 
00172     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00173 
00174     axis2_http_simple_response_set_headers(
00175         axis2_http_simple_response_t * simple_response,
00176         const axutil_env_t * env,
00177         axis2_http_header_t ** headers,
00178         axis2_ssize_t array_size);
00179 
00184     AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
00185 
00186     axis2_http_simple_response_get_charset(
00187         axis2_http_simple_response_t * simple_response,
00188         const axutil_env_t * env);
00189 
00194     AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
00195 
00196     axis2_http_simple_response_get_content_length(
00197         axis2_http_simple_response_t * simple_response,
00198         const axutil_env_t * env);
00199 
00204     AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
00205 
00206     axis2_http_simple_response_get_content_type(
00207         axis2_http_simple_response_t * simple_response,
00208         const axutil_env_t * env);
00209 
00216     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00217 
00218     axis2_http_simple_response_set_body_string(
00219         axis2_http_simple_response_t * simple_response,
00220         const axutil_env_t * env,
00221         axis2_char_t * str);
00222 
00229     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00230 
00231     axis2_http_simple_response_set_body_stream(
00232         axis2_http_simple_response_t * simple_response,
00233         const axutil_env_t * env,
00234         axutil_stream_t * stream);
00235 
00240     AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
00241 
00242     axis2_http_simple_response_get_body(
00243         axis2_http_simple_response_t * simple_response,
00244         const axutil_env_t * env);
00245 
00251     AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
00252 
00253     axis2_http_simple_response_get_body_bytes(
00254         axis2_http_simple_response_t * simple_response,
00255         const axutil_env_t * env,
00256         axis2_char_t ** buf);
00257 
00263     AXIS2_EXTERN void AXIS2_CALL
00264     axis2_http_simple_response_free(
00265         axis2_http_simple_response_t * simple_response,
00266         const axutil_env_t * env);
00267 
00275     AXIS2_EXTERN axis2_http_simple_response_t *AXIS2_CALL
00276 
00277     axis2_http_simple_response_create(
00278         const axutil_env_t * env,
00279         axis2_http_status_line_t * status_line,
00280         const axis2_http_header_t ** http_headers,
00281         const axis2_ssize_t http_hdr_count,
00282         axutil_stream_t * content);
00283 
00287     AXIS2_EXTERN axis2_http_simple_response_t *AXIS2_CALL
00288 
00289     axis2_http_simple_response_create_default(
00290         const axutil_env_t * env);
00291 
00293 #ifdef __cplusplus
00294 }
00295 #endif
00296 
00297 #endif                          /* AXIS2_HTTP_SIMPLE_RESPONSE_H */

Generated on Wed Jan 2 17:42:50 2008 for Axis2/C by  doxygen 1.5.1