axis2_url.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_URL_H
00018 #define AXIS2_URL_H
00019 
00020 
00026 #include <axis2_utils.h>
00027 #include <axis2_utils_defines.h>
00028 #include <axis2_env.h>
00029 #include <axis2_uri.h>
00030 
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035 
00041 typedef struct axis2_url_ops axis2_url_ops_t;
00042 typedef struct axis2_url axis2_url_t;
00043 
00044     
00049  struct axis2_url_ops
00050 {
00051     axis2_char_t* (AXIS2_CALL *
00052    to_external_form) (axis2_url_t *url, 
00053                        const axis2_env_t *env);
00054    
00055     axis2_status_t (AXIS2_CALL *
00056    set_protocol)(axis2_url_t *url, 
00057                   const axis2_env_t *env, 
00058                  axis2_char_t *protocol);
00059    
00060    
00061    axis2_char_t* (AXIS2_CALL *
00062    get_protocol) (axis2_url_t *url, 
00063                    const axis2_env_t *env);
00064    
00065    axis2_status_t (AXIS2_CALL *
00066    set_server)(axis2_url_t *url, 
00067                 const axis2_env_t *env, 
00068             axis2_char_t *server);
00069    
00070    
00071     axis2_char_t* (AXIS2_CALL *
00072    get_server)(axis2_url_t *url, 
00073                 const axis2_env_t *env);
00074             
00075             
00076    axis2_status_t (AXIS2_CALL *
00077    set_port)(axis2_url_t *url, 
00078               const axis2_env_t *env, 
00079            int port);
00080            
00081            
00082     int (AXIS2_CALL *
00083    get_port) (axis2_url_t *url, 
00084                const axis2_env_t *env);
00085             
00086             
00087    axis2_status_t (AXIS2_CALL *
00088    set_path)(axis2_url_t *url, 
00089               const axis2_env_t *env, 
00090            axis2_char_t *path);
00091            
00092            
00093    axis2_char_t* (AXIS2_CALL *
00094    get_path)(axis2_url_t *url, 
00095               const axis2_env_t *env);
00096 
00097     axis2_url_t* (AXIS2_CALL *
00098     clone) (
00099             axis2_url_t *url,
00100             const axis2_env_t *env);
00101 
00102     axis2_status_t (AXIS2_CALL *
00103    free_fn) (axis2_url_t *url, 
00104            const axis2_env_t *env);
00105 };
00106 
00111  struct axis2_url
00112 {
00113     axis2_url_ops_t *ops;    
00114 };
00115 
00116 
00117 AXIS2_EXTERN axis2_url_t * AXIS2_CALL 
00118 axis2_url_create (
00119         const axis2_env_t *env, 
00120         const axis2_char_t *protocol, 
00121         const axis2_char_t *server, 
00122         const int port, 
00123         const axis2_char_t *path);
00124 
00125 AXIS2_EXTERN axis2_url_t * AXIS2_CALL
00126 axis2_url_parse_string(
00127         const axis2_env_t *env, 
00128         const axis2_char_t *str_url);
00129 
00130 axis2_uri_t *AXIS2_CALL
00131 axis2_url_to_uri(
00132         axis2_url_t *url,
00133         const axis2_env_t *env);
00134 
00135 /************************** Start of function macros **************************/
00136 
00137 #define AXIS2_URL_TO_EXTERNAL_FORM(url, env) \
00138       ((url)->ops->to_external_form(url, env))
00139 
00140 #define AXIS2_URL_SET_PROTOCOL(url, env, protocol) \
00141         ((url)->ops->set_prtocol(url, env, protocol))
00142       
00143 #define AXIS2_URL_GET_PROTOCOL(url, env) \
00144       ((url)->ops->get_protocol(url, env))
00145       
00146 #define AXIS2_URL_SET_SERVER(url, env, server) \
00147         ((url)->ops->set_server(url, env, server))
00148       
00149 #define AXIS2_URL_GET_SERVER(url, env) \
00150       ((url)->ops->get_server(url, env))
00151       
00152 #define AXIS2_URL_SET_PORT(url, env, port) \
00153       ((url)->ops->set_port(url, env, port))
00154       
00155 #define AXIS2_URL_GET_PORT(url, env) \
00156       ((url)->ops->get_port(url, env))
00157       
00158 #define AXIS2_URL_SET_PATH(url, env, path) \
00159         ((url)->ops->set_path(url, env, path))
00160       
00161 #define AXIS2_URL_GET_PATH(url, env) \
00162       ((url)->ops->get_path(url, env))
00163       
00164 #define AXIS2_URL_CLONE(url, env) \
00165       ((url)->ops->clone(url, env))
00166       
00167 #define AXIS2_URL_FREE(url, env) \
00168       ((url)->ops->free_fn(url, env))
00169 
00170 /************************** End of function macros ****************************/    
00171 
00173 #ifdef __cplusplus
00174 }
00175 #endif
00176 
00177 #endif                          /* AXIS2_URL_H */

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