Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

axis2_http_chunked_stream.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 AXIS2_HTTP_CHUNKED_STREAM_H
00018 #define AXIS2_HTTP_CHUNKED_STREAM_H
00019 
00025 #include <axis2_const.h>
00026 #include <axis2_defines.h>
00027 #include <axis2_env.h>
00028 #include <axis2_stream.h>
00029 
00030 
00031 #ifdef __cplusplus
00032 extern "C" 
00033 {
00034 #endif
00035 
00040 typedef struct axis2_http_chunked_stream_ops axis2_http_chunked_stream_ops_t;
00041 typedef struct axis2_http_chunked_stream axis2_http_chunked_stream_t;
00042     
00043     
00048 AXIS2_DECLARE_DATA struct axis2_http_chunked_stream_ops
00049 {
00050    int (AXIS2_CALL *read) (axis2_http_chunked_stream_t *chunked_stream,
00051                   const axis2_env_t *env, void *buffer, size_t count);
00052    
00053    int (AXIS2_CALL *write) (axis2_http_chunked_stream_t *chunked_stream, 
00054                   const axis2_env_t *env, const void *buffer, 
00055                   size_t count);
00056    int (AXIS2_CALL *get_current_chunk_size) 
00057                         (axis2_http_chunked_stream_t *chunked_stream, 
00058                         const axis2_env_t *env);
00059    axis2_status_t (AXIS2_CALL *write_last_chunk) 
00060                   (axis2_http_chunked_stream_t *chunked_stream, 
00061                         const axis2_env_t *env);
00062    axis2_status_t (AXIS2_CALL *free) 
00063                         (axis2_http_chunked_stream_t *chunked_stream, 
00064                         const axis2_env_t *env);
00065 };
00066 
00071 AXIS2_DECLARE_DATA struct axis2_http_chunked_stream
00072 {
00073    axis2_http_chunked_stream_ops_t *ops;
00074 };
00075 
00076 
00077 AXIS2_EXTERN axis2_http_chunked_stream_t * AXIS2_CALL 
00078 axis2_http_chunked_stream_create(const axis2_env_t *env, axis2_stream_t* stream);
00079 /********************* Start of function macros   ***************************/
00080 
00081 #define AXIS2_HTTP_CHUNKED_STREAM_READ(chunked_stream, env, buffer, count) \
00082                         ((chunked_stream)->ops->read(chunked_stream, env, \
00083                   buffer, count))
00084 #define AXIS2_HTTP_CHUNKED_STREAM_WRITE(chunked_stream, env, buffer, count) \
00085                   ((chunked_stream)->ops->write(chunked_stream, env, \
00086                   buffer, count))
00087 #define AXIS2_HTTP_CHUNKED_GET_CURRENT_CHUNK_SIZE(chunked_stream, env) \
00088                         ((chunked_stream)->ops->get_current_chunk_size \
00089                   (chunked_stream, env))
00090 #define AXIS2_HTTP_CHUNKED_STREAM_WRITE_LAST_CHUNK(chunked_stream, env) \
00091                   ((chunked_stream)->ops->write_last_chunk(chunked_stream\
00092                   , env))
00093 #define AXIS2_HTTP_CHUNKED_STREAM_FREE(chunked_stream, env) \
00094                         ((chunked_stream)->ops->free(chunked_stream, env))
00095 
00096 /************************* End of function macros *****************************/
00097 
00099 #ifdef __cplusplus
00100 }
00101 #endif
00102 #endif /* AXIS2_HTTP_CHUNKED_STREAM_H */

Generated on Fri Jun 16 18:02:31 2006 for Axis2/C by  doxygen 1.4.2