axiom_data_handler.h

Go to the documentation of this file.
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 AXIOM_DATA_HANDLER_H
00020 #define AXIOM_DATA_HANDLER_H
00021 
00027 #include <axutil_utils.h>
00028 #include <axutil_error.h>
00029 #include <axutil_utils_defines.h>
00030 #include <axutil_env.h>
00031 #include <axutil_allocator.h>
00032 #include <axutil_string.h>
00033 #include <axutil_array_list.h>
00034 
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039 
00040     typedef enum axiom_data_handler_type
00041     {
00042         AXIOM_DATA_HANDLER_TYPE_FILE,
00043         AXIOM_DATA_HANDLER_TYPE_BUFFER
00044     } axiom_data_handler_type_t;
00045 
00046     typedef struct axiom_data_handler axiom_data_handler_t;
00047 
00058     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00059     axiom_data_handler_get_content_type(
00060         axiom_data_handler_t * data_handler,
00061         const axutil_env_t * env);
00062         
00069     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00070     axiom_data_handler_set_content_type(
00071         axiom_data_handler_t * data_handler,
00072         const axutil_env_t * env,
00073                 const axis2_char_t *mime_type);
00074 
00080     AXIS2_EXTERN axis2_byte_t *AXIS2_CALL
00081 
00082     axiom_data_handler_get_input_stream(
00083         axiom_data_handler_t * data_handler,
00084         const axutil_env_t * env);
00085 
00091     AXIS2_EXTERN int AXIS2_CALL
00092     axiom_data_handler_get_input_stream_len(
00093         axiom_data_handler_t * data_handler,
00094         const axutil_env_t * env);
00095 
00103     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00104     axiom_data_handler_read_from(
00105         axiom_data_handler_t * data_handler,
00106         const axutil_env_t * env,
00107         axis2_byte_t ** output_stream,
00108         int *output_stream_size);
00109 
00115     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00116 
00117     axiom_data_handler_set_binary_data(
00118         axiom_data_handler_t * data_handler,
00119         const axutil_env_t * env,
00120         axis2_byte_t * input_stream,
00121         int input_stream_len);
00122 
00128     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00129     axiom_data_handler_write_to(
00130         axiom_data_handler_t * data_handler,
00131         const axutil_env_t * env);
00132 
00138     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00139     axiom_data_handler_set_file_name(
00140         axiom_data_handler_t * data_handler,
00141         const axutil_env_t * env,
00142         axis2_char_t * file_name);
00143 
00149     AXIS2_EXTERN void AXIS2_CALL
00150     axiom_data_handler_free(
00151         axiom_data_handler_t * data_handler,
00152         const axutil_env_t * env);
00153 
00158     AXIS2_EXTERN axiom_data_handler_t *AXIS2_CALL
00159     axiom_data_handler_create(
00160         const axutil_env_t * env,
00161         const axis2_char_t * file_name,
00162         const axis2_char_t * mime_type);
00163 
00166 #ifdef __cplusplus
00167 }
00168 #endif
00169 #endif                          /* AXIOM_DATA_HANDLER_H */

Generated on Fri Jul 11 11:56:35 2008 for Axis2/C by  doxygen 1.5.5