<commit_before>/*
 * Copyright (C) 2008, Nokia <<EMAIL>>
 *
 * This library 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 library 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 library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA.
 *
 * Authors:
 *  <NAME> <<EMAIL>>
 *  <NAME> <<EMAIL>>
 */

#include "config.h"

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <pthread.h>
#include <signal.h>
#include <time.h>
#include <inttypes.h>

#include <glib/gi18n-lib.h>
#include <glib-object.h>
#include <gio/gio.h>

#include <sqlite3.h>

#include <libedataserver/eds-version.h>

#include <camel/camel.h>

#ifdef EVOLUTION_SHELL_3_2
#include <mail/em-utils.h>
#include <mail/e-mail.h>
#endif  /* EVOLUTION_SHELL_3_2 */

#ifdef EVOLUTION_SHELL_3_3_5
#include <libemail-engine/e-mail-folder-utils.h>
#include <libemail-engine/e-mail-session.h>
#include <libemail-engine/mail-config.h>
#include <libemail-engine/mail-ops.h>
#include <libemail-utils/e-account-utils.h>
#else  /* EVOLUTION_SHELL_3_3_5 */
#include <mail/e-mail-folder-utils.h>
#include <mail/mail-config.h>
#include <mail/mail-ops.h>
#include <e-util/e-account-utils.h>
#ifdef EVOLUTION_SHELL_2_91
#include <mail/e-mail-session.h>
#else  /* EVOLUTION_SHELL_2_91 */
#include <mail/mail-session.h>
#endif /* EVOLUTION_SHELL_2_91 */
#endif /* EVOLUTION_SHELL_3_3_5 */

#include <mail/e-mail-backend.h>
#include <shell/e-shell.h>

#include <e-util/e-config.h>

#include <libedataserver/e-account.h>
#include <libedataserver/e-account-list.h>

#include <libtracker-sparql/tracker-sparql.h>

#include <libtracker-common/tracker-date-time.h>
#include <libtracker-common/tracker-ontologies.h>
#include <libtracker-common/tracker-utils.h>
#include <libtracker-common/tracker-type-utils.h>

#include "tracker-evolution-plugin.h"

/* This runs in-process of evolution (in the mailer, as a EPlugin). It has
 * access to the CamelSession using the external variable 'session'. The header
 * mail/mail-session.h makes this variable public */

/* Note to people who are scared about this plugin using the CamelDB directly:
 * The code uses camel_db_clone to create a new connection to the DB. We hope
 * that's sufficient for not having to lock the store instances (sqlite3 has
 * its own locks, and we only clone the db_r instance, we also only ever do
 * reads, never writes). We hope that's sufficient for not having to get our<commit_msg>evolution: Fixed includes ... yet again<commit_after>/*
 * Copyright (C) 2008, Nokia <<EMAIL>>
 *
 * This library 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 library 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 library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA.
 *
 * Authors:
 *  <NAME> <<EMAIL>>
 *  <NAME> <<EMAIL>>
 */

#include "config.h"

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <pthread.h>
#include <signal.h>
#include <time.h>
#include <inttypes.h>

#include <glib/gi18n-lib.h>
#include <glib-object.h>
#include <gio/gio.h>

#include <sqlite3.h>

/* This is why you should seal your headers with one include for
 * client sanity. This is the horendous shit we've had to put up with
 * for years from the Evo shell API :(
 */
#if defined(EVOLUTION_SHELL_3_3_5)
#include <libemail-engine/e-mail-folder-utils.h>
#include <libemail-engine/e-mail-session.h>
#include <libemail-engine/mail-config.h>
#include <libemail-engine/mail-ops.h>
#include <libemail-utils/e-account-utils.h>
#elif defined(EVOLUTION_SHELL_3_2)
#include <mail/em-utils.h>
#include <mail/e-mail.h>
#include <mail/mail-config.h>
#include <mail/mail-ops.h>
#include <e-util/e-account-utils.h>
#elif defined(EVOLUTION_SHELL_2_91)
#include <mail/e-mail.h>
#include <mail/mail-config.h>
#include <mail/mail-ops.h>
#include <e-util/e-account-utils.h>
#else /* OLDER, mostly 2.32 or so */
#include <mail/mail-config.h>
#include <mail/mail-ops.h>
#include <mail/mail-session.h>
#include <e-util/e-account-utils.h>
#endif

/* Remaining includes which are in ALL versions: */
#include <shell/e-shell.h>

#include <e-util/e-config.h>

#include <libedataserver/e-account.h>
#include <libedataserver/e-account-list.h>
#include <libedataserver/eds-version.h>

/* Back to sanity */
#include <libtracker-sparql/tracker-sparql.h>

#include <libtracker-common/tracker-date-time.h>
#include <libtracker-common/tracker-ontologies.h>
#include <libtracker-common/tracker-utils.h>
#include <libtracker-common/tracker-type-utils.h>

#include "tracker-evolution-plugin.h"

/* This runs in-process of evolution (in the mailer, as a EPlugin). It has
 * access to the CamelSession using the external variable 'session'. The header
 * mail/mail-session.h makes this variable public */

/* Note to people who are scared about this plugin using the CamelDB directly:
 * The code uses camel_db_clone to create a new connection to the DB. We hope
 * that's sufficient for not having to lock the store instances (sqlite3 has
 * its own locks, and we only clone the db_r instance, we also only ever do
 * reads, never writes). We hope that's sufficient for not having to get our
{'fraction_non_alphanumeric': 0.12503951944356623, 'fraction_numerical': 0.0115396775213405, 'mean_word_length': 4.325757575757576, 'pattern_counts': {'":': 0, '<': 102, '<?xml version=': 0, '>': 102, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 1, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1363396', 'n_tokens_mistral': 2238, 'n_tokens_neox': 2174, 'n_words': 688}