123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- #ifndef APR_URI_H
- #define APR_URI_H
- #include "apu.h"
- #include "apr_network_io.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define APR_URI_FTP_DEFAULT_PORT 21
- #define APR_URI_SSH_DEFAULT_PORT 22
- #define APR_URI_TELNET_DEFAULT_PORT 23
- #define APR_URI_GOPHER_DEFAULT_PORT 70
- #define APR_URI_HTTP_DEFAULT_PORT 80
- #define APR_URI_POP_DEFAULT_PORT 110
- #define APR_URI_NNTP_DEFAULT_PORT 119
- #define APR_URI_IMAP_DEFAULT_PORT 143
- #define APR_URI_PROSPERO_DEFAULT_PORT 191
- #define APR_URI_WAIS_DEFAULT_PORT 210
- #define APR_URI_LDAP_DEFAULT_PORT 389
- #define APR_URI_HTTPS_DEFAULT_PORT 443
- #define APR_URI_RTSP_DEFAULT_PORT 554
- #define APR_URI_SNEWS_DEFAULT_PORT 563
- #define APR_URI_ACAP_DEFAULT_PORT 674
- #define APR_URI_NFS_DEFAULT_PORT 2049
- #define APR_URI_TIP_DEFAULT_PORT 3372
- #define APR_URI_SIP_DEFAULT_PORT 5060
- #define APR_URI_UNP_OMITSITEPART (1U<<0)
- #define APR_URI_UNP_OMITUSER (1U<<1)
- #define APR_URI_UNP_OMITPASSWORD (1U<<2)
- #define APR_URI_UNP_OMITUSERINFO (APR_URI_UNP_OMITUSER | \
- APR_URI_UNP_OMITPASSWORD)
- #define APR_URI_UNP_REVEALPASSWORD (1U<<3)
- #define APR_URI_UNP_OMITPATHINFO (1U<<4)
- #define APR_URI_UNP_OMITQUERY (1U<<5)
- typedef struct apr_uri_t apr_uri_t;
- struct apr_uri_t {
-
- char *scheme;
-
- char *hostinfo;
-
- char *user;
-
- char *password;
-
- char *hostname;
-
- char *port_str;
-
- char *path;
-
- char *query;
-
- char *fragment;
-
- struct hostent *hostent;
-
- apr_port_t port;
-
-
- unsigned is_initialized:1;
-
- unsigned dns_looked_up:1;
-
- unsigned dns_resolved:1;
- };
-
- APU_DECLARE(apr_port_t) apr_uri_port_of_scheme(const char *scheme_str);
- APU_DECLARE(char *) apr_uri_unparse(apr_pool_t *p,
- const apr_uri_t *uptr,
- unsigned flags);
- APU_DECLARE(apr_status_t) apr_uri_parse(apr_pool_t *p, const char *uri,
- apr_uri_t *uptr);
- APU_DECLARE(apr_status_t) apr_uri_parse_hostinfo(apr_pool_t *p,
- const char *hostinfo,
- apr_uri_t *uptr);
- #ifdef __cplusplus
- }
- #endif
- #endif
|