axis2_http_header.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_HEADER_H
00018 #define AXIS2_HTTP_HEADER_H
00019 
00033 #include <axis2_const.h>
00034 #include <axis2_defines.h>
00035 #include <axis2_env.h>
00036 
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041 
00043     typedef struct axis2_http_header_ops axis2_http_header_ops_t;
00045     typedef struct axis2_http_header axis2_http_header_t;
00046 
00047 
00052     struct axis2_http_header_ops
00053     {
00058         axis2_char_t *(AXIS2_CALL *
00059                 to_external_form)(
00060                     axis2_http_header_t *header,
00061                     const axis2_env_t *env);
00062 
00067         axis2_char_t *(AXIS2_CALL *
00068                 get_name)(
00069                     const axis2_http_header_t *header,
00070                     const axis2_env_t *env);
00071 
00076         axis2_char_t *(AXIS2_CALL *
00077                 get_value)(
00078                     const axis2_http_header_t *header,
00079                     const axis2_env_t *env);
00080 
00086         axis2_status_t (AXIS2_CALL *
00087                 free)(
00088                     axis2_http_header_t *header,
00089                     const axis2_env_t *env);
00090     };
00091 
00096      struct axis2_http_header
00097     {
00099         axis2_http_header_ops_t *ops;
00100     };
00101 
00102 
00108     AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL
00109     axis2_http_header_create (
00110         const axis2_env_t *env,
00111         const axis2_char_t *name,
00112         const axis2_char_t *value);
00113 
00118     AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL AXIS2_CALL
00119     axis2_http_header_create_by_str (
00120         const axis2_env_t *env,
00121         const axis2_char_t *str);
00122 
00123 /************************** Start of function macros **************************/
00124 
00127 #define AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(header, env) \
00128                                 ((header)->ops->to_external_form(header, env))
00129 
00132 #define AXIS2_HTTP_HEADER_GET_NAME(header, env) \
00133                                 ((header)->ops->get_name(header, env))
00134 
00137 #define AXIS2_HTTP_HEADER_GET_VALUE(header, env) \
00138                                 ((header)->ops->get_value(header, env))
00139 
00142 #define AXIS2_HTTP_HEADER_FREE(header, env) \
00143                                 ((header)->ops->free(header, env))
00144 
00145 /************************** End of function macros ****************************/
00146 
00148 #ifdef __cplusplus
00149 }
00150 #endif
00151 
00152 #endif                          /* AXIS2_HTTP_HEADER_H */

Generated on Tue Oct 3 20:47:58 2006 for Axis2/C by  doxygen 1.4.7