/*
 * e-mail-config-service-backend.h
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) version 3.
 *
 * 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with the program; if not, see <http://www.gnu.org/licenses/>
 *
 */

#ifndef E_MAIL_CONFIG_SERVICE_BACKEND_H
#define E_MAIL_CONFIG_SERVICE_BACKEND_H

#include <gtk/gtk.h>
#include <camel/camel.h>
#include <libebackend/libebackend.h>

#include <mail/e-mail-autoconfig.h>

/* Standard GObject macros */
#define E_TYPE_MAIL_CONFIG_SERVICE_BACKEND \
	(e_mail_config_service_backend_get_type ())
#define E_MAIL_CONFIG_SERVICE_BACKEND(obj) \
	(G_TYPE_CHECK_INSTANCE_CAST \
	((obj), E_TYPE_MAIL_CONFIG_SERVICE_BACKEND, EMailConfigServiceBackend))
#define E_MAIL_CONFIG_SERVICE_BACKEND_CLASS(cls) \
	(G_TYPE_CHECK_CLASS_CAST \
	((cls), E_TYPE_MAIL_CONFIG_SERVICE_BACKEND, EMailConfigServiceBackendClass))
#define E_IS_MAIL_CONFIG_SERVICE_BACKEND(obj) \
	(G_TYPE_CHECK_INSTANCE_TYPE \
	((obj), E_TYPE_MAIL_CONFIG_SERVICE_BACKEND))
#define E_IS_MAIL_CONFIG_SERVICE_BACKEND_CLASS(cls) \
	(G_TYPE_CHECK_CLASS_TYPE \
	((cls), E_TYPE_MAIL_CONFIG_SERVICE_BACKEND))
#define E_MAIL_CONFIG_SERVICE_BACKEND_GET_CLASS(obj) \
	(G_TYPE_INSTANCE_GET_CLASS \
	((obj), E_TYPE_MAIL_CONFIG_SERVICE_BACKEND, EMailConfigServiceBackendClass))

G_BEGIN_DECLS

struct _EMailConfigServicePage;

typedef struct _EMailConfigServiceBackend EMailConfigServiceBackend;
typedef struct _EMailConfigServiceBackendClass EMailConfigServiceBackendClass;
typedef struct _EMailConfigServiceBackendPrivate EMailConfigServiceBackendPrivate;

struct _EMailConfigServiceBackend {
	EExtension parent;
	EMailConfigServiceBackendPrivate *priv;
};

struct _EMailConfigServiceBackendClass {
	EExtensionClass parent_class;

	const gchar *backend_name;

	gboolean	(*get_selectable)
					(EMailConfigServiceBackend *backend);
	ESource *	(*new_collection)
					(EMailConfigServiceBackend *backend);
	void		(*insert_widgets)
					(EMailConfigServiceBackend *backend,
					 GtkBox *parent);
	void		(*setup_defaults)
					(EMailConfigServiceBackend *backend);
	gboolean	(*auto_configure)
					(EMailConfigServiceBackend *backend,
					 EMailAutoconfig *autoconfig);
	gboolean	(*check_complete)
					(EMailConfigServiceBackend *backend);
	void		(*commit_changes)
					(EMailConfigServiceBackend *backend);
};

GType		e_mail_config_service_backend_get_type
					(void) G_GNUC_CONST;
struct _EMailConfigServicePage *
		e_mail_config_service_backend_get_page
					(EMailConfigServiceBackend *backend);
ESource *	e_mail_config_service_backend_get_source
					(EMailConfigServiceBackend *backend);
void		e_mail_config_service_backend_set_source
					(EMailConfigServiceBackend *backend,
					 ESource *source);
ESource *	e_mail_config_service_backend_get_collection
					(EMailConfigServiceBackend *backend);
void		e_mail_config_service_backend_set_collection
					(EMailConfigServiceBackend *backend,
					 ESource *collection);
CamelProvider *	e_mail_config_service_backend_get_provider
					(EMailConfigServiceBackend *backend);
CamelSettings *	e_mail_config_service_backend_get_settings
					(EMailConfigServiceBackend *backend);
gboolean	e_mail_config_service_backend_get_selectable
					(EMailConfigServiceBackend *backend);
void		e_mail_config_service_backend_insert_widgets
					(EMailConfigServiceBackend *backend,
					 GtkBox *parent);
void		e_mail_config_service_backend_setup_defaults
					(EMailConfigServiceBackend *backend);
gboolean	e_mail_config_service_backend_auto_configure
					(EMailConfigServiceBackend *backend,
					 EMailAutoconfig *autoconfig);
gboolean	e_mail_config_service_backend_check_complete
					(EMailConfigServiceBackend *backend);
void		e_mail_config_service_backend_commit_changes
					(EMailConfigServiceBackend *backend);

G_END_DECLS

#endif /* E_MAIL_CONFIG_SERVICE_BACKEND_H */

ue='gnome-3.32'>gnome-3.32</option>
<option value='gnome-3.36'>gnome-3.36</option>
<option value='gstreamer'>gstreamer</option>
<option value='gstreamer-1.16'>gstreamer-1.16</option>
<option value='gstreamer0.10-removal'>gstreamer0.10-removal</option>
<option value='main' selected='selected'>main</option>
<option value='master'>master</option>
<option value='mate-1.16'>mate-1.16</option>
<option value='mate-1.18'>mate-1.18</option>
<option value='mate-1.20'>mate-1.20</option>
<option value='mate-1.22'>mate-1.22</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)</td><td class='sub right'></td></tr></table>
<table class='tabs'><tr><td>
<a href='/~lantw44/cgit/freebsd-ports-gnome/about/'>about</a><a href='/~lantw44/cgit/freebsd-ports-gnome/'>summary</a><a href='/~lantw44/cgit/freebsd-ports-gnome/refs/?id=0ea52f99b465b681e2a4bf7c44a8f7093f40fc68'>refs</a><a class='active' href='/~lantw44/cgit/freebsd-ports-gnome/log/devel/p5-ReadLine-Gnu'>log</a><a href='/~lantw44/cgit/freebsd-ports-gnome/tree/devel/p5-ReadLine-Gnu?id=0ea52f99b465b681e2a4bf7c44a8f7093f40fc68'>tree</a><a href='/~lantw44/cgit/freebsd-ports-gnome/commit/devel/p5-ReadLine-Gnu?id=0ea52f99b465b681e2a4bf7c44a8f7093f40fc68'>commit</a><a href='/~lantw44/cgit/freebsd-ports-gnome/diff/devel/p5-ReadLine-Gnu?id=0ea52f99b465b681e2a4bf7c44a8f7093f40fc68'>diff</a><a href='/~lantw44/cgit/freebsd-ports-gnome/stats/devel/p5-ReadLine-Gnu'>stats</a></td><td class='form'><form class='right' method='get' action='/~lantw44/cgit/freebsd-ports-gnome/log/devel/p5-ReadLine-Gnu'>
<input type='hidden' name='id' value='0ea52f99b465b681e2a4bf7c44a8f7093f40fc68'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/~lantw44/cgit/freebsd-ports-gnome/log/?id=0ea52f99b465b681e2a4bf7c44a8f7093f40fc68'>root</a>/<a href='/~lantw44/cgit/freebsd-ports-gnome/log/devel?id=0ea52f99b465b681e2a4bf7c44a8f7093f40fc68'>devel</a>/<a href='/~lantw44/cgit/freebsd-ports-gnome/log/devel/p5-ReadLine-Gnu?id=0ea52f99b465b681e2a4bf7c44a8f7093f40fc68'>p5-ReadLine-Gnu</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th></th><th class='left'>Commit message (<a href='/~lantw44/cgit/freebsd-ports-gnome/log/devel/p5-ReadLine-Gnu?id=0ea52f99b465b681e2a4bf7c44a8f7093f40fc68&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Age</th><th class='left'>Files</th><th class='left'>Lines</th></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/freebsd-ports-gnome/commit/devel/p5-ReadLine-Gnu?id=5e800ccc508aed294b1f06ef4af90cf1271eecc6'>Do not hardcode make and pass CPPFLAGS to CFLAGS to fix build with no readlin...</a></td><td>Baptiste Daroussin</td><td><span title='2014-07-02 06:47:52 +0800'>2014-07-02</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+2</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/freebsd-ports-gnome/commit/devel/p5-ReadLine-Gnu?id=d05e563a6360473b0b00a96e10b062a7cd75ad5b'>Fix build with readline from ports</a></td><td>Baptiste Daroussin</td><td><span title='2014-07-01 20:10:39 +0800'>2014-07-01</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/freebsd-ports-gnome/commit/devel/p5-ReadLine-Gnu?id=61de712f4609a18a2988695e252651c69d10cafd'>Remove all the bootstrap files (.bs) from the plists.</a></td><td>Mathieu Arnold</td><td><span title='2014-06-10 20:14:12 +0800'>2014-06-10</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+0</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/freebsd-ports-gnome/commit/devel/p5-ReadLine-Gnu?id=9a73d4dad53e9fe9119dde9fab88d0d5586e262b'>- Update to 1.24</a></td><td>Frederic Culot</td><td><span title='2014-03-25 02:20:28 +0800'>2014-03-25</span></td><td>2</td><td><span class='deletions'>-3</span>/<span class='insertions'>+3</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/freebsd-ports-gnome/commit/devel/p5-ReadLine-Gnu?id=e247fc2434d0f5232417a43351b1cc180a7fc0fe'>- Update to 1.23</a></td><td>Frederic Culot</td><td><span title='2014-03-22 16:54:42 +0800'>2014-03-22</span></td><td>3</td><td><span class='deletions'>-3</span>/<span class='insertions'>+8</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/freebsd-ports-gnome/commit/devel/p5-ReadLine-Gnu?id=d88a19fab859f4d5309b319f73b4e48be8703cb8'>Support STAGEDIR.</a></td><td>Vanilla I. Shu</td><td><span title='2013-10-31 15:36:25 +0800'>2013-10-31</span></td><td>2</td><td><span class='deletions'>-4</span>/<span class='insertions'>+2</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/freebsd-ports-gnome/commit/devel/p5-ReadLine-Gnu?id=580a778a16c548027cb6b56ad3357f1dec74e859'>Add NO_STAGE all over the place in preparation for the staging support (cat: ...</a></td><td>Baptiste Daroussin</td><td><span title='2013-09-21 01:13:42 +0800'>2013-09-21</span></td><td>1</td><td><span class='deletions'>-0</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/freebsd-ports-gnome/commit/devel/p5-ReadLine-Gnu?id=4819ca343bfee8a3b54e7ff3ac26d280d1c1696f'>- Convert to new perl framework</a></td><td>Mathieu Arnold</td><td><span title='2013-08-03 02:52:07 +0800'>2013-08-03</span></td><td>1</td><td><span class='deletions'>-6</span>/<span class='insertions'>+3</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/freebsd-ports-gnome/commit/devel/p5-ReadLine-Gnu?id=6fb6597c896b7c2d85ae3cf5c992dff59a7205ac'>- Change PERL_CONFIGURE to "yes" for all values less than or equal to 5.8.0+</a></td><td>Sunpoet Po-Chuan Hsieh</td><td><span title='2011-09-17 14:49:29 +0800'>2011-09-17</span>