axiom_mime_parser.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2004,2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef AXIOM_MIME_PARSER_H
00018 #define AXIOM_MIME_PARSER_H
00019 
00025 #include <axis2_utils.h>
00026 #include <axis2_error.h>
00027 #include <axis2_utils_defines.h>
00028 #include <axis2_env.h>
00029 #include <axis2_allocator.h>
00030 #include <axis2_string.h>
00031 #include <axis2_hash.h>
00032 #include <axiom_mime_const.h>
00033 
00034 #ifdef __cplusplus
00035 extern "C"
00036 {
00037 #endif
00038 
00039 typedef struct axiom_mime_parser_ops axiom_mime_parser_ops_t;
00040 typedef struct axiom_mime_parser axiom_mime_parser_t;   
00041    
00042 
00052 struct axiom_mime_parser_ops
00053 {
00054     axis2_hash_t* (AXIS2_CALL *
00055     parse)(
00056         axiom_mime_parser_t *mime_parser,
00057         const axis2_env_t *env, 
00058         AXIS2_READ_INPUT_CALLBACK,
00059         void *callback_ctx,
00060         axis2_char_t *mime_boundary);
00061     
00062     axis2_hash_t* (AXIS2_CALL *
00063     get_mime_parts_map)(
00064         axiom_mime_parser_t *mime_parser, 
00065         const axis2_env_t *env);
00066     
00070     axis2_status_t (AXIS2_CALL *
00071     free)(
00072         axiom_mime_parser_t *mime_parser,
00073         const axis2_env_t *env);
00074     
00075     int (AXIS2_CALL *
00076     get_soap_body_len)(
00077         axiom_mime_parser_t *mime_parser, 
00078         const axis2_env_t *env);
00079         
00080     axis2_char_t* (AXIS2_CALL *
00081     get_soap_body_str)(
00082         axiom_mime_parser_t *mime_parser, 
00083         const axis2_env_t *env);
00084 };
00085 
00090 struct axiom_mime_parser
00091 {
00092    axiom_mime_parser_ops_t *ops;
00093 };
00094 
00099 AXIS2_EXTERN axiom_mime_parser_t * AXIS2_CALL 
00100 axiom_mime_parser_create (const axis2_env_t *env);
00101 
00102 /*************************** Function macros **********************************/
00103 
00104 #define AXIOM_MIME_PARSER_FREE(mime_parser, env) \
00105 ((mime_parser)->ops->free (mime_parser, env))
00106 
00107 #define AXIOM_MIME_PARSER_PARSE(mime_parser, env, callback, callback_ctx, mime_boundary) \
00108 ((mime_parser)->ops->parse(mime_parser, env, callback, callback_ctx, mime_boundary))
00109 
00110 #define AXIOM_MIME_PARSER_GET_MIME_PARTS_MAP(mime_parser, env) \
00111 ((mime_parser)->ops->get_mime_parts_map(mime_parser, env))
00112 
00113 #define AXIOM_MIME_PARSER_GET_SOAP_BODY_LENGTH(mime_parser, env) \
00114 ((mime_parser)->ops->get_soap_body_len(mime_parser, env))
00115 
00116 #define AXIOM_MIME_PARSER_GET_SOAP_BODY_STR(mime_parser, env) \
00117 ((mime_parser)->ops->get_soap_body_str(mime_parser, env))
00118 
00119 /*************************** End of function macros ***************************/
00120 
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 #endif  /* AXIOM_MIME_PARSER_H */

Generated on Tue Oct 3 18:21:09 2006 for Axis2/C by  doxygen 1.4.7