Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / camel-tcp-stream-ssl.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  *  Authors: Jeffrey Stedfast <fejj@ximian.com>
4  *
5  *  Copyright 2001 Ximian, Inc. (www.ximian.com)
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of version 2 of the GNU Lesser General Public
9  * License as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  */
22
23
24 #ifndef CAMEL_TCP_STREAM_SSL_H
25 #define CAMEL_TCP_STREAM_SSL_H
26
27 #include <camel/camel-tcp-stream.h>
28
29 #define CAMEL_TCP_STREAM_SSL_TYPE     (camel_tcp_stream_ssl_get_type ())
30 #define CAMEL_TCP_STREAM_SSL(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSL))
31 #define CAMEL_TCP_STREAM_SSL_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSLClass))
32 #define CAMEL_IS_TCP_STREAM_SSL(o)    (CAMEL_CHECK_TYPE((o), CAMEL_TCP_STREAM_SSL_TYPE))
33
34 #define CAMEL_TCP_STREAM_SSL_ENABLE_SSL2   (1 << 0)
35 #define CAMEL_TCP_STREAM_SSL_ENABLE_SSL3   (1 << 1)
36 #define CAMEL_TCP_STREAM_SSL_ENABLE_TLS    (1 << 2)
37
38 G_BEGIN_DECLS
39
40 struct _CamelSession;
41
42 struct _CamelTcpStreamSSL {
43         CamelTcpStream parent_object;
44         
45         struct _CamelTcpStreamSSLPrivate *priv;
46 };
47
48 typedef struct {
49         CamelTcpStreamClass parent_class;
50         
51         /* virtual functions */
52         
53 } CamelTcpStreamSSLClass;
54
55 /* Standard Camel function */
56 CamelType camel_tcp_stream_ssl_get_type (void);
57
58 /* public methods */
59 CamelStream *camel_tcp_stream_ssl_new (struct _CamelSession *session, const char *expected_host, guint32 flags);
60
61 CamelStream *camel_tcp_stream_ssl_new_raw (struct _CamelSession *session, const char *expected_host, guint32 flags);
62
63 int camel_tcp_stream_ssl_enable_ssl (CamelTcpStreamSSL *ssl);
64
65 G_END_DECLS
66
67 #endif /* CAMEL_TCP_STREAM_SSL_H */