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_CALLBACK
00045     } axiom_data_handler_type_t;
00046 
00047     typedef struct axiom_data_handler axiom_data_handler_t;
00048 
00059     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00060     axiom_data_handler_get_content_type(
00061         axiom_data_handler_t * data_handler,
00062         const axutil_env_t * env);
00063         
00070     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00071     axiom_data_handler_set_content_type(
00072         axiom_data_handler_t * data_handler,
00073         const axutil_env_t * env,
00074                 const axis2_char_t *mime_type);
00075 
00081     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
00082     axiom_data_handler_get_cached(
00083         axiom_data_handler_t * data_handler,
00084         const axutil_env_t * env);
00085         
00092     AXIS2_EXTERN void AXIS2_CALL
00093     axiom_data_handler_set_cached(
00094         axiom_data_handler_t * data_handler,
00095         const axutil_env_t * env,
00096                 axis2_bool_t cached);
00097 
00098 
00104     AXIS2_EXTERN axis2_byte_t *AXIS2_CALL
00105 
00106     axiom_data_handler_get_input_stream(
00107         axiom_data_handler_t * data_handler,
00108         const axutil_env_t * env);
00109 
00115     AXIS2_EXTERN int AXIS2_CALL
00116     axiom_data_handler_get_input_stream_len(
00117         axiom_data_handler_t * data_handler,
00118         const axutil_env_t * env);
00119 
00127     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00128     axiom_data_handler_read_from(
00129         axiom_data_handler_t * data_handler,
00130         const axutil_env_t * env,
00131         axis2_byte_t ** output_stream,
00132         int *output_stream_size);
00133 
00139     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00140 
00141     axiom_data_handler_set_binary_data(
00142         axiom_data_handler_t * data_handler,
00143         const axutil_env_t * env,
00144         axis2_byte_t * input_stream,
00145         int input_stream_len);
00146 
00152     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00153     axiom_data_handler_write_to(
00154         axiom_data_handler_t * data_handler,
00155         const axutil_env_t * env);
00156 
00162     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00163     axiom_data_handler_set_file_name(
00164         axiom_data_handler_t * data_handler,
00165         const axutil_env_t * env,
00166         axis2_char_t * file_name);
00167 
00173     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00174     axiom_data_handler_get_file_name(
00175         axiom_data_handler_t * data_handler,
00176         const axutil_env_t * env);
00177 
00183     AXIS2_EXTERN void AXIS2_CALL
00184     axiom_data_handler_free(
00185         axiom_data_handler_t * data_handler,
00186         const axutil_env_t * env);
00187 
00192     AXIS2_EXTERN axiom_data_handler_t *AXIS2_CALL
00193     axiom_data_handler_create(
00194         const axutil_env_t * env,
00195         const axis2_char_t * file_name,
00196         const axis2_char_t * mime_type);
00197 
00198     /* Add the binary to the array_list
00199      * @param data_handler, a pointer to data handler struct
00200      * data_handler, a pointer to data handler struct
00201      * list, a pointer to an array_list which containing some message parts need 
00202      * to be written to the wire
00203      * data_handler, a pointer to data handler struct
00204      */ 
00205     
00206     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00207     axiom_data_handler_add_binary_data(
00208         axiom_data_handler_t *data_handler,
00209         const axutil_env_t *env,
00210         axutil_array_list_t *list);
00211    
00212  
00213     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00214     axiom_data_handler_get_mime_id(
00215         axiom_data_handler_t *data_handler,
00216         const axutil_env_t *env);
00217 
00225     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00226     axiom_data_handler_set_mime_id(
00227         axiom_data_handler_t *data_handler,
00228         const axutil_env_t *env,
00229         const axis2_char_t *mime_id);
00230 
00231 
00232     AXIS2_EXTERN axiom_data_handler_type_t AXIS2_CALL
00233     axiom_data_handler_get_data_handler_type(
00234         axiom_data_handler_t *data_handler,
00235         const axutil_env_t *env);
00236 
00237     AXIS2_EXTERN void AXIS2_CALL
00238     axiom_data_handler_set_data_handler_type(
00239         axiom_data_handler_t *data_handler,
00240         const axutil_env_t *env,
00241         axiom_data_handler_type_t data_handler_type);
00242 
00243     AXIS2_EXTERN void *AXIS2_CALL
00244     axiom_data_handler_get_user_param(
00245         axiom_data_handler_t *data_handler,
00246         const axutil_env_t *env);
00247 
00248     AXIS2_EXTERN void AXIS2_CALL
00249     axiom_data_handler_set_user_param(
00250         axiom_data_handler_t *data_handler,
00251         const axutil_env_t *env,
00252         void *user_param);
00253 
00254     
00257 #ifdef __cplusplus
00258 }
00259 #endif
00260 #endif                          /* AXIOM_DATA_HANDLER_H */

Generated on Fri Apr 17 11:49:42 2009 for Axis2/C by  doxygen 1.5.3