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

Generated on Wed Dec 20 20:34:50 2006 for Axis2/C by  doxygen 1.5.1