axiom_data_handler.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef AXIOM_DATA_HANDLER_H
00019 #define AXIOM_DATA_HANDLER_H
00020 
00026 #include <axutil_utils.h>
00027 #include <axutil_error.h>
00028 #include <axutil_utils_defines.h>
00029 #include <axutil_env.h>
00030 #include <axutil_allocator.h>
00031 #include <axutil_string.h>
00032 #include <axutil_array_list.h>
00033 
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 
00047     typedef struct axiom_data_handler axiom_data_handler_t;
00048 
00054     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00055     axiom_data_handler_get_content_type(axiom_data_handler_t *data_handler,
00056         const axutil_env_t *env);
00057 
00058     AXIS2_EXTERN axis2_byte_t *AXIS2_CALL
00059     axiom_data_handler_get_input_stream(axiom_data_handler_t *data_handler,
00060         const axutil_env_t *env);
00061 
00062     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00063     axiom_data_handler_read_from(axiom_data_handler_t *data_handler,
00064         const axutil_env_t *env,
00065         axis2_byte_t** output_stream,
00066         int *output_stream_size);
00067 
00068     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00069     axiom_data_handler_set_binary_data(axiom_data_handler_t *data_handler,
00070         const axutil_env_t *env,
00071         axis2_byte_t* input_stream,
00072         int input_stream_len);
00073 
00074     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00075     axiom_data_handler_write_to(axiom_data_handler_t *data_handler,
00076         const axutil_env_t *env);
00077 
00078     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00079     axiom_data_handler_set_file_name(axiom_data_handler_t *data_handler,
00080         const axutil_env_t *env,
00081         axis2_char_t* file_name);
00082 
00083     AXIS2_EXTERN void AXIS2_CALL
00084     axiom_data_handler_free(axiom_data_handler_t *data_handler,
00085         const axutil_env_t *env);
00086 
00091     AXIS2_EXTERN axiom_data_handler_t * AXIS2_CALL
00092     axiom_data_handler_create(const axutil_env_t *env,
00093         const axis2_char_t *file_name,
00094         const axis2_char_t *mime_type);
00095 
00098 #ifdef __cplusplus
00099 }
00100 #endif
00101 #endif  /* AXIOM_DATA_HANDLER_H */

Generated on Thu May 3 12:31:01 2007 for Axis2/C by  doxygen 1.4.6