axis2_http_header.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_HEADER_H
00019 #define AXIS2_HTTP_HEADER_H
00020 
00034 #include <axis2_const.h>
00035 #include <axis2_defines.h>
00036 #include <axis2_env.h>
00037 
00038 #ifdef __cplusplus
00039 extern "C"
00040 {
00041 #endif
00042 
00044     typedef struct axis2_http_header_ops axis2_http_header_ops_t;
00046     typedef struct axis2_http_header axis2_http_header_t;
00047 
00048 
00053     struct axis2_http_header_ops
00054     {
00059         axis2_char_t *(AXIS2_CALL *
00060                 to_external_form)(
00061                     axis2_http_header_t *header,
00062                     const axis2_env_t *env);
00063 
00068         axis2_char_t *(AXIS2_CALL *
00069                 get_name)(
00070                     const axis2_http_header_t *header,
00071                     const axis2_env_t *env);
00072 
00077         axis2_char_t *(AXIS2_CALL *
00078                 get_value)(
00079                     const axis2_http_header_t *header,
00080                     const axis2_env_t *env);
00081 
00087         axis2_status_t (AXIS2_CALL *
00088                 free)(
00089                     axis2_http_header_t *header,
00090                     const axis2_env_t *env);
00091     };
00092 
00097      struct axis2_http_header
00098     {
00100         axis2_http_header_ops_t *ops;
00101     };
00102 
00103 
00109     AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL
00110     axis2_http_header_create (
00111         const axis2_env_t *env,
00112         const axis2_char_t *name,
00113         const axis2_char_t *value);
00114 
00119     AXIS2_EXTERN axis2_http_header_t *AXIS2_CALL AXIS2_CALL
00120     axis2_http_header_create_by_str (
00121         const axis2_env_t *env,
00122         const axis2_char_t *str);
00123 
00124 /************************** Start of function macros **************************/
00125 
00128 #define AXIS2_HTTP_HEADER_TO_EXTERNAL_FORM(header, env) \
00129                                 ((header)->ops->to_external_form(header, env))
00130 
00133 #define AXIS2_HTTP_HEADER_GET_NAME(header, env) \
00134                                 ((header)->ops->get_name(header, env))
00135 
00138 #define AXIS2_HTTP_HEADER_GET_VALUE(header, env) \
00139                                 ((header)->ops->get_value(header, env))
00140 
00143 #define AXIS2_HTTP_HEADER_FREE(header, env) \
00144                                 ((header)->ops->free(header, env))
00145 
00146 /************************** End of function macros ****************************/
00147 
00149 #ifdef __cplusplus
00150 }
00151 #endif
00152 
00153 #endif                          /* AXIS2_HTTP_HEADER_H */

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