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 int AXIS2_CALL
00063     axiom_data_handler_get_input_stream_len(axiom_data_handler_t *data_handler,
00064         const axutil_env_t *env);
00065 
00066     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00067     axiom_data_handler_read_from(axiom_data_handler_t *data_handler,
00068         const axutil_env_t *env,
00069         axis2_byte_t** output_stream,
00070         int *output_stream_size);
00071 
00072     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00073     axiom_data_handler_set_binary_data(axiom_data_handler_t *data_handler,
00074         const axutil_env_t *env,
00075         axis2_byte_t* input_stream,
00076         int input_stream_len);
00077 
00078     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00079     axiom_data_handler_write_to(axiom_data_handler_t *data_handler,
00080         const axutil_env_t *env);
00081 
00082     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00083     axiom_data_handler_set_file_name(axiom_data_handler_t *data_handler,
00084         const axutil_env_t *env,
00085         axis2_char_t* file_name);
00086 
00087     AXIS2_EXTERN void AXIS2_CALL
00088     axiom_data_handler_free(axiom_data_handler_t *data_handler,
00089         const axutil_env_t *env);
00090 
00095     AXIS2_EXTERN axiom_data_handler_t * AXIS2_CALL
00096     axiom_data_handler_create(const axutil_env_t *env,
00097         const axis2_char_t *file_name,
00098         const axis2_char_t *mime_type);
00099 
00102 #ifdef __cplusplus
00103 }
00104 #endif
00105 #endif  /* AXIOM_DATA_HANDLER_H */

Generated on Wed Sep 26 09:49:20 2007 for Axis2/C by  doxygen 1.4.6