📄 url_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>url.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>url.h</h1><a href="url_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * url.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * Universal Resource Locator (for HTTP/HTML) class.</span>00005 <span class="comment"> *</span>00006 <span class="comment"> * Portable Windows Library</span>00007 <span class="comment"> *</span>00008 <span class="comment"> * Copyright (c) 1993-2002 Equivalence Pty. Ltd.</span>00009 <span class="comment"> *</span>00010 <span class="comment"> * The contents of this file are subject to the Mozilla Public License</span>00011 <span class="comment"> * Version 1.0 (the "License"); you may not use this file except in</span>00012 <span class="comment"> * compliance with the License. You may obtain a copy of the License at</span>00013 <span class="comment"> * http://www.mozilla.org/MPL/</span>00014 <span class="comment"> *</span>00015 <span class="comment"> * Software distributed under the License is distributed on an "AS IS"</span>00016 <span class="comment"> * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</span>00017 <span class="comment"> * the License for the specific language governing rights and limitations</span>00018 <span class="comment"> * under the License.</span>00019 <span class="comment"> *</span>00020 <span class="comment"> * The Original Code is Portable Windows Library.</span>00021 <span class="comment"> *</span>00022 <span class="comment"> * The Initial Developer of the Original Code is Equivalence Pty. Ltd.</span>00023 <span class="comment"> *</span>00024 <span class="comment"> * Contributor(s): ______________________________________.</span>00025 <span class="comment"> *</span>00026 <span class="comment"> * $Log: url.h,v $</span>00027 <span class="comment"> * Revision 1.29 2004/07/07 07:18:43 csoutheren</span>00028 <span class="comment"> * Removed warnings on Linux from Windows static global hacks</span>00029 <span class="comment"> *</span>00030 <span class="comment"> * Revision 1.28 2004/07/06 10:12:51 csoutheren</span>00031 <span class="comment"> * Added static integer o factory template to assist in ensuring factories are instantiated</span>00032 <span class="comment"> *</span>00033 <span class="comment"> * Revision 1.27 2004/06/01 07:32:45 csoutheren</span>00034 <span class="comment"> * Removed warning on Linux</span>00035 <span class="comment"> *</span>00036 <span class="comment"> * Revision 1.26 2004/06/01 07:28:44 csoutheren</span>00037 <span class="comment"> * Changed URL parsing to use abstract factory code</span>00038 <span class="comment"> *</span>00039 <span class="comment"> * Revision 1.25 2004/03/13 06:30:52 rjongbloed</span>00040 <span class="comment"> * Virtualised parse function.</span>00041 <span class="comment"> *</span>00042 <span class="comment"> * Revision 1.24 2003/04/04 05:18:08 robertj</span>00043 <span class="comment"> * Added "callto", "tel" and fixed "h323" URL types.</span>00044 <span class="comment"> *</span>00045 <span class="comment"> * Revision 1.23 2002/12/10 04:40:34 robertj</span>00046 <span class="comment"> * Added test function for URL being empty.</span>00047 <span class="comment"> *</span>00048 <span class="comment"> * Revision 1.22 2002/11/20 00:50:09 robertj</span>00049 <span class="comment"> * Fixed correct interpretation of url re double slashes as per latest RFC,</span>00050 <span class="comment"> * including file: mapping and relative paths. Probably still more to do.</span>00051 <span class="comment"> *</span>00052 <span class="comment"> * Revision 1.21 2002/11/19 10:36:08 robertj</span>00053 <span class="comment"> * Added functions to set anf get "file:" URL. as PFilePath and do the right</span>00054 <span class="comment"> * things with platform dependent directory components.</span>00055 <span class="comment"> *</span>00056 <span class="comment"> * Revision 1.20 2002/11/06 22:47:24 robertj</span>00057 <span class="comment"> * Fixed header comment (copyright etc)</span>00058 <span class="comment"> *</span>00059 <span class="comment"> * Revision 1.19 2002/09/16 01:08:59 robertj</span>00060 <span class="comment"> * Added #define so can select if #pragma interface/implementation is used on</span>00061 <span class="comment"> * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.</span>00062 <span class="comment"> *</span>00063 <span class="comment"> * Revision 1.18 2002/03/18 05:01:54 robertj</span>00064 <span class="comment"> * Added functions to set component parts of URL.</span>00065 <span class="comment"> *</span>00066 <span class="comment"> * Revision 1.17 2001/11/08 00:32:49 robertj</span>00067 <span class="comment"> * Added parsing of ';' based parameter fields into string dictionary if there are multiple parameters, with '=' values.</span>00068 <span class="comment"> *</span>00069 <span class="comment"> * Revision 1.16 2001/09/28 00:32:24 robertj</span>00070 <span class="comment"> * Broke out internal static function for unstranslating URL strings.</span>00071 <span class="comment"> *</span>00072 <span class="comment"> * Revision 1.15 1999/03/09 08:01:47 robertj</span>00073 <span class="comment"> * Changed comments for doc++ support (more to come).</span>00074 <span class="comment"> *</span>00075 <span class="comment"> * Revision 1.14 1999/02/16 08:07:10 robertj</span>00076 <span class="comment"> * MSVC 6.0 compatibility changes.</span>00077 <span class="comment"> *</span>00078 <span class="comment"> * Revision 1.13 1998/09/23 06:20:11 robertj</span>00079 <span class="comment"> * Added open source copyright license.</span>00080 <span class="comment"> *</span>00081 <span class="comment"> * Revision 1.12 1998/02/16 00:12:53 robertj</span>00082 <span class="comment"> * Added function to open a URL in a browser.</span>00083 <span class="comment"> *</span>00084 <span class="comment"> * Revision 1.11 1998/02/03 10:02:35 robertj</span>00085 <span class="comment"> * Added ability to get scheme, host and port from URL as a string.</span>00086 <span class="comment"> *</span>00087 <span class="comment"> * Revision 1.10 1998/02/03 06:18:49 robertj</span>00088 <span class="comment"> * Fixed URL encoding to be closer to RFC</span>00089 <span class="comment"> *</span>00090 <span class="comment"> * Revision 1.9 1997/01/12 04:22:54 robertj</span>00091 <span class="comment"> * Added has function so URL can be dictionary key.</span>00092 <span class="comment"> *</span>00093 <span class="comment"> * Revision 1.8 1996/08/19 13:37:28 robertj</span>00094 <span class="comment"> * Fixed URL parsing and definition (cannot have relative paths).</span>00095 <span class="comment"> *</span>00096 <span class="comment"> * Revision 1.7 1996/06/10 09:55:44 robertj</span>00097 <span class="comment"> * Added global function for query parameters parsing.</span>00098 <span class="comment"> *</span>00099 <span class="comment"> * Revision 1.6 1996/03/31 08:53:13 robertj</span>00100 <span class="comment"> * Added string representation for URI part only.</span>00101 <span class="comment"> *</span>00102 <span class="comment"> * Revision 1.5 1996/03/16 04:46:02 robertj</span>00103 <span class="comment"> * Added translation type to TranslateString() to accommodate query variables.</span>00104 <span class="comment"> *</span>00105 <span class="comment"> * Revision 1.4 1996/03/02 03:12:13 robertj</span>00106 <span class="comment"> * Added function to translate a string to a form suitable for inclusion in a URL.</span>00107 <span class="comment"> *</span>00108 <span class="comment"> * Revision 1.3 1996/02/03 11:06:27 robertj</span>00109 <span class="comment"> * Added splitting of query field into variables dictionary.</span>00110 <span class="comment"> *</span>00111 <span class="comment"> * Revision 1.2 1996/01/26 02:24:32 robertj</span>00112 <span class="comment"> * Further implemetation.</span>00113 <span class="comment"> *</span>00114 <span class="comment"> * Revision 1.1 1996/01/23 13:04:20 robertj</span>00115 <span class="comment"> * Initial revision</span>00116 <span class="comment"> *</span>00117 <span class="comment"> */</span>00118 00119 <span class="preprocessor">#ifndef _PURL</span>00120 <span class="preprocessor"></span><span class="preprocessor">#define _PURL</span>00121 <span class="preprocessor"></span>00122 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00123 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00124 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00125 <span class="preprocessor"></span>00127 <span class="comment">// PURL</span>00128 00129 <span class="keyword">class </span>PURLLegacyScheme;00130 <a name="l00136"></a><a class="code" href="classPURL.html">00136</a> <span class="keyword">class </span><a class="code" href="classPURL.html">PURL</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00137 {00138 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPURL.html">PURL</a>, <a class="code" href="classPObject.html">PObject</a>)00139 <span class="keyword">public</span>:00141 <a class="code" href="classPURL.html#a0">PURL</a>();00143 <a class="code" href="classPURL.html#a0">PURL</a>(00144 <span class="keyword">const</span> <span class="keywordtype">char</span> * cstr, 00145 <span class="keyword">const</span> <span class="keywordtype">char</span> * defaultScheme = NULL 00146 );00148 <a class="code" href="classPURL.html#a0">PURL</a>(00149 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & str, 00150 <span class="keyword">const</span> <span class="keywordtype">char</span> * defaultScheme = NULL 00151 );00153 <a class="code" href="classPURL.html#a0">PURL</a>(00154 <span class="keyword">const</span> <a class="code" href="classPFilePath.html">PFilePath</a> & <a class="code" href="classPURL.html#n8">path</a> 00155 );00156 00165 <span class="keyword">virtual</span> <a class="code" href="classPObject.html#z199_0">Comparison</a> <a class="code" href="classPURL.html#z505_0">Compare</a>(00166 <span class="keyword">const</span> <a class="code" href="classPObject.html">PObject</a> & obj 00167 ) <span class="keyword">const</span>;00168 00180 <span class="keyword">virtual</span> PINDEX <a class="code" href="classPURL.html#z505_1">HashFunction</a>() <span class="keyword">const</span>;00181 00184 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPURL.html#z505_2">PrintOn</a>(00185 ostream &strm 00186 ) <span class="keyword">const</span>;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -