Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / providers / smtp / camel-smtp-transport.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-smtp-transport.h : class for an smtp transfer */
3
4 /* 
5  * Authors:
6  *   Jeffrey Stedfast <fejj@stampede.org>
7  *
8  * Copyright (C) 2000 Ximian, Inc. (www.ximian.com)
9  *
10  * This program is free software; you can redistribute it and/or 
11  * modify it under the terms of version 2 of the GNU Lesser General Public 
12  * License as published by the Free Software Foundation.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
22  * USA
23  */
24
25 #ifndef CAMEL_SMTP_TRANSPORT_H
26 #define CAMEL_SMTP_TRANSPORT_H 1
27
28 #include "camel-transport.h"
29 #include "camel-tcp-stream.h"
30
31 #define CAMEL_SMTP_TRANSPORT_TYPE     (camel_smtp_transport_get_type ())
32 #define CAMEL_SMTP_TRANSPORT(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransport))
33 #define CAMEL_SMTP_TRANSPORT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransportClass))
34 #define CAMEL_IS_SMTP_TRANSPORT(o)    (CAMEL_CHECK_TYPE((o), CAMEL_SMTP_TRANSPORT_TYPE))
35
36 #define CAMEL_SMTP_TRANSPORT_IS_ESMTP               (1 << 0)
37 #define CAMEL_SMTP_TRANSPORT_8BITMIME               (1 << 1)
38 #define CAMEL_SMTP_TRANSPORT_ENHANCEDSTATUSCODES    (1 << 2)
39 #define CAMEL_SMTP_TRANSPORT_STARTTLS               (1 << 3)
40
41 #define CAMEL_SMTP_TRANSPORT_AUTH_EQUAL             (1 << 4)  /* set if we are using authtypes from a broken AUTH= */
42
43 G_BEGIN_DECLS
44
45 typedef struct {
46         CamelTransport parent_object;
47         
48         CamelStream *istream, *ostream;
49         
50         guint32 flags;
51         
52         gboolean connected;
53         struct sockaddr *localaddr;
54         socklen_t localaddrlen;
55         
56         GHashTable *authtypes;
57 } CamelSmtpTransport;
58
59 typedef struct {
60         CamelTransportClass parent_class;
61
62 } CamelSmtpTransportClass;
63
64 /* Standard Camel function */
65 CamelType camel_smtp_transport_get_type (void);
66
67 G_END_DECLS
68
69 #endif /* CAMEL_SMTP_TRANSPORT_H */