mailfilter
0.8.7
src
protocol.hh
Go to the documentation of this file.
1
// protocol.hh - source file for the mailfilter program
2
// Copyright (c) 2003 - 2009 Andreas Bauer <baueran@gmail.com>
3
//
4
// This program is free software; you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation; either version 2 of the License, or
7
// (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program; if not, write to the Free Software
16
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17
// USA.
18
19
#ifndef PROTOCOL_HH
20
#define PROTOCOL_HH
21
22
#include "
connection.hh
"
23
24
// This is useful to specify a combination of protocol and encryption,
25
// e.g. PROTOCOL_POP3 | SSL.
26
#define PROTOCOL_POP3 2
27
#define PROTOCOL_APOP 4
28
#define SSL_C 4096
29
30
using namespace
std;
31
32
class
Protocol
33
{
34
protected
:
35
Connection
*
conn
;
36
unsigned
int
prot_ident
;
37
unsigned
int
connect_type
;
38
39
public
:
40
virtual
~Protocol
(
void
) { };
41
virtual
bool
login (
const
char
* usr,
42
const
char
* pass,
43
const
unsigned
int
)
const
= 0;
44
virtual
bool
logout (
void
)
const
= 0;
45
virtual
int
remove_msg (
const
unsigned
int
num)
const
= 0;
46
virtual
int
status (
void
)
const
= 0;
47
virtual
int
scan (
void
)
const
= 0;
48
void
set_connection (
Connection
*);
49
void
set_ident (
unsigned
int
);
50
unsigned
int
ident (
void
)
const
;
51
};
52
53
#endif
Protocol::prot_ident
unsigned int prot_ident
Definition:
protocol.hh:36
connection.hh
Protocol
Definition:
protocol.hh:32
Connection
Definition:
connection.hh:29
Protocol::~Protocol
virtual ~Protocol(void)
Definition:
protocol.hh:40
Protocol::conn
Connection * conn
Definition:
protocol.hh:35
Protocol::connect_type
unsigned int connect_type
Definition:
protocol.hh:37
Generated by
1.8.17