axis2_http_status_line.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_STATUS_LINE_H
00018 #define AXIS2_HTTP_STATUS_LINE_H
00019 
00031 #include <axis2_const.h>
00032 #include <axis2_defines.h>
00033 #include <axis2_env.h>
00034 
00035 
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040 
00042     typedef struct axis2_http_status_line_ops axis2_http_status_line_ops_t;
00044     typedef struct axis2_http_status_line axis2_http_status_line_t;
00045 
00046 
00051     struct axis2_http_status_line_ops
00052     {
00057         int (AXIS2_CALL *
00058                 get_status_code)(
00059                     const axis2_http_status_line_t *status_line,
00060                     const axis2_env_t *env);
00061 
00066         axis2_char_t *(AXIS2_CALL *
00067                 get_http_version)(
00068                     const axis2_http_status_line_t *status_line,
00069                     const axis2_env_t *env);
00070 
00075         axis2_char_t *(AXIS2_CALL *
00076                 get_reason_phrase)(
00077                     const axis2_http_status_line_t *status_line,
00078                     const axis2_env_t *env);
00079 
00084         axis2_bool_t (AXIS2_CALL *
00085                 starts_with_http)(
00086                     axis2_http_status_line_t *status_line,
00087                     const axis2_env_t *env);
00088 
00093         axis2_char_t *(AXIS2_CALL *
00094                 to_string)(
00095                     axis2_http_status_line_t *status_line,
00096                     const axis2_env_t *env);
00097 
00103         axis2_status_t (AXIS2_CALL *
00104                 free)(
00105                     axis2_http_status_line_t *status_line,
00106                     const axis2_env_t *env);
00107     };
00108 
00112     struct axis2_http_status_line
00113     {
00115         axis2_http_status_line_ops_t *ops;
00116     };
00117 
00118 
00123     AXIS2_EXTERN axis2_http_status_line_t *AXIS2_CALL
00124     axis2_http_status_line_create(
00125         const axis2_env_t *env,
00126         const axis2_char_t *str);
00127 
00128 /************************* Start of function macros    ***************************/
00129 
00132 #define AXIS2_HTTP_STATUS_LINE_GET_STATUS_CODE(status_line, env)\
00133                     ((status_line)->ops->get_status_code (status_line, env))
00134 
00137 #define AXIS2_HTTP_STATUS_LINE_GET_HTTP_VERSION(status_line, env)\
00138                     ((status_line)->ops->get_http_version (status_line, env))
00139 
00142 #define AXIS2_HTTP_STATUS_LINE_GET_REASON_PHRASE(status_line, env)\
00143                     ((status_line)->ops->get_reason_phrase (status_line, env))
00144 
00147 #define AXIS2_HTTP_STATUS_LINE_STARTS_WITH_HTTP(status_line, env)\
00148                     ((status_line)->ops->starts_with_http (status_line, env))
00149 
00152 #define AXIS2_HTTP_STATUS_LINE_TO_STRING(status_line, env)\
00153                     ((status_line)->ops->to_string (status_line, env))
00154 
00157 #define AXIS2_HTTP_STATUS_LINE_FREE(status_line, env)\
00158                     ((status_line)->ops->free(status_line, env))
00159 
00160 /************************* End of function macros *****************************/
00161 
00163 #ifdef __cplusplus
00164 }
00165 #endif
00166 #endif /* AXIS2_HTTP_STATUS_LINE_H */

Generated on Tue Oct 3 22:35:47 2006 for Axis2/C by  doxygen 1.4.7