Main Page | Modules | Namespace List | Data Structures | File List | Data Fields | Globals | Related Pages

apr_uri.h

Go to the documentation of this file.
00001 /* Copyright 2000-2004 The Apache Software Foundation
00002  *
00003  * Licensed under the Apache License, Version 2.0 (the "License");
00004  * you may not use this file except in compliance with the License.
00005  * You may obtain a copy of the License at
00006  *
00007  *     http://www.apache.org/licenses/LICENSE-2.0
00008  *
00009  * Unless required by applicable law or agreed to in writing, software
00010  * distributed under the License is distributed on an "AS IS" BASIS,
00011  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012  * See the License for the specific language governing permissions and
00013  * limitations under the License.
00014  */
00015 
00016 /*
00017  * apr_uri.h: External Interface of apr_uri.c
00018  */
00019 
00025 #ifndef APR_URI_H
00026 #define APR_URI_H
00027 
00028 #include "apu.h"
00029 
00030 #include "apr_network_io.h"
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00042 #define APR_URI_FTP_DEFAULT_PORT         21 
00043 #define APR_URI_SSH_DEFAULT_PORT         22 
00044 #define APR_URI_TELNET_DEFAULT_PORT      23 
00045 #define APR_URI_GOPHER_DEFAULT_PORT      70 
00046 #define APR_URI_HTTP_DEFAULT_PORT        80 
00047 #define APR_URI_POP_DEFAULT_PORT        110 
00048 #define APR_URI_NNTP_DEFAULT_PORT       119 
00049 #define APR_URI_IMAP_DEFAULT_PORT       143 
00050 #define APR_URI_PROSPERO_DEFAULT_PORT   191 
00051 #define APR_URI_WAIS_DEFAULT_PORT       210 
00052 #define APR_URI_LDAP_DEFAULT_PORT       389 
00053 #define APR_URI_HTTPS_DEFAULT_PORT      443 
00054 #define APR_URI_RTSP_DEFAULT_PORT       554 
00055 #define APR_URI_SNEWS_DEFAULT_PORT      563 
00056 #define APR_URI_ACAP_DEFAULT_PORT       674 
00057 #define APR_URI_NFS_DEFAULT_PORT       2049 
00058 #define APR_URI_TIP_DEFAULT_PORT       3372 
00059 #define APR_URI_SIP_DEFAULT_PORT       5060 
00063 #define APR_URI_UNP_OMITSITEPART    (1U<<0)
00064 
00065 #define APR_URI_UNP_OMITUSER        (1U<<1)
00066 
00067 #define APR_URI_UNP_OMITPASSWORD    (1U<<2)
00068 
00069 #define APR_URI_UNP_OMITUSERINFO    (APR_URI_UNP_OMITUSER | \
00070                                      APR_URI_UNP_OMITPASSWORD)
00071 
00072 #define APR_URI_UNP_REVEALPASSWORD  (1U<<3)
00073 
00074 #define APR_URI_UNP_OMITPATHINFO    (1U<<4)
00075 
00076 #define APR_URI_UNP_OMITQUERY       (1U<<5)
00077 
00079 typedef struct apr_uri_t apr_uri_t;
00080 
00084 struct apr_uri_t {
00086     char *scheme;
00088     char *hostinfo;
00090     char *user;
00092     char *password;
00094     char *hostname;
00096     char *port_str;
00098     char *path;
00100     char *query;
00102     char *fragment;
00103 
00105     struct hostent *hostent;
00106 
00108     apr_port_t port;
00109     
00111     unsigned is_initialized:1;
00112 
00114     unsigned dns_looked_up:1;
00116     unsigned dns_resolved:1;
00117 };
00118 
00119 /* apr_uri.c */
00126 APU_DECLARE(apr_port_t) apr_uri_port_of_scheme(const char *scheme_str);
00127 
00145 APU_DECLARE(char *) apr_uri_unparse(apr_pool_t *p, 
00146                                     const apr_uri_t *uptr,
00147                                     unsigned flags);
00148 
00158 APU_DECLARE(int) apr_uri_parse(apr_pool_t *p, const char *uri, 
00159                                apr_uri_t *uptr);
00160 
00168 APU_DECLARE(int) apr_uri_parse_hostinfo(apr_pool_t *p, 
00169                                         const char *hostinfo, 
00170                                         apr_uri_t *uptr);
00171 
00173 #ifdef __cplusplus
00174 }
00175 #endif
00176 
00177 #endif /* APR_URI_H */

Generated on Sun Mar 20 20:00:15 2005 for Apache Portable Runtime Utility Library by  doxygen 1.3.9.1