⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pxmlrpcs_8h-source.html

📁 pwlib开发文档
💻 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>pxmlrpcs.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> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>pxmlrpcs.h</h1><a href="pxmlrpcs_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * pxmlrpcs.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * XML parser support</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) 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: pxmlrpcs.h,v $</span>00027 <span class="comment"> * Revision 1.3  2003/02/19 01:50:31  robertj</span>00028 <span class="comment"> * Change to make it easier to set a fault from the server function handler.</span>00029 <span class="comment"> *</span>00030 <span class="comment"> * Revision 1.2  2002/11/06 22:47:24  robertj</span>00031 <span class="comment"> * Fixed header comment (copyright etc)</span>00032 <span class="comment"> *</span>00033 <span class="comment"> * Revision 1.1  2002/10/02 08:54:34  craigs</span>00034 <span class="comment"> * Added support for XMLRPC server</span>00035 <span class="comment"> *</span>00036 <span class="comment"> */</span>00037 00038 <span class="preprocessor">#ifndef _PXMLRPCSRVR_H</span>00039 <span class="preprocessor"></span><span class="preprocessor">#define _PXMLRPCSRVR_H</span>00040 <span class="preprocessor"></span>00041 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00042 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00043 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00044 <span class="preprocessor"></span>00045 <span class="preprocessor">#include &lt;<a class="code" href="pxmlrpc_8h.html">ptclib/pxmlrpc.h</a>&gt;</span>00046 <span class="preprocessor">#include &lt;<a class="code" href="http_8h.html">ptclib/http.h</a>&gt;</span>00047 00048 <a name="l00049"></a><a class="code" href="classPXMLRPCServerMethod.html">00049</a> <span class="keyword">class </span><a class="code" href="classPXMLRPCServerMethod.html">PXMLRPCServerMethod</a> : <span class="keyword">public</span> <a class="code" href="classPString.html">PString</a>00050 {00051   <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPXMLRPCServerMethod.html">PXMLRPCServerMethod</a>, <a class="code" href="classPString.html">PString</a>);00052   <span class="keyword">public</span>:<a name="l00053"></a><a class="code" href="classPXMLRPCServerMethod.html#a0">00053</a>     <a class="code" href="classPXMLRPCServerMethod.html#a0">PXMLRPCServerMethod</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; name)00054       : <a class="code" href="classPString.html">PString</a>(name) { }00055 <a name="l00056"></a><a class="code" href="classPXMLRPCServerMethod.html#m0">00056</a>     <a class="code" href="classPNotifier.html">PNotifier</a> <a class="code" href="classPXMLRPCServerMethod.html#m0">methodFunc</a>;00057 };00058 00059 00060 <a class="code" href="lists_8h.html#a6">PSORTED_LIST</a>(PXMLRPCServerMethodList, <a class="code" href="classPXMLRPCServerMethod.html">PXMLRPCServerMethod</a>);00061 00062 <a name="l00063"></a><a class="code" href="classPXMLRPCServerResource.html">00063</a> <span class="keyword">class </span><a class="code" href="classPXMLRPCServerResource.html">PXMLRPCServerResource</a> : <span class="keyword">public</span> <a class="code" href="classPHTTPResource.html">PHTTPResource</a>00064 {00065   <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPXMLRPCServerResource.html">PXMLRPCServerResource</a>, <a class="code" href="classPHTTPResource.html">PHTTPResource</a>);00066   <span class="keyword">public</span>:00067     <a class="code" href="classPXMLRPCServerResource.html#a0">PXMLRPCServerResource</a>();00068     <a class="code" href="classPXMLRPCServerResource.html#a0">PXMLRPCServerResource</a>(00069       <span class="keyword">const</span> <a class="code" href="classPHTTPAuthority.html">PHTTPAuthority</a> &amp; auth    <span class="comment">// Authorisation for the resource.</span>00070     );00071     <a class="code" href="classPXMLRPCServerResource.html#a0">PXMLRPCServerResource</a>(00072       <span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> &amp; url               <span class="comment">// Name of the resource in URL space.</span>00073     );00074     <a class="code" href="classPXMLRPCServerResource.html#a0">PXMLRPCServerResource</a>(00075       <span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> &amp; url,              <span class="comment">// Name of the resource in URL space.</span>00076       <span class="keyword">const</span> <a class="code" href="classPHTTPAuthority.html">PHTTPAuthority</a> &amp; auth    <span class="comment">// Authorisation for the resource.</span>00077     );00078 00079     <span class="comment">// overrides from PHTTPResource</span>00080     BOOL <a class="code" href="classPXMLRPCServerResource.html#a4">LoadHeaders</a>(<a class="code" href="classPHTTPRequest.html">PHTTPRequest</a> &amp; request);00081     BOOL <a class="code" href="classPXMLRPCServerResource.html#a5">OnPOSTData</a>(<a class="code" href="classPHTTPRequest.html">PHTTPRequest</a> &amp; request, <span class="keyword">const</span> <a class="code" href="classPStringToString.html">PStringToString</a> &amp; data);00082 00083     <span class="comment">// new functions</span>00084     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPXMLRPCServerResource.html#a6">OnXMLRPCRequest</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; body, <a class="code" href="classPString.html">PString</a> &amp; reply);00085     <span class="keyword">virtual</span> BOOL <a class="code" href="classPXMLRPCServerResource.html#a7">SetMethod</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; methodName, <span class="keyword">const</span> <a class="code" href="classPNotifier.html">PNotifier</a> &amp; func);00086     <span class="keywordtype">void</span> <a class="code" href="classPXMLRPCServerResource.html#a6">OnXMLRPCRequest</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; methodName, <a class="code" href="classPXMLRPCBlock.html">PXMLRPCBlock</a> &amp; request, <a class="code" href="classPString.html">PString</a> &amp; reply);00087 00088     <span class="keyword">virtual</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPXMLRPCServerResource.html#a9">FormatFault</a>(00089       PINDEX code,00090       <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; str00091     );00092 00093   <span class="keyword">protected</span>:<a name="l00094"></a><a class="code" href="classPXMLRPCServerResource.html#n0">00094</a>     <a class="code" href="classPMutex.html">PMutex</a> <a class="code" href="classPXMLRPCServerResource.html#n0">methodMutex</a>;<a name="l00095"></a><a class="code" href="classPXMLRPCServerResource.html#n1">00095</a>     PXMLRPCServerMethodList <a class="code" href="classPXMLRPCServerResource.html#n1">methodList</a>;00096 };00097 00098 <a name="l00099"></a><a class="code" href="classPXMLRPCServerParms.html">00099</a> <span class="keyword">class </span><a class="code" href="classPXMLRPCServerParms.html">PXMLRPCServerParms</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a> 00100 {00101   <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPXMLRPCServerParms.html">PXMLRPCServerParms</a>, <a class="code" href="classPObject.html">PObject</a>);00102   <span class="keyword">public</span>:<a name="l00103"></a><a class="code" href="classPXMLRPCServerParms.html#a0">00103</a>     <a class="code" href="classPXMLRPCServerParms.html#a0">PXMLRPCServerParms</a>(00104       <a class="code" href="classPXMLRPCServerResource.html">PXMLRPCServerResource</a> &amp; _resource,00105       <a class="code" href="classPXMLRPCBlock.html">PXMLRPCBlock</a> &amp; _request00106     ) : <a class="code" href="classPXMLRPCServerParms.html#m0">resource</a>(_resource), <a class="code" href="classPXMLRPCServerParms.html#m1">request</a>(_request) { }00107 <a name="l00108"></a><a class="code" href="classPXMLRPCServerParms.html#a1">00108</a>     <span class="keywordtype">void</span> <a class="code" href="classPXMLRPCServerParms.html#a1">SetFault</a>(00109       PINDEX code,00110       <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; text00111     ) { <a class="code" href="classPXMLRPCServerParms.html#m1">request</a>.<a class="code" href="classPXMLRPCBlock.html#a9">SetFault</a>(code, <a class="code" href="classPXMLRPCServerParms.html#m0">resource</a>.<a class="code" href="classPXMLRPCServerResource.html#a9">FormatFault</a>(code, text)); }00112 <a name="l00113"></a><a class="code" href="classPXMLRPCServerParms.html#m0">00113</a>     <a class="code" href="classPXMLRPCServerResource.html">PXMLRPCServerResource</a> &amp; <a class="code" href="classPXMLRPCServerParms.html#m0">resource</a>;<a name="l00114"></a><a class="code" href="classPXMLRPCServerParms.html#m1">00114</a>     <a class="code" href="classPXMLRPCBlock.html">PXMLRPCBlock</a> &amp; <a class="code" href="classPXMLRPCServerParms.html#m1">request</a>;<a name="l00115"></a><a class="code" href="classPXMLRPCServerParms.html#m2">00115</a>     <a class="code" href="classPXMLRPCBlock.html">PXMLRPCBlock</a> <a class="code" href="classPXMLRPCServerParms.html#m2">response</a>;00116 };00117 00118 00119 <span class="preprocessor">#endif</span>00120 <span class="preprocessor"></span>00121 </pre></div><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:11 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -