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 
00068     AXIS2_EXTERN axis2_byte_t *AXIS2_CALL
00069 
00070     axiom_data_handler_get_input_stream(
00071         axiom_data_handler_t * data_handler,
00072         const axutil_env_t * env);
00073 
00079     AXIS2_EXTERN int AXIS2_CALL
00080     axiom_data_handler_get_input_stream_len(
00081         axiom_data_handler_t * data_handler,
00082         const axutil_env_t * env);
00083 
00091     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00092     axiom_data_handler_read_from(
00093         axiom_data_handler_t * data_handler,
00094         const axutil_env_t * env,
00095         axis2_byte_t ** output_stream,
00096         int *output_stream_size);
00097 
00103     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00104 
00105     axiom_data_handler_set_binary_data(
00106         axiom_data_handler_t * data_handler,
00107         const axutil_env_t * env,
00108         axis2_byte_t * input_stream,
00109         int input_stream_len);
00110 
00116     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00117     axiom_data_handler_write_to(
00118         axiom_data_handler_t * data_handler,
00119         const axutil_env_t * env);
00120 
00126     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00127     axiom_data_handler_set_file_name(
00128         axiom_data_handler_t * data_handler,
00129         const axutil_env_t * env,
00130         axis2_char_t * file_name);
00131 
00137     AXIS2_EXTERN void AXIS2_CALL
00138     axiom_data_handler_free(
00139         axiom_data_handler_t * data_handler,
00140         const axutil_env_t * env);
00141 
00146     AXIS2_EXTERN axiom_data_handler_t *AXIS2_CALL
00147     axiom_data_handler_create(
00148         const axutil_env_t * env,
00149         const axis2_char_t * file_name,
00150         const axis2_char_t * mime_type);
00151 
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157 #endif                          /* AXIOM_DATA_HANDLER_H */

Generated on Sat May 3 10:44:33 2008 for Axis2/C by  doxygen 1.5.5