📄 httpsvc_8h-source.html
字号:
00471 };00472 <span class="keyword">static</span> BOOL <a class="code" href="classPServiceHTML.html#d4">ProcessMacros</a>(<a class="code" href="classPHTTPRequest.html">PHTTPRequest</a> & request,00473 <a class="code" href="classPString.html">PString</a> & text,00474 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & filename,00475 <span class="keywordtype">unsigned</span> options);00476 };00477 00478 00480 <a name="l00481"></a><a class="code" href="classPServiceMacro.html">00481</a> <span class="keyword">class </span><a class="code" href="classPServiceMacro.html">PServiceMacro</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00482 {00483 <span class="keyword">public</span>:00484 <a class="code" href="classPServiceMacro.html#a0">PServiceMacro</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * name, BOOL isBlock);00485 <a class="code" href="classPServiceMacro.html#a0">PServiceMacro</a>(<span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & name, BOOL isBlock);00486 <a class="code" href="classPObject.html#z199_0">Comparison</a> <a class="code" href="classPServiceMacro.html#a2">Compare</a>(<span class="keyword">const</span> <a class="code" href="classPObject.html">PObject</a> & obj) <span class="keyword">const</span>;00487 <span class="keyword">virtual</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPServiceMacro.html#a3">Translate</a>(00488 <a class="code" href="classPHTTPRequest.html">PHTTPRequest</a> & request,00489 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & args,00490 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & block00491 ) <span class="keyword">const</span>;00492 <span class="keyword">protected</span>:<a name="l00493"></a><a class="code" href="classPServiceMacro.html#n0">00493</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="classPServiceMacro.html#n0">macroName</a>;<a name="l00494"></a><a class="code" href="classPServiceMacro.html#n1">00494</a> BOOL <a class="code" href="classPServiceMacro.html#n1">isMacroBlock</a>;<a name="l00495"></a><a class="code" href="classPServiceMacro.html#n2">00495</a> <a class="code" href="classPServiceMacro.html">PServiceMacro</a> * <a class="code" href="classPServiceMacro.html#n2">link</a>;<a name="l00496"></a><a class="code" href="classPServiceMacro.html#q0">00496</a> <span class="keyword">static</span> <a class="code" href="classPServiceMacro.html">PServiceMacro</a> * <a class="code" href="classPServiceMacro.html#q0">list</a>;<a name="l00497"></a><a class="code" href="classPServiceMacro.html#l0">00497</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPServiceMacro.html#l0">PServiceMacros_list</a>;00498 };00499 00500 <a name="l00501"></a><a class="code" href="httpsvc_8h.html#a0">00501</a> <span class="preprocessor">#define P_EMPTY</span>00502 <span class="preprocessor"></span><a name="l00503"></a><a class="code" href="httpsvc_8h.html#a1">00503</a> <span class="preprocessor">#define PCREATE_SERVICE_MACRO(name, request, args) \</span>00504 <span class="preprocessor"> class PServiceMacro_##name : public PServiceMacro { \</span>00505 <span class="preprocessor"> public: \</span>00506 <span class="preprocessor"> PServiceMacro_##name() : PServiceMacro(#name, FALSE) { } \</span>00507 <span class="preprocessor"> PString Translate(PHTTPRequest &, const PString &, const PString &) const; \</span>00508 <span class="preprocessor"> }; \</span>00509 <span class="preprocessor"> static const PServiceMacro_##name serviceMacro_##name; \</span>00510 <span class="preprocessor"> PString PServiceMacro_##name::Translate(PHTTPRequest & request, const PString & args, const PString &) const</span>00511 <span class="preprocessor"></span>00512 00513 <a name="l00514"></a><a class="code" href="httpsvc_8h.html#a2">00514</a> <span class="preprocessor">#define PCREATE_SERVICE_MACRO_BLOCK(name, request, args, block) \</span>00515 <span class="preprocessor"> class PServiceMacro_##name : public PServiceMacro { \</span>00516 <span class="preprocessor"> public: \</span>00517 <span class="preprocessor"> PServiceMacro_##name() : PServiceMacro(#name, TRUE) { } \</span>00518 <span class="preprocessor"> PString Translate(PHTTPRequest &, const PString &, const PString &) const; \</span>00519 <span class="preprocessor"> }; \</span>00520 <span class="preprocessor"> static const PServiceMacro_##name serviceMacro_##name; \</span>00521 <span class="preprocessor"> PString PServiceMacro_##name::Translate(PHTTPRequest & request, const PString & args, const PString & block) const</span>00522 <span class="preprocessor"></span>00523 00524 00526 <a name="l00527"></a><a class="code" href="classPServiceHTTPString.html">00527</a> <span class="keyword">class </span><a class="code" href="classPServiceHTTPString.html">PServiceHTTPString</a> : <span class="keyword">public</span> <a class="code" href="classPHTTPString.html">PHTTPString</a>00528 {00529 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPServiceHTTPString.html">PServiceHTTPString</a>, <a class="code" href="classPHTTPString.html">PHTTPString</a>)00530 <span class="keyword">public</span>:<a name="l00531"></a><a class="code" href="classPServiceHTTPString.html#a0">00531</a> <a class="code" href="classPServiceHTTPString.html#a0">PServiceHTTPString</a>(<span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & url, <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPHTTPString.html#n0">string</a>)00532 : <a class="code" href="classPHTTPString.html">PHTTPString</a>(url, <a class="code" href="classPHTTPString.html#n0">string</a>) { }00533 <a name="l00534"></a><a class="code" href="classPServiceHTTPString.html#a1">00534</a> <a class="code" href="classPServiceHTTPString.html#a0">PServiceHTTPString</a>(<span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & url, <span class="keyword">const</span> <a class="code" href="classPHTTPAuthority.html">PHTTPAuthority</a> & auth)00535 : <a class="code" href="classPHTTPString.html">PHTTPString</a>(url, auth) { }00536 <a name="l00537"></a><a class="code" href="classPServiceHTTPString.html#a2">00537</a> <a class="code" href="classPServiceHTTPString.html#a0">PServiceHTTPString</a>(<span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & url, <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPHTTPString.html#n0">string</a>, <span class="keyword">const</span> <a class="code" href="classPHTTPAuthority.html">PHTTPAuthority</a> & auth)00538 : <a class="code" href="classPHTTPString.html">PHTTPString</a>(url, string, auth) { }00539 <a name="l00540"></a><a class="code" href="classPServiceHTTPString.html#a3">00540</a> <a class="code" href="classPServiceHTTPString.html#a0">PServiceHTTPString</a>(<span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & url, <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPHTTPString.html#n0">string</a>, <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPHTTPResource.html#n1">contentType</a>)00541 : <a class="code" href="classPHTTPString.html">PHTTPString</a>(url, string, <a class="code" href="classPHTTPResource.html#n1">contentType</a>) { }00542 <a name="l00543"></a><a class="code" href="classPServiceHTTPString.html#a4">00543</a> <a class="code" href="classPServiceHTTPString.html#a0">PServiceHTTPString</a>(<span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & url, <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPHTTPString.html#n0">string</a>, <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPHTTPResource.html#n1">contentType</a>, <span class="keyword">const</span> <a class="code" href="classPHTTPAuthority.html">PHTTPAuthority</a> & auth)00544 : <a class="code" href="classPHTTPString.html">PHTTPString</a>(url, string, contentType, auth) { }00545 00546 <a class="code" href="classPString.html">PString</a> <a class="code" href="classPServiceHTTPString.html#a5">LoadText</a>(<a class="code" href="classPHTTPRequest.html">PHTTPRequest</a> &);00547 00548 <span class="keyword">protected</span>:00549 <span class="keyword">virtual</span> BOOL <a class="code" href="classPServiceHTTPString.html#b0">GetExpirationDate</a>(00550 <a class="code" href="classPTime.html">PTime</a> & when <span class="comment">// Time that the resource expires</span>00551 );00552 };00553 00554 <a name="l00555"></a><a class="code" href="classPServiceHTTPFile.html">00555</a> <span class="keyword">class </span><a class="code" href="classPServiceHTTPFile.html">PServiceHTTPFile</a> : <span class="keyword">public</span> <a class="code" href="classPHTTPFile.html">PHTTPFile</a>00556 {00557 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPServiceHTTPFile.html">PServiceHTTPFile</a>, <a class="code" href="classPHTTPFile.html">PHTTPFile</a>)00558 <span class="keyword">public</span>:<a name="l00559"></a><a class="code" href="classPServiceHTTPFile.html#a0">00559</a> <a class="code" href="classPServiceHTTPFile.html#a0">PServiceHTTPFile</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & filename, BOOL needSig = FALSE)00560 : <a class="code" href="classPHTTPFile.html">PHTTPFile</a>(filename) { <a class="code" href="classPServiceHTTPFile.html#n0">needSignature</a> = needSig; }<a name="l00561"></a><a class="code" href="classPServiceHTTPFile.html#a1">00561</a> <a class="code" href="classPServiceHTTPFile.html#a0">PServiceHTTPFile</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & filename, <span class="keyword">const</span> <a class="code" href="classPFilePath.html">PFilePath</a> & file, BOOL needSig = FALSE)00562 : <a class="code" href="classPHTTPFile.html">PHTTPFile</a>(filename, file) { <a class="code" href="classPServiceHTTPFile.html#n0">needSignature</a> = needSig; }<a name="l00563"></a><a class="code" href="classPServiceHTTPFile.html#a2">00563</a> <a class="code" href="classPServiceHTTPFile.html#a0">PServiceHTTPFile</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & filename, <span class="keyword">const</span> <a class="code" href="classPHTTPAuthority.html">PHTTPAuthority</a> & auth, BOOL needSig = FALSE)00564 : <a class="code" href="classPHTTPFile.html">PHTTPFile</a>(filename, auth) { <a class="code" href="classPServiceHTTPFile.html#n0">needSignature</a> = needSig; }<a name="l00565"></a><a class="code" href="classPServiceHTTPFile.html#a3">00565</a> <a class="code" href="classPServiceHTTPFile.html#a0">PServiceHTTPFile</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & filename, <span class="keyword">const</span> <a class="code" href="classPFilePath.html">PFilePath</a> & file, <span class="keyword">const</span> <a class="code" href="classPHTTPAuthority.html">PHTTPAuthority</a> & auth, BOOL needSig = FALSE)00566 : <a class="code" href="classPHTTPFile.html">PHTTPFile</a>(filename, file, auth) { <a class="code" href="classPServiceHTTPFile.html#n0">needSignature</a> = needSig; }00567 00568 <span class="keywordtype">void</span> <a class="code" href="classPServiceHTTPFile.html#a4">OnLoadedText</a>(<a class="code" href="classPHTTPRequest.html">PHTTPRequest</a> &, <a class="code" href="classPString.html">PString</a> & text);00569 00570 <span class="keyword">protected</span>:00571 <span class="keyword">virtual</span> BOOL <a class="code" href="classPServiceHTTPFile.html#b0">GetExpirationDate</a>(00572 <a class="code" href="classPTime.html">PTime</a> & when <span class="comment">// Time that the resource expires</span>00573 );00574 <a name="l00575"></a><a class="code" href="classPServiceHTTPFile.html#n0">00575</a> BOOL <a class="code" href="classPServiceHTTPFile.html#n0">needSignature</a>;00576 };00577 <a name="l00578"></a><a class="code" href="classPServiceHTTPDirectory.html">00578</a> <span class="keyword">class </span><a class="code" href="classPServiceHTTPDirectory.html">PServiceHTTPDirectory</a> : <span class="keyword">public</span> <a class="code" href="classPHTTPDirectory.html">PHTTPDirectory</a>00579 {00580 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPServiceHTTPDirectory.html">PServiceHTTPDirectory</a>, <a class="code" href="classPHTTPDirectory.html">PHTTPDirectory</a>)00581 <span class="keyword">public</span>:<a name="l00582"></a><a class="code" href="classPServiceHTTPDirectory.html#a0">00582</a> <a class="code" href="classPServiceHTTPDirectory.html#a0">PServiceHTTPDirectory</a>(<span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & url, <span class="keyword">const</span> <a class="code" href="classPDirectory.html">PDirectory</a> & dirname, BOOL needSig = FALSE)00583 : <a class="code" href="classPHTTPDirectory.html">PHTTPDirectory</a>(url, dirname) { <a class="code" href="classPServiceHTTPDirectory.html#n0">needSignature</a> = needSig; }00584 <a name="l00585"></a><a class="code" href="classPServiceHTTPDirectory.html#a1">00585</a> <a class="code" href="classPServiceHTTPDirectory.html#a0">PServiceHTTPDirectory</a>(<span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & url, <span class="keyword">const</span> <a class="code" href="classPDirectory.html">PDirectory</a> & dirname, <span class="keyword">const</span> <a class="code" href="classPHTTPAuthority.html">PHTTPAuthority</a> & auth, BOOL needSig = FALSE)00586 : <a class="code" href="classPHTTPDirectory.html">PHTTPDirectory</a>(url, dirname, auth) { <a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -