Loading...
Searching...
No Matches
apr_uri.h
Go to the documentation of this file.
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* apr_uri.h: External Interface of apr_uri.c
*/
#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;
};
/* apr_uri.c */
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 /* APR_URI_H */
apr_uri_unparse
char * apr_uri_unparse(apr_pool_t *p, const apr_uri_t *uptr, unsigned flags)
apr_uri_parse_hostinfo
apr_status_t apr_uri_parse_hostinfo(apr_pool_t *p, const char *hostinfo, apr_uri_t *uptr)
apr_uri_parse
apr_status_t apr_uri_parse(apr_pool_t *p, const char *uri, apr_uri_t *uptr)
apr_uri_port_of_scheme
apr_port_t apr_uri_port_of_scheme(const char *scheme_str)
apr_uri_t
Definition apr_uri.h:85
apr_uri_t::fragment
char * fragment
Definition apr_uri.h:103
apr_uri_t::user
char * user
Definition apr_uri.h:91
apr_uri_t::hostent
struct hostent * hostent
Definition apr_uri.h:106
apr_uri_t::scheme
char * scheme
Definition apr_uri.h:87
apr_uri_t::path
char * path
Definition apr_uri.h:99
apr_uri_t::port
apr_port_t port
Definition apr_uri.h:109
apr_uri_t::is_initialized
unsigned is_initialized
Definition apr_uri.h:112
apr_uri_t::password
char * password
Definition apr_uri.h:93
apr_uri_t::dns_resolved
unsigned dns_resolved
Definition apr_uri.h:117
apr_uri_t::query
char * query
Definition apr_uri.h:101
apr_uri_t::hostname
char * hostname
Definition apr_uri.h:95
apr_uri_t::hostinfo
char * hostinfo
Definition apr_uri.h:89
apr_uri_t::port_str
char * port_str
Definition apr_uri.h:97
apr_uri_t::dns_looked_up
unsigned dns_looked_up
Definition apr_uri.h:115