axis2_http_status_line.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 AXIS2_HTTP_STATUS_LINE_H
00019 #define AXIS2_HTTP_STATUS_LINE_H
00020 
00032 #include <axis2_const.h>
00033 #include <axis2_defines.h>
00034 #include <axis2_env.h>
00035 
00036 
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041 
00043     typedef struct axis2_http_status_line_ops axis2_http_status_line_ops_t;
00045     typedef struct axis2_http_status_line axis2_http_status_line_t;
00046 
00047 
00052     struct axis2_http_status_line_ops
00053     {
00058         int (AXIS2_CALL *
00059                 get_status_code)(
00060                     const axis2_http_status_line_t *status_line,
00061                     const axis2_env_t *env);
00062 
00067         axis2_char_t *(AXIS2_CALL *
00068                 get_http_version)(
00069                     const axis2_http_status_line_t *status_line,
00070                     const axis2_env_t *env);
00071 
00076         axis2_char_t *(AXIS2_CALL *
00077                 get_reason_phrase)(
00078                     const axis2_http_status_line_t *status_line,
00079                     const axis2_env_t *env);
00080 
00085         axis2_bool_t (AXIS2_CALL *
00086                 starts_with_http)(
00087                     axis2_http_status_line_t *status_line,
00088                     const axis2_env_t *env);
00089 
00094         axis2_char_t *(AXIS2_CALL *
00095                 to_string)(
00096                     axis2_http_status_line_t *status_line,
00097                     const axis2_env_t *env);
00098 
00104         axis2_status_t (AXIS2_CALL *
00105                 free)(
00106                     axis2_http_status_line_t *status_line,
00107                     const axis2_env_t *env);
00108     };
00109 
00113     struct axis2_http_status_line
00114     {
00116         axis2_http_status_line_ops_t *ops;
00117     };
00118 
00119 
00124     AXIS2_EXTERN axis2_http_status_line_t *AXIS2_CALL
00125     axis2_http_status_line_create(
00126         const axis2_env_t *env,
00127         const axis2_char_t *str);
00128 
00129 /************************* Start of function macros    ***************************/
00130 
00133 #define AXIS2_HTTP_STATUS_LINE_GET_STATUS_CODE(status_line, env)\
00134                     ((status_line)->ops->get_status_code (status_line, env))
00135 
00138 #define AXIS2_HTTP_STATUS_LINE_GET_HTTP_VERSION(status_line, env)\
00139                     ((status_line)->ops->get_http_version (status_line, env))
00140 
00143 #define AXIS2_HTTP_STATUS_LINE_GET_REASON_PHRASE(status_line, env)\
00144                     ((status_line)->ops->get_reason_phrase (status_line, env))
00145 
00148 #define AXIS2_HTTP_STATUS_LINE_STARTS_WITH_HTTP(status_line, env)\
00149                     ((status_line)->ops->starts_with_http (status_line, env))
00150 
00153 #define AXIS2_HTTP_STATUS_LINE_TO_STRING(status_line, env)\
00154                     ((status_line)->ops->to_string (status_line, env))
00155 
00158 #define AXIS2_HTTP_STATUS_LINE_FREE(status_line, env)\
00159                     ((status_line)->ops->free(status_line, env))
00160 
00161 /************************* End of function macros *****************************/
00162 
00164 #ifdef __cplusplus
00165 }
00166 #endif
00167 #endif /* AXIS2_HTTP_STATUS_LINE_H */

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