1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>mailfilter: Account.hh Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><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">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
<h1>Account.hh</h1><a href="Account_8hh.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">// Account.hh - source file for the mailfilter program</span>
00002 <span class="comment">// Copyright (c) 2000 - 2004 Andreas Bauer <baueran@in.tum.de></span>
00003 <span class="comment">//</span>
00004 <span class="comment">// This program is free software; you can redistribute it and/or modify</span>
00005 <span class="comment">// it under the terms of the GNU General Public License as published by</span>
00006 <span class="comment">// the Free Software Foundation; either version 2 of the License, or</span>
00007 <span class="comment">// (at your option) any later version.</span>
00008 <span class="comment">//</span>
00009 <span class="comment">// This program is distributed in the hope that it will be useful,</span>
00010 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
00011 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
00012 <span class="comment">// GNU General Public License for more details.</span>
00013 <span class="comment">//</span>
00014 <span class="comment">// You should have received a copy of the GNU General Public License</span>
00015 <span class="comment">// along with this program; if not, write to the Free Software</span>
00016 <span class="comment">// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,</span>
00017 <span class="comment">// USA.</span>
00018
00019 <span class="preprocessor">#ifndef ACCOUNT_HH</span>
00020 <span class="preprocessor"></span><span class="preprocessor">#define ACCOUNT_HH</span>
00021 <span class="preprocessor"></span>
<a name="l00022"></a><a class="code" href="Account_8hh.html#a0">00022</a> <span class="preprocessor">#define POP3 0</span>
<a name="l00023"></a><a class="code" href="Account_8hh.html#a1">00023</a> <span class="preprocessor"></span><span class="preprocessor">#define IMAP 1</span>
<a name="l00024"></a><a class="code" href="Account_8hh.html#a2">00024</a> <span class="preprocessor"></span><span class="preprocessor">#define APOP 2</span>
00025 <span class="preprocessor"></span>
00026 <span class="preprocessor">#include <string></span>
00027 <span class="preprocessor">#include <vector></span>
00028 <span class="preprocessor">#include "<a class="code" href="Header_8hh.html">Header.hh</a>"</span>
00029 <span class="preprocessor">#include "<a class="code" href="Feedback_8hh.html">Feedback.hh</a>"</span>
00030 <span class="preprocessor">#include "<a class="code" href="Connection_8hh.html">Connection.hh</a>"</span>
00031 <span class="preprocessor">#include "<a class="code" href="SocketConnection_8hh.html">SocketConnection.hh</a>"</span>
00032
00033 <span class="keyword">using</span> <span class="keyword">namespace </span>std;
00034
00035 <span class="keyword">namespace </span>acc {
00036
<a name="l00037"></a><a class="code" href="classacc_1_1Account.html">00037</a> <span class="keyword">class </span><a class="code" href="classacc_1_1Account.html">Account</a> {
00038 <span class="keyword">public</span>:
<a name="l00039"></a><a class="code" href="classacc_1_1Account.html#o0">00039</a> <a class="code" href="classfb_1_1Feedback.html">fb::Feedback</a>* <a class="code" href="classacc_1_1Account.html#o0">report</a>;
<a name="l00040"></a><a class="code" href="classacc_1_1Account.html#o1">00040</a> string <a class="code" href="classacc_1_1Account.html#o1">server</a>;
<a name="l00041"></a><a class="code" href="classacc_1_1Account.html#o2">00041</a> <span class="keywordtype">int</span> <a class="code" href="classacc_1_1Account.html#o2">port</a>;
<a name="l00042"></a><a class="code" href="classacc_1_1Account.html#o3">00042</a> string <a class="code" href="classacc_1_1Account.html#o3">user</a>;
<a name="l00043"></a><a class="code" href="classacc_1_1Account.html#o4">00043</a> string <a class="code" href="classacc_1_1Account.html#o4">pass</a>;
<a name="l00044"></a><a class="code" href="classacc_1_1Account.html#o5">00044</a> <span class="keywordtype">int</span> <a class="code" href="classacc_1_1Account.html#o5">protocol</a>;
<a name="l00045"></a><a class="code" href="classacc_1_1Account.html#o6">00045</a> vector<string> <a class="code" href="classacc_1_1Account.html#o6">msgIDs</a>;
00046
00047 <span class="comment">// Add more defines for other kinds of connection interfaces, for example:</span>
00048 <span class="comment">// #ifdef _WIN32</span>
00049 <span class="comment">// conn::WinSockConnection host;</span>
00050 <span class="comment">// #endif</span>
00051 <span class="comment">// You get the idea...</span>
00052 <span class="preprocessor">#ifndef _WIN32</span>
<a name="l00053"></a><a class="code" href="classacc_1_1Account.html#o7">00053</a> <span class="preprocessor"></span> <a class="code" href="classconn_1_1SocketConnection.html">conn::SocketConnection</a> <a class="code" href="classacc_1_1Account.html#o7">host</a>;
00054 <span class="preprocessor">#else</span>
00055 <span class="preprocessor"></span> <a class="code" href="classconn_1_1WinSockConnection.html">conn::WinSockConnection</a> <a class="code" href="classacc_1_1Account.html#o7">host</a>;
00056 <span class="preprocessor">#endif</span>
00057 <span class="preprocessor"></span>
00058 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classacc_1_1Account.html#a0">loginHost</a>(<span class="keywordtype">void</span>) = 0; <span class="comment">// Returns error code why login failed, or 0 on success</span>
00059 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classacc_1_1Account.html#a1">logoutHost</a>(<span class="keywordtype">void</span>) = 0; <span class="comment">// Returns FALSE if logout fails</span>
00060 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classacc_1_1Account.html#a2">removeMessage</a>(<span class="keywordtype">int</span>) = 0; <span class="comment">// Delete a message on the e-mail server</span>
00061
00062 <span class="comment">// Networking functions/wrappers</span>
00063 <span class="keywordtype">int</span> <a class="code" href="classacc_1_1Account.html#a3">sendHost</a>(<span class="keyword">const</span> string&);
00064 string <a class="code" href="classacc_1_1Account.html#a4">receiveHost</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span>);
00065 <span class="keywordtype">int</span> <a class="code" href="classacc_1_1Account.html#a5">connectHost</a>(<span class="keyword">const</span> string&, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>);
00066 <span class="keywordtype">int</span> <a class="code" href="classacc_1_1Account.html#a6">disconnectHost</a>(<span class="keywordtype">void</span>);
00067
00068 <span class="keyword">public</span>:
00069 <a class="code" href="classacc_1_1Account.html#a7">Account</a>(<a class="code" href="classfb_1_1Feedback.html">fb::Feedback</a>*);
00070 <span class="keyword">virtual</span> <a class="code" href="classacc_1_1Account.html#a8">~Account</a>() = 0;
00071 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classacc_1_1Account.html#a9">check</a>(<span class="keywordtype">void</span>) = 0;
00072 <span class="keyword">const</span> vector<string>& <a class="code" href="classacc_1_1Account.html#a10">getMessageIDs</a>(<span class="keywordtype">void</span>); <span class="comment">// Get all message IDs of already parsed message headers</span>
00073 <span class="keywordtype">void</span> <a class="code" href="classacc_1_1Account.html#a11">addMessageIDs</a>(<span class="keyword">const</span> vector<string>&); <span class="comment">// Add IDs to the pile of already parsed message headers</span>
00074 };
00075
00076 }
00077
00078 <span class="preprocessor">#endif</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Sun Aug 8 15:22:26 2004 for mailfilter by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>
|