Commit 61ae3635 authored by Matthew Barnes's avatar Matthew Barnes

Introduce libemail-engine and libemail-utils.

These libraries are bound for E-D-S so they live at the lowest layer of
Evolution for now -- even libeutil can link to them (but please don't).

This is the first step toward moving mail handing to a D-Bus service.
parent 37644b9d
......@@ -53,6 +53,8 @@ SUBDIRS = \
data \
smclient \
libgnomecanvas \
libemail-utils \
libemail-engine \
e-util \
a11y \
filter \
......
......@@ -34,31 +34,35 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
#include <libecal/e-cal-time-util.h>
#include <libedataserverui/e-category-completion.h>
#include <libedataserverui/e-client-utils.h>
#include <libedataserverui/e-source-combo-box.h>
#include "misc/e-dateedit.h"
#include "misc/e-send-options.h"
#include "misc/e-buffer-tagger.h"
#include <libecal/e-cal-time-util.h>
#include "../e-timezone-entry.h"
#include "e-util/e-util.h"
#include "e-util/e-account-utils.h"
#include "e-util/e-categories-config.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-util-private.h"
#include <e-util/e-util.h>
#include <e-util/e-categories-config.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-dialog-widgets.h>
#include <e-util/e-util-private.h>
#include <libemail-utils/e-account-utils.h>
#include <misc/e-dateedit.h>
#include <misc/e-send-options.h>
#include <misc/e-buffer-tagger.h>
#include "../e-alarm-list.h"
#include "../e-meeting-attendee.h"
#include "../e-meeting-store.h"
#include "../e-meeting-list-view.h"
#include "comp-editor.h"
#include "comp-editor-util.h"
#include "../e-alarm-list.h"
#include "../e-meeting-store.h"
#include "../e-timezone-entry.h"
#include "alarm-list-dialog.h"
#include "event-page.h"
#include "comp-editor-util.h"
#include "comp-editor.h"
#include "e-send-options-utils.h"
#include "event-page.h"
#define EVENT_PAGE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
......
......@@ -33,20 +33,23 @@
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libedataserverui/e-category-completion.h>
#include <libedataserverui/e-client-utils.h>
#include <libedataserverui/e-source-combo-box.h>
#include <libedataserverui/e-name-selector.h>
#include <libedataserverui/e-name-selector-entry.h>
#include <libedataserverui/e-name-selector-list.h>
#include <widgets/misc/e-dateedit.h>
#include "misc/e-buffer-tagger.h"
#include "e-util/e-util.h"
#include "e-util/e-account-utils.h"
#include "e-util/e-categories-config.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-util-private.h"
#include <e-util/e-util.h>
#include <e-util/e-categories-config.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-util-private.h>
#include <misc/e-dateedit.h>
#include <misc/e-buffer-tagger.h>
#include <libemail-utils/e-account-utils.h>
#include "../calendar-config.h"
#include "comp-editor.h"
......
......@@ -33,27 +33,31 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
#include <libedataserverui/e-category-completion.h>
#include <libedataserverui/e-client-utils.h>
#include <libedataserverui/e-source-combo-box.h>
#include <misc/e-dateedit.h>
#include "misc/e-buffer-tagger.h"
#include <misc/e-buffer-tagger.h>
#include <e-util/e-categories-config.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-util-private.h>
#include <e-util/e-util.h>
#include <libemail-utils/e-account-utils.h>
#include "../e-meeting-attendee.h"
#include "../e-meeting-list-view.h"
#include "../e-meeting-store.h"
#include "../e-timezone-entry.h"
#include "comp-editor.h"
#include "comp-editor-util.h"
#include "e-send-options-utils.h"
#include "task-page.h"
#include "e-util/e-util.h"
#include "e-util/e-account-utils.h"
#include "e-util/e-categories-config.h"
#include "e-util/e-util-private.h"
#include "../e-meeting-attendee.h"
#include "../e-meeting-store.h"
#include "../e-meeting-list-view.h"
#define TASK_PAGE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), TYPE_TASK_PAGE, TaskPagePrivate))
......
......@@ -28,18 +28,22 @@
#include <string.h>
#include <glib/gi18n.h>
#include <libebackend/e-extensible.h>
#include <libedataserver/e-flag.h>
#include <libedataserver/e-time-utils.h>
#include <libecal/e-cal-client-view.h>
#include <libecal/e-cal-time-util.h>
#include <e-util/e-util.h>
#include <e-util/e-util-enumtypes.h>
#include <libemail-utils/e-account-utils.h>
#include "comp-util.h"
#include "e-cal-model.h"
#include "itip-utils.h"
#include "misc.h"
#include "e-util/e-util.h"
#include "e-util/e-account-utils.h"
#include "e-util/e-util-enumtypes.h"
struct _ECalModelComponentPrivate {
GString *categories_str;
......
......@@ -28,6 +28,7 @@
#include <gio/gio.h>
#include <glib/gi18n.h>
#include <libsoup/soup.h>
#include <libecal/e-cal-component.h>
#include <libecal/e-cal-util.h>
#include <libecal/e-cal-time-util.h>
......@@ -35,8 +36,11 @@
#include <libedataserver/e-data-server-util.h>
#include <libedataserver/e-proxy.h>
#include <libedataserverui/e-passwords.h>
#include <e-util/e-account-utils.h>
#include <e-util/e-util-enumtypes.h>
#include <libemail-utils/e-account-utils.h>
#include "itip-utils.h"
#include "e-meeting-utils.h"
#include "e-meeting-attendee.h"
......
......@@ -24,21 +24,24 @@
#include <config.h>
#endif
#include <time.h>
#include <glib/gi18n.h>
#include <libedataserver/e-time-utils.h>
#include <gtk/gtk.h>
#include <libical/ical.h>
#include <e-util/e-account-utils.h>
#include <e-util/e-dialog-utils.h>
#include <libsoup/soup.h>
#include <libecal/e-cal-time-util.h>
#include <libecal/e-cal-util.h>
#include <libsoup/soup.h>
#include "itip-utils.h"
#include <time.h>
#include "dialogs/comp-editor-util.h"
#include <libedataserver/e-time-utils.h>
#include <e-util/e-dialog-utils.h>
#include <libemail-utils/e-account-utils.h>
#include <composer/e-msg-composer.h>
#include "itip-utils.h"
#include "dialogs/comp-editor-util.h"
#define d(x)
static const gchar *itip_methods[] = {
......
......@@ -36,7 +36,7 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libedataserverui/e-passwords.h>
#include <mail/mail-mt.h>
#include <libemail-utils/mail-mt.h>
#include "settings/mail-capplet-shell.h"
#include <libedataserver/e-categories.h>
......
......@@ -59,6 +59,8 @@ libevolution_mail_settings_la_LIBADD = \
$(top_builddir)/filter/libfilter.la \
$(top_builddir)/mail/libevolution-mail.la \
$(top_builddir)/shell/libeshell.la \
$(top_builddir)/libemail-utils/libemail-utils.la \
$(top_builddir)/libemail-engine/libemail-engine.la \
$(top_builddir)/e-util/libeutil.la
libevolution_mail_settings_la_LDFLAGS = $(NO_UNDEFINED)
......
......@@ -28,7 +28,7 @@
#include <glib/gi18n.h>
#include "mail/em-utils.h"
#include "mail/mail-send-recv.h"
#include "mail/mail-ops.h"
#include "libemail-engine/mail-ops.h"
#include "mail/em-folder-tree.h"
struct _AnjalMailViewPrivate {
......
......@@ -38,8 +38,8 @@
#include <mail/em-utils.h>
#include <mail/em-composer-utils.h>
#include <mail/mail-config.h>
#include <mail/mail-mt.h>
#include <libemail-engine/mail-config.h>
#include <libemail-utils/mail-mt.h>
#include <shell/e-shell.h>
......
......@@ -25,10 +25,12 @@
#endif
#include <glib/gi18n.h>
#include "mail-settings-view.h"
#include <libedataserver/e-account-list.h>
#include <libemail-utils/e-account-utils.h>
#include "mail-settings-view.h"
#include "mail-view.h"
#include <e-util/e-account-utils.h>
struct _MailSettingsViewPrivate {
GtkWidget *tab_str;
......
......@@ -27,7 +27,7 @@
#include <glib/gi18n.h>
#include "mail/em-utils.h"
#include "mail/mail-send-recv.h"
#include "mail/mail-ops.h"
#include "libemail-engine/mail-ops.h"
#include "mail-view.h"
#ifndef ANJAL_SETTINGS
#include "mail-folder-view.h"
......
......@@ -63,6 +63,7 @@ libcomposer_la_LIBADD = \
$(top_builddir)/em-format/libemformat.la \
$(top_builddir)/addressbook/gui/contact-editor/libecontacteditor.la \
$(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.la \
$(top_builddir)/libemail-utils/libemail-utils.la \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
$(GTKHTML_LIBS)
......
......@@ -23,9 +23,9 @@
#include <libebook/e-destination.h>
#include <shell/e-shell.h>
#include <e-util/e-signature.h>
#include <e-util/e-signature-list.h>
#include <composer/e-composer-header.h>
#include <libemail-utils/e-signature.h>
#include <libemail-utils/e-signature-list.h>
/* Standard GObject macros */
#define E_TYPE_COMPOSER_HEADER_TABLE \
......
......@@ -37,13 +37,13 @@
#include <ctype.h>
#include <fcntl.h>
#include "e-util/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-signature-utils.h"
#include "e-util/e-util-private.h"
#include "em-format/em-format.h"
#include "em-format/em-format-quote.h"
#include <e-util/e-alert-dialog.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-util-private.h>
#include <em-format/em-format.h>
#include <em-format/em-format-quote.h>
#include <libemail-utils/e-account-utils.h>
#include <libemail-utils/e-signature-utils.h>
#include "e-composer-private.h"
......
......@@ -1618,6 +1618,10 @@ help/quickref/pl/Makefile
help/quickref/pt/Makefile
help/quickref/sv/Makefile
help/quickref/sq/Makefile
libemail-utils/Makefile
libemail-utils/libemail-utils.pc
libemail-engine/Makefile
libemail-engine/libemail-engine.pc
libgnomecanvas/Makefile
shell/Makefile
shell/evolution-nognome
......
......@@ -18,7 +18,6 @@ endif
privsolib_LTLIBRARIES = libeutil.la
eutilinclude_HEADERS = \
e-account-utils.h \
e-activity.h \
e-alert.h \
e-alert-dialog.h \
......@@ -43,9 +42,6 @@ eutilinclude_HEADERS = \
e-plugin-ui.h \
e-plugin-util.h \
e-selection.h \
e-signature.h \
e-signature-list.h \
e-signature-utils.h \
e-sorter.h \
e-sorter-array.h \
e-text-event-processor-emacs-like.h \
......@@ -89,7 +85,6 @@ libeutil_la_CPPFLAGS = \
libeutil_la_SOURCES = \
$(eutilinclude_HEADERS) \
e-account-utils.c \
e-activity.c \
e-alert.c \
e-alert-dialog.c \
......@@ -114,9 +109,6 @@ libeutil_la_SOURCES = \
e-plugin-util.c \
e-print.c \
e-selection.c \
e-signature.c \
e-signature-list.c \
e-signature-utils.c \
e-sorter.c \
e-sorter-array.c \
e-text-event-processor-emacs-like.c \
......
......@@ -42,9 +42,6 @@ NONE:OBJECT,BOOLEAN
NONE:OBJECT,DOUBLE,DOUBLE,BOOLEAN
NONE:OBJECT,OBJECT
NONE:OBJECT,STRING
NONE:OBJECT,STRING,INT
NONE:OBJECT,STRING,INT,STRING,STRING,STRING
NONE:OBJECT,STRING,STRING
NONE:OBJECT,STRING,UINT
NONE:POINTER,INT
NONE:POINTER,INT,INT,INT,INT
......
......@@ -12,6 +12,6 @@ privincludedir=@privincludedir@
Name: Evolution Mail
Description: Mail utilities for Evolution
Version: @VERSION@
Requires: evolution-shell-3.0 camel-1.2
Requires: evolution-shell-3.0 camel-1.2 libemail-engine
Libs: -L${privlibdir} -levolution-mail -lcomposer
Cflags: -I${privincludedir}
NULL =
lib_LTLIBRARIES = libemail-engine.la
include $(top_srcdir)/glib-gen.mak
glib_enum_headers=e-mail-enums.h
glib_enum_output=e-mail-enumtypes
glib_enum_define=E_MAIL
glib_enum_prefix=e_mail
ENUM_GENERATED = e-mail-enumtypes.h e-mail-enumtypes.c
libemail_engine_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir) \
$(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
$(NULL)
libmailengineincludedir = $(privincludedir)/libemail-engine
libmailengineinclude_HEADERS = \
e-mail-enums.h \
e-mail-enumtypes.h \
e-mail-folder-utils.h \
e-mail-junk-filter.h \
e-mail-session-utils.h \
e-mail-session.h \
e-mail-store-utils.h \
e-mail-utils.h \
mail-config.h \
mail-folder-cache.h \
mail-ops.h \
mail-tools.h \
$(NULL)
libemail_engine_la_SOURCES = \
$(libmailengineinclude_HEADERS) \
e-mail-enumtypes.c \
e-mail-folder-utils.c \
e-mail-junk-filter.c \
e-mail-session-utils.c \
e-mail-session.c \
e-mail-store-utils.c \
e-mail-utils.c \
mail-config.c \
mail-folder-cache.c \
mail-ops.c \
mail-tools.c \
$(NULL)
libemail_engine_la_LIBADD = \
$(top_builddir)/libemail-utils/libemail-utils.la \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
$(NULL)
libemail_engine_la_LDFLAGS = $(NO_UNDEFINED)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libemail-engine.pc
BUILT_SOURCES = $(ENUM_GENERATED)
CLEANFILES = $(BUILT_SOURCES)
DISTCLEANFILES = $(pkgconfig_DATA)
dist-hook:
cd $(distdir); rm -f $(BUILT_SOURCES)
-include $(top_srcdir)/git.mk
......@@ -24,7 +24,7 @@
#include <glib/gi18n-lib.h>
#include "mail/mail-tools.h"
#include <libemail-engine/mail-tools.h>
/* X-Mailer header value */
#define X_MAILER ("Evolution " VERSION SUB_VERSION " " VERSION_COMMENT)
......
......@@ -18,7 +18,7 @@
#include "e-mail-junk-filter.h"
#include <mail/e-mail-session.h>
#include <libemail-engine/e-mail-session.h>
G_DEFINE_ABSTRACT_TYPE (
EMailJunkFilter,
......
......@@ -22,18 +22,19 @@
#include "e-mail-session-utils.h"
#include "em-utils.h"
#include <glib/gi18n-lib.h>
#include <mail/mail-tools.h>
#include <mail/e-mail-folder-utils.h>
#include <e-util/e-account-utils.h>
#include <filter/e-filter-rule.h>
#include <libemail-engine/e-mail-folder-utils.h>
#include <libemail-engine/e-mail-utils.h>
#include <libemail-engine/mail-tools.h>
#include <libemail-utils/e-account-utils.h>
/* X-Mailer header value */
#define X_MAILER ("Evolution " VERSION SUB_VERSION " " VERSION_COMMENT)
/* FIXME: Temporary - remove this after we move filter/ to eds */
#define E_FILTER_SOURCE_OUTGOING "outgoing"
typedef struct _AsyncContext AsyncContext;
struct _AsyncContext {
......
......@@ -21,7 +21,7 @@
/* High-level operations with Evolution-specific policies. */
#include <mail/e-mail-session.h>
#include <libemail-engine/e-mail-session.h>
#define E_MAIL_ERROR (e_mail_error_quark ())
......
......@@ -26,11 +26,8 @@
#define E_MAIL_SESSION_H
#include <camel/camel.h>
#include <e-util/e-activity.h>
#include <mail/e-mail-enums.h>
#include <mail/e-mail-account-store.h>
#include <mail/e-mail-label-list-store.h>
#include <mail/mail-folder-cache.h>
#include <libemail-engine/e-mail-enums.h>
#include <libemail-engine/mail-folder-cache.h>
/* Standard GObject macros */
#define E_TYPE_MAIL_SESSION \
......@@ -68,25 +65,13 @@ struct _EMailSession {
struct _EMailSessionClass {
CamelSessionClass parent_class;
void (*activity_added) (EMailSession *session,
EActivity *activity);
};
GType e_mail_session_get_type (void);
EMailSession * e_mail_session_new (void);
void e_mail_session_add_activity (EMailSession *session,
EActivity *activity);
EMailAccountStore *
e_mail_session_get_account_store
(EMailSession *session);
MailFolderCache *
e_mail_session_get_folder_cache (EMailSession *session);
EMailLabelListStore *
e_mail_session_get_label_store (EMailSession *session);
CamelStore * e_mail_session_get_local_store (EMailSession *session);
CamelStore * e_mail_session_get_vfolder_store
(EMailSession *session);
CamelFolder * e_mail_session_get_local_folder (EMailSession *session,
EMailLocalFolder type);
const gchar * e_mail_session_get_local_folder_uri
......
......@@ -20,7 +20,7 @@
#include <config.h>
#endif
#include "em-utils.h"
#include "e-mail-utils.h"
#include "e-mail-store-utils.h"
......
This diff is collapsed.
/*
* 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/>
*
*
* Authors:
* Srinivasa Ragavan <sragavan@gnome.org>
*
*
*/
#ifndef E_MAIL_UTILS_H
#define E_MAIL_UTILS_H
#include <camel/camel.h>
#include <libedataserver/e-account.h>
gboolean em_utils_folder_is_drafts (CamelFolder *folder);
gboolean em_utils_folder_is_templates (CamelFolder *folder);
gboolean em_utils_folder_is_sent (CamelFolder *folder);
gboolean em_utils_folder_is_outbox (CamelFolder *folder);
gboolean em_utils_in_addressbook (CamelInternetAddress *addr,
gboolean local_only);
CamelMimePart * em_utils_contact_photo (CamelInternetAddress *addr,
gboolean local);
EAccount * em_utils_guess_account (CamelMimeMessage *message,
CamelFolder *folder);
EAccount * em_utils_guess_account_with_recipients
(CamelMimeMessage *message,
CamelFolder *folder);
void emu_remove_from_mail_cache (const GSList *addresses);
void emu_remove_from_mail_cache_1 (const gchar *address);
void emu_free_mail_cache (void);
gboolean em_utils_connect_service_sync (CamelService *service,
GCancellable *cancellable,
GError **error);
gboolean em_utils_disconnect_service_sync
(CamelService *service,
gboolean clean,
GCancellable *cancellable,
GError **error);
void em_utils_uids_free (GPtrArray *uids);
gboolean em_utils_is_local_delivery_mbox_file
(CamelURL *url);
#endif /* E_MAIL_UTILS_H */
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
datadir=@datadir@
privincludedir=@privincludedir@
Name: libemail-engine
Description: Client library for evolution mail
Version: @VERSION@
Requires: libemail-utils
Libs: -L${libdir} -lemail-engine
Cflags: -I${privincludedir}
......@@ -31,9 +31,8 @@
#include <libedataserver/e-data-server-util.h>
#include <e-util/e-util.h>
#include "e-util/e-account-utils.h"
#include "e-util/e-signature-utils.h"
#include <libemail-utils/e-account-utils.h>
#include <libemail-utils/e-signature-utils.h>
#include "e-mail-folder-utils.h"
#include "mail-config.h"
......
......@@ -23,7 +23,7 @@
#ifndef MAIL_CONFIG_H
#define MAIL_CONFIG_H
#include <mail/e-mail-session.h>
#include <libemail-engine/e-mail-session.h>
G_BEGIN_DECLS
......
......@@ -39,18 +39,17 @@
#include <glib/gstdio.h>
#include <libedataserver/e-data-server-util.h>
#include <e-util/e-marshal.h>
#include <e-util/e-util.h>
#include "mail-mt.h"
#include <libemail-utils/mail-mt.h>
#include "mail-folder-cache.h"
#include "mail-ops.h"
#include "mail-tools.h"