📄 inetmail_8h-source.html
字号:
<a name="l00477"></a><a class="code" href="classPSMTPServer.html#n3">00477</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPSMTPServer.html#n3">fromPath</a>;<a name="l00478"></a><a class="code" href="classPSMTPServer.html#n4">00478</a> <a class="code" href="classPStringList.html">PStringList</a> <a class="code" href="classPSMTPServer.html#n4">toNames</a>;<a name="l00479"></a><a class="code" href="classPSMTPServer.html#n5">00479</a> <a class="code" href="classPStringList.html">PStringList</a> <a class="code" href="classPSMTPServer.html#n5">toDomains</a>;<a name="l00480"></a><a class="code" href="classPSMTPServer.html#n6">00480</a> PINDEX <a class="code" href="classPSMTPServer.html#n6">messageBufferSize</a>;00481 <span class="keyword">enum</span> { <a class="code" href="classPSMTPServer.html#t4t0">WasMAIL</a>, <a class="code" href="classPSMTPServer.html#t4t1">WasSEND</a>, <a class="code" href="classPSMTPServer.html#t4t2">WasSAML</a>, <a class="code" href="classPSMTPServer.html#t4t3">WasSOML</a> } <a class="code" href="classPSMTPServer.html#n7">sendCommand</a>;<a name="l00482"></a><a class="code" href="classPSMTPServer.html#n8">00482</a> <a class="code" href="classPInternetProtocol.html#t6">StuffState</a> <a class="code" href="classPSMTPServer.html#n8">endMIMEDetectState</a>;00483 };00484 00485 00487 <span class="comment">// PPOP3</span>00488 <a name="l00526"></a><a class="code" href="classPPOP3.html">00526</a> <span class="keyword">class </span><a class="code" href="classPPOP3.html">PPOP3</a> : <span class="keyword">public</span> <a class="code" href="classPInternetProtocol.html">PInternetProtocol</a>00527 {00528 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPPOP3.html">PPOP3</a>, <a class="code" href="classPInternetProtocol.html">PInternetProtocol</a>)00529 00530 <span class="keyword">public</span>:<a name="l00531"></a><a class="code" href="classPPOP3.html#s14">00531</a> <span class="keyword">enum</span> <a class="code" href="classPPOP3.html#s14">Commands</a> {00532 <a class="code" href="classPPOP3.html#s14s0">USER</a>, <a class="code" href="classPPOP3.html#s14s1">PASS</a>, <a class="code" href="classPPOP3.html#s14s2">QUIT</a>, <a class="code" href="classPPOP3.html#s14s3">RSET</a>, <a class="code" href="classPPOP3.html#s14s4">NOOP</a>, <a class="code" href="classPPOP3.html#s14s5">STATcmd</a>,00533 <a class="code" href="classPPOP3.html#s14s6">LIST</a>, <a class="code" href="classPPOP3.html#s14s7">RETR</a>, <a class="code" href="classPPOP3.html#s14s8">DELE</a>, <a class="code" href="classPPOP3.html#s14s9">APOP</a>, <a class="code" href="classPPOP3.html#s14s10">TOP</a>, <a class="code" href="classPPOP3.html#s14s11">UIDL</a>,00534 <a class="code" href="classPPOP3.html#s14s12">AUTH</a>, <a class="code" href="classPPOP3.html#s14s13">NumCommands</a>00535 };00536 00537 00538 <span class="keyword">protected</span>:00539 <a class="code" href="classPPOP3.html#b0">PPOP3</a>();00540 00552 <span class="keyword">virtual</span> PINDEX <a class="code" href="classPPOP3.html#b1">ParseResponse</a>(00553 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & line <span class="comment">// Input response line to be parsed</span>00554 );00555 00556 <span class="comment">// Member variables</span><a name="l00557"></a><a class="code" href="classPPOP3.html#q0">00557</a> <span class="keyword">static</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPPOP3.html#q0">okResponse</a>;<a name="l00558"></a><a class="code" href="classPPOP3.html#q1">00558</a> <span class="keyword">static</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPPOP3.html#q1">errResponse</a>;00559 };00560 00561 <a name="l00589"></a><a class="code" href="classPPOP3Client.html">00589</a> <span class="keyword">class </span><a class="code" href="classPPOP3Client.html">PPOP3Client</a> : <span class="keyword">public</span> <a class="code" href="classPPOP3.html">PPOP3</a>00590 {00591 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPPOP3Client.html">PPOP3Client</a>, <a class="code" href="classPPOP3.html">PPOP3</a>)00592 00593 <span class="keyword">public</span>:00600 <a class="code" href="classPPOP3Client.html#a0">PPOP3Client</a>();00601 00605 <a class="code" href="classPPOP3Client.html#a1">~PPOP3Client</a>();00606 00607 00608 <span class="comment">// Overrides from class PChannel.</span>00614 <span class="comment"></span> <span class="keyword">virtual</span> BOOL <a class="code" href="classPPOP3Client.html#a2">Close</a>();00615 00616 00617 <span class="comment">// New functions for class.</span><a name="l00618"></a><a class="code" href="classPPOP3Client.html#s3">00618</a> <span class="keyword">enum</span> <a class="code" href="classPPOP3Client.html#s3">LoginOptions</a>00619 {00620 <a class="code" href="classPPOP3Client.html#s3s0">AllowUserPass</a> = 1, <span class="comment">// Allow the use of the plain old USER/PASS if APOP</span>00621 <span class="comment">// or SASL are not available</span>00622 <a class="code" href="classPPOP3Client.html#s3s1">UseSASL</a> = 2, <span class="comment">// Use SASL if the AUTH command is supported by</span>00623 <span class="comment">// the server</span>00624 <a class="code" href="classPPOP3Client.html#s3s2">AllowClearTextSASL</a> = 4 <span class="comment">// Allow LOGIN and PLAIN mechanisms to be used</span>00625 };00626 00632 BOOL <a class="code" href="classPPOP3Client.html#a3">LogIn</a>(00633 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & username, <span class="comment">// User name on remote system.</span>00634 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & password, <span class="comment">// Password for user name.</span>00635 <span class="keywordtype">int</span> options = <a class="code" href="classPPOP3Client.html#s3s0">AllowUserPass</a> <span class="comment">// See LoginOptions above</span>00636 );00637 00643 <span class="keywordtype">int</span> <a class="code" href="classPPOP3Client.html#a4">GetMessageCount</a>();00644 00651 <a class="code" href="classPUnsignedArray.html">PUnsignedArray</a> <a class="code" href="classPPOP3Client.html#a5">GetMessageSizes</a>();00652 00662 <a class="code" href="classPStringArray.html">PStringArray</a> <a class="code" href="classPPOP3Client.html#a6">GetMessageHeaders</a>();00663 00664 00665 <span class="comment">/* Begin the retrieval of an entire message. The application may then use</span>00666 <span class="comment"> the <A>PApplicationSocket::ReadLine()</A> function with the</span>00667 <span class="comment"> <CODE>unstuffLine</CODE> parameter set to TRUE. Repeated calls until</span>00668 <span class="comment"> its return valus is FALSE will read the message headers and body.</span>00669 <span class="comment"></span>00670 <span class="comment"> @return</span>00671 <span class="comment"> Array of strings continaing message headers.</span>00672 <span class="comment"> */</span>00673 BOOL <a class="code" href="classPPOP3Client.html#a7">BeginMessage</a>(00674 PINDEX messageNumber00678 );00679 00685 BOOL <a class="code" href="classPPOP3Client.html#a8">DeleteMessage</a>(00686 PINDEX messageNumber00687 <span class="comment">/* Number of message to retrieve. This is an integer from 1 to the</span>00688 <span class="comment"> maximum number of messages available.</span>00689 <span class="comment"> */</span>00690 );00691 00692 00693 <span class="keyword">protected</span>:00694 BOOL <a class="code" href="classPPOP3Client.html#b0">OnOpen</a>();00695 00696 <span class="comment">// Member variables</span><a name="l00697"></a><a class="code" href="classPPOP3Client.html#n0">00697</a> BOOL <a class="code" href="classPPOP3Client.html#n0">loggedIn</a>;<a name="l00698"></a><a class="code" href="classPPOP3Client.html#n1">00698</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPPOP3Client.html#n1">apopBanner</a>;00699 };00700 00701 <a name="l00714"></a><a class="code" href="classPPOP3Server.html">00714</a> <span class="keyword">class </span><a class="code" href="classPPOP3Server.html">PPOP3Server</a> : <span class="keyword">public</span> <a class="code" href="classPPOP3.html">PPOP3</a>00715 {00716 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPPOP3Server.html">PPOP3Server</a>, <a class="code" href="classPPOP3.html">PPOP3</a>)00717 00718 <span class="keyword">public</span>:00725 <a class="code" href="classPPOP3Server.html#a0">PPOP3Server</a>();00726 00727 00728 <span class="comment">// New functions for class.</span>00736 <span class="comment"></span> BOOL <a class="code" href="classPPOP3Server.html#a1">ProcessCommand</a>();00737 00747 <span class="keyword">virtual</span> BOOL <a class="code" href="classPPOP3Server.html#a2">HandleOpenMailbox</a>(00748 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPPOP3Server.html#n0">username</a>, <span class="comment">// User name for mail box</span>00749 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & password <span class="comment">// Password for user name</span>00750 );00751 00759 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPPOP3Server.html#a3">HandleSendMessage</a>(00760 PINDEX messageNumber, <span class="comment">// Number of message to send.</span>00761 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & id, <span class="comment">// Unique id of message to send.</span>00762 PINDEX lines <span class="comment">// Nuumber of lines in body of message to send.</span>00763 );00764 00772 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPPOP3Server.html#a4">HandleDeleteMessage</a>(00773 PINDEX messageNumber, <span class="comment">// Number of message to send.</span>00774 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & id <span class="comment">// Unique id of message to send.</span>00775 );00776 00777 00778 <span class="keyword">protected</span>:00779 BOOL <a class="code" href="classPPOP3Server.html#b0">OnOpen</a>();00780 00781 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPPOP3Server.html#b1">OnUSER</a>(00782 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & name <span class="comment">// Name of user.</span>00783 );00784 <span class="comment">// Specify user name (mailbox).</span>00785 00786 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPPOP3Server.html#b2">OnPASS</a>(00787 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & passwd <span class="comment">// Password for account.</span>00788 );00789 <span class="comment">// Specify password and log user in.</span>00790 00791 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPPOP3Server.html#b3">OnQUIT</a>();00792 <span class="comment">// End connection, saving all changes (delete messages).</span>00793 00794 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPPOP3Server.html#b4">OnRSET</a>();00795 <span class="comment">// Reset connection (undelete messages).</span>00796 00797 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPPOP3Server.html#b5">OnNOOP</a>();00798 <span class="comment">// Do nothing.</span>00799 00800 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPPOP3Server.html#b6">OnSTAT</a>();00801 <span class="comment">// Get number of messages in mailbox.</span>00802 00806 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPPOP3Server.html#b7">OnLIST</a>(00807 PINDEX msg <span class="comment">// Number of message.</span>00808 );00809 00810 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPPOP3Server.html#b8">OnRETR</a>(
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -