axiom_mime_parser.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_MIME_PARSER_H
00019 #define AXIOM_MIME_PARSER_H
00020 
00026 #include <axis2_utils.h>
00027 #include <axis2_error.h>
00028 #include <axis2_utils_defines.h>
00029 #include <axis2_env.h>
00030 #include <axis2_allocator.h>
00031 #include <axis2_string.h>
00032 #include <axis2_hash.h>
00033 #include <axiom_mime_const.h>
00034 
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039 
00040 typedef struct axiom_mime_parser_ops axiom_mime_parser_ops_t;
00041 typedef struct axiom_mime_parser axiom_mime_parser_t;   
00042    
00043 
00053 struct axiom_mime_parser_ops
00054 {
00055     axis2_hash_t* (AXIS2_CALL *
00056     parse)(
00057         axiom_mime_parser_t *mime_parser,
00058         const axis2_env_t *env, 
00059         AXIS2_READ_INPUT_CALLBACK,
00060         void *callback_ctx,
00061         axis2_char_t *mime_boundary);
00062     
00063     axis2_hash_t* (AXIS2_CALL *
00064     get_mime_parts_map)(
00065         axiom_mime_parser_t *mime_parser, 
00066         const axis2_env_t *env);
00067     
00071     axis2_status_t (AXIS2_CALL *
00072     free)(
00073         axiom_mime_parser_t *mime_parser,
00074         const axis2_env_t *env);
00075     
00076     int (AXIS2_CALL *
00077     get_soap_body_len)(
00078         axiom_mime_parser_t *mime_parser, 
00079         const axis2_env_t *env);
00080         
00081     axis2_char_t* (AXIS2_CALL *
00082     get_soap_body_str)(
00083         axiom_mime_parser_t *mime_parser, 
00084         const axis2_env_t *env);
00085 };
00086 
00091 struct axiom_mime_parser
00092 {
00093    axiom_mime_parser_ops_t *ops;
00094 };
00095 
00100 AXIS2_EXTERN axiom_mime_parser_t * AXIS2_CALL 
00101 axiom_mime_parser_create (const axis2_env_t *env);
00102 
00103 /*************************** Function macros **********************************/
00104 
00105 #define AXIOM_MIME_PARSER_FREE(mime_parser, env) \
00106 ((mime_parser)->ops->free (mime_parser, env))
00107 
00108 #define AXIOM_MIME_PARSER_PARSE(mime_parser, env, callback, callback_ctx, mime_boundary) \
00109 ((mime_parser)->ops->parse(mime_parser, env, callback, callback_ctx, mime_boundary))
00110 
00111 #define AXIOM_MIME_PARSER_GET_MIME_PARTS_MAP(mime_parser, env) \
00112 ((mime_parser)->ops->get_mime_parts_map(mime_parser, env))
00113 
00114 #define AXIOM_MIME_PARSER_GET_SOAP_BODY_LENGTH(mime_parser, env) \
00115 ((mime_parser)->ops->get_soap_body_len(mime_parser, env))
00116 
00117 #define AXIOM_MIME_PARSER_GET_SOAP_BODY_STR(mime_parser, env) \
00118 ((mime_parser)->ops->get_soap_body_str(mime_parser, env))
00119 
00120 /*************************** End of function macros ***************************/
00121 
00124 #ifdef __cplusplus
00125 }
00126 #endif
00127 #endif  /* AXIOM_MIME_PARSER_H */

Generated on Wed Dec 20 20:14:09 2006 for Axis2/C by  doxygen 1.5.1