1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Authors: Jeffrey Stedfast <fejj@ximian.com>
5 * Copyright 2001 Ximian, Inc. (www.ximian.com)
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.
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.
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.
24 #ifndef CAMEL_TCP_STREAM_SSL_H
25 #define CAMEL_TCP_STREAM_SSL_H
27 #include <camel/camel-tcp-stream.h>
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))
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)
42 struct _CamelTcpStreamSSL {
43 CamelTcpStream parent_object;
45 struct _CamelTcpStreamSSLPrivate *priv;
49 CamelTcpStreamClass parent_class;
51 /* virtual functions */
53 } CamelTcpStreamSSLClass;
55 /* Standard Camel function */
56 CamelType camel_tcp_stream_ssl_get_type (void);
59 CamelStream *camel_tcp_stream_ssl_new (struct _CamelSession *session, const char *expected_host, guint32 flags);
61 CamelStream *camel_tcp_stream_ssl_new_raw (struct _CamelSession *session, const char *expected_host, guint32 flags);
63 int camel_tcp_stream_ssl_enable_ssl (CamelTcpStreamSSL *ssl);
67 #endif /* CAMEL_TCP_STREAM_SSL_H */