Files
evolution/camel/camel-remote-store.h
Dan Winship 4c42c93dc6 Add an "extra_conf" field to CamelProvider with structures and defines and
* camel-provider.h: Add an "extra_conf" field to CamelProvider
	with structures and defines and stuff, for providers to specify
	additional configuration options that they want. Also add a
	"supports ssl" flag to the provider flags.

	* camel-remote-store.c: add a "default_ssl_port" field.
	(remote_construct): If the URL has the "use_ssl" parameter, set
	the store's use_ssl flag.
	(remote_connect): If using SSL and no port specified, use the
	default_ssl_port rather than the default_port.

	* providers/smtp/camel-smtp-provider.c (smtp_provider): add
	CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
	gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
	(ssmtp_provider): gone

	* providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
	flag if "use_ssl" param is set.
	(smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
	than checking if this is smtp or ssmtp.

	* providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
	bunch of IMAP-specific configuration options, like "check for new
	mail in all folders" (default TRUE), "show only subscribed
	folders" (default TRUE), "ignore server-supplied namespace", and
	"apply filters to INBOX" (not yet implemented).
	(imap_provider): We support SSL and we no longer allow a path in
	the URL. (namespace is handled via extra_conf)
	(simap_provider): Gone

	* providers/imap/camel-imap-store.c (camel_imap_store_init): Set
	default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
	(construct): remove simap stuff, deal with "use_lsub",
	"namespace", "check_all", and "filter" parameters. Set base_url
	to not include params.
	(imap_store_setup_online): Don't ask for the namespace if it was
	set explicitly. Don't get subscribed folders if !use_lsub.
	(imap_concat): Fix a bug.
	(get_folder_info): Support for not checking all folders.

	* providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
	on server" (currently still implemented by the mailer code, not
	here), "delete after N days" (not yet implemented).
	(pop3_provider): we support SSL
	(spop_provider): gone

	* providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
	default_ssl_port
	(pop3_connect): Remove spop code

svn path=/trunk/; revision=8968
2001-03-27 05:22:44 +00:00

87 lines
2.9 KiB
C

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* camel-remote-store.h : class for a remote store */
/*
* Authors: Peter Williams <peterw@helixcode.com>
*
* Copyright (C) 2000 Helix Code, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
#ifndef CAMEL_REMOTE_STORE_H
#define CAMEL_REMOTE_STORE_H 1
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus }*/
#include <camel/camel-store.h>
#define CAMEL_REMOTE_STORE_TYPE (camel_remote_store_get_type ())
#define CAMEL_REMOTE_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_REMOTE_STORE_TYPE, CamelRemoteStore))
#define CAMEL_REMOTE_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_REMOTE_STORE_TYPE, CamelRemoteStoreClass))
#define CAMEL_IS_REMOTE_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_REMOTE_STORE_TYPE))
typedef struct {
CamelStore parent_object;
struct _CamelRemoteStorePrivate *priv;
CamelStream *istream, *ostream;
guint timeout_id, default_port, default_ssl_port;
gboolean use_ssl;
} CamelRemoteStore;
typedef struct {
CamelStoreClass parent_class;
gint (*send_string) (CamelRemoteStore *store, CamelException *ex,
char *fmt, va_list ap);
gint (*send_stream) (CamelRemoteStore *store, CamelStream *stream,
CamelException *ex);
gint (*recv_line) (CamelRemoteStore *store, char **dest,
CamelException *ex);
void (*keepalive) (CamelRemoteStore *store);
} CamelRemoteStoreClass;
/* Standard Camel function */
CamelType camel_remote_store_get_type (void);
/* FIXME: All of these i/o functions need an api overhaul, they're not like
any other functions, anywhere in the world ... */
/* Extra public functions */
GList *camel_remote_store_authtype_list (void);
gint camel_remote_store_send_string (CamelRemoteStore *store, CamelException *ex,
char *fmt, ...);
gint camel_remote_store_send_stream (CamelRemoteStore *store, CamelStream *stream,
CamelException *ex);
gint camel_remote_store_recv_line (CamelRemoteStore *store, char **dest,
CamelException *ex);
void camel_remote_store_refresh_folders (CamelRemoteStore *store,
CamelException *ex);
gboolean camel_remote_store_connected (CamelRemoteStore *store, CamelException *ex);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* CAMEL_REMOTE_STORE_H */