00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
00126
APU_DECLARE(apr_port_t) apr_uri_port_of_scheme(const
char *scheme_str);
00127
00129 APU_DECLARE(apr_port_t) apr_uri_default_port_for_scheme(const
char *scheme_str);
00130
00148 APU_DECLARE(
char *) apr_uri_unparse(apr_pool_t *p,
00149 const apr_uri_t *uptr,
00150
unsigned flags);
00151
00161 APU_DECLARE(
int) apr_uri_parse(apr_pool_t *p, const
char *uri,
00162 apr_uri_t *uptr);
00163
00171 APU_DECLARE(
int) apr_uri_parse_hostinfo(apr_pool_t *p,
00172 const
char *hostinfo,
00173 apr_uri_t *uptr);
00174
00176 #ifdef __cplusplus
00177 }
00178 #endif
00179
00180 #endif