src/modest-account-mgr-helpers.c
src/modest-tny-folder.c
src/gnome/modest-store-widget.h
-src/gnome/modest-gnome-info-bar.c
src/gnome/modest-platform.c
src/gnome/modest-transport-widget.h
src/gnome/modest-main-window-ui.h
src/gnome/modest-store-widget.c
src/gnome/modest-msg-view-window.c
src/gnome/modest-transport-widget.c
-src/gnome/modest-gnome-info-bar.h
src/gnome/modest-msg-edit-window.c
src/gnome/modest-address-book.c
src/gnome/modest-account-view-window.c
-src/modest-account-mgr-priv.c
src/modest-conf.h
src/modest-tny-account.c
src/modest-error.h
src/modest-mail-operation-queue.c
src/modest-pair.h
src/modest-account-mgr-helpers.h
-src/modest-protocol-info.c
+src/modest-protocol.c
+src/modest-protocol-registry.c
src/modest-cache-mgr.h
src/modest-runtime.c
src/modest-singletons.c
src/modest-address-book.h
src/modest-defs.h
-src/modest-protocol-info.h
+src/modest-protocol.h
+src/modest-protocol-registry.h
src/modest-pair.c
src/modest-widget-memory.c
src/modest-conf.c
src/modest-account-mgr-priv.h
-src/maemo/modest-store-widget.h
src/maemo/modest-platform.c
-src/maemo/modest-transport-widget.h
src/maemo/modest-main-window-ui.h
src/maemo/modest-icon-names.h
src/maemo/modest-main-window.c
-src/maemo/modest-store-widget.c
-src/maemo/easysetup/modest-wizard-dialog.h
src/maemo/easysetup/modest-presets.h
src/maemo/easysetup/modest-presets.c
src/maemo/easysetup/modest-easysetup-provider-combo-box.h
-src/maemo/easysetup/modest-wizard-dialog.c
-src/maemo/easysetup/modest-easysetup-wizard.h
src/maemo/easysetup/modest-easysetup-servertype-combo-box.c
src/maemo/easysetup/main.c
src/maemo/easysetup/modest-easysetup-provider-combo-box.c
src/maemo/easysetup/modest-easysetup-country-combo-box.h
-src/maemo/easysetup/modest-easysetup-wizard.c
src/maemo/easysetup/modest-easysetup-country-combo-box.c
src/maemo/modest-maemo-utils.h
src/maemo/modest-maemo-utils.c
src/maemo/modest-msg-view-window.c
-src/maemo/modest-transport-widget.c
src/maemo/modest-msg-edit-window.c
src/maemo/modest-address-book.c
src/maemo/modest-account-view-window.c
INCLUDES=\
@CHECK_CFLAGS@ \
$(MODEST_GSTUFF_CFLAGS)\
+ $(MODEST_PLATFORM_CFLAGS)\
+ $(MODEST_TOOLKIT_CFLAGS)\
+ $(MODEST_PLUGIN_DEFINES)\
$(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \
$(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \
- -I$(MODEST_TOOLKIT_DIR) \
+ -I${top_srcdir}/src/$(MODEST_TOOLKIT_DIR) \
-I${top_srcdir}/src \
-DPREFIX=\"@prefix@\" \
-DMODESTLOCALEDIR=\""$(modestlocaledir)"\"
objects=\
@CHECK_LIBS@ \
$(MODEST_GSTUFF_LIBS) \
+ $(MODEST_PLATFORM_LIBS) \
+ $(MODEST_TOOLKIT_LIBS) \
$(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS) \
$(MODEST_LIBTINYMAIL_MAEMO_LIBS) \
${top_srcdir}/src/$(MODEST_TOOLKIT_DIR)/libmodest-ui.la \
${top_srcdir}/src/widgets/libmodest-widgets.la \
${top_srcdir}/src/dbus_api/libmodest-dbus-api.la \
- ${top_srcdir}/src/modest-runtime.o \
- ${top_srcdir}/src/modest-singletons.o \
- ${top_srcdir}/src/modest-tny-account.o \
- ${top_srcdir}/src/modest-tny-msg.o \
- ${top_srcdir}/src/modest-tny-send-queue.o \
- ${top_srcdir}/src/modest-widget-memory.o \
- ${top_srcdir}/src/modest-account-mgr-helpers.o \
- ${top_srcdir}/src/modest-account-mgr-priv.o \
- ${top_srcdir}/src/modest-account-mgr.o \
- ${top_srcdir}/src/modest-cache-mgr.o \
- ${top_srcdir}/src/modest-conf.o \
- ${top_srcdir}/src/modest-formatter.o \
- ${top_srcdir}/src/modest-local-folder-info.o \
- ${top_srcdir}/src/modest-mail-operation-queue.o \
- ${top_srcdir}/src/modest-mail-operation.o \
- ${top_srcdir}/src/modest-marshal.o \
- ${top_srcdir}/src/modest-pair.o \
- ${top_srcdir}/src/modest-protocol-info.o \
- ${top_srcdir}/src/modest-ui-actions.o \
- ${top_srcdir}/src/modest-text-utils.o \
- ${top_srcdir}/src/modest-tny-account-store.o \
- ${top_srcdir}/src/modest-tny-folder.o \
- ${top_srcdir}/src/modest-tny-platform-factory.o
+ ${top_srcdir}/src/libmodest.la
check_folder_xfer_SOURCES=\
#include <string.h>
#include <modest-conf.h>
#include <modest-account-mgr.h>
-#include <modest-protocol-info.h>
/* ----------------------- Defines ---------------------- */
TEST_MODEST_ACCOUNT_NAME,
FALSE))
modest_account_mgr_remove_account (account_mgr,
- TEST_MODEST_ACCOUNT_NAME,
- FALSE);
+ TEST_MODEST_ACCOUNT_NAME);
if (modest_account_mgr_account_exists(account_mgr,
TEST_MODEST_ACCOUNT_NAME,
TRUE))
modest_account_mgr_remove_account (account_mgr,
- TEST_MODEST_ACCOUNT_NAME,
- TRUE);
+ TEST_MODEST_ACCOUNT_NAME);
}
static void
gchar *hostname = NULL;
gchar *username = NULL;
gchar *password = NULL;
- ModestTransportStoreProtocol proto;
+ gint portnum;
+ ModestProtocolType proto;
gboolean result;
name = g_strdup (TEST_MODEST_ACCOUNT_NAME);
transport_account = g_strdup ("local-smtp");
result = modest_account_mgr_add_account (account_mgr,
name,
+ "test display name",
+ "user fullname",
+ "user@email.com",
+ MODEST_ACCOUNT_RETRIEVE_HEADERS_ONLY,
store_account,
transport_account, TRUE);
fail_unless (result,
/* Test 3 */
result = modest_account_mgr_remove_account (account_mgr,
- name,
- FALSE);
+ name);
fail_unless (result,
"modest_account_mgr_remove_account failed:\nname: %s\nerror: %s",
name);
hostname = g_strdup ("myhostname.mydomain.com");
username = g_strdup ("myusername");
password = g_strdup ("mypassword");
- proto = MODEST_PROTOCOL_TRANSPORT_SMTP;
+ proto = MODEST_PROTOCOLS_TRANSPORT_SMTP;
+ portnum = 25;
result = modest_account_mgr_add_server_account (account_mgr,
name,
hostname,
+ portnum,
username,
password,
proto,
- MODEST_PROTOCOL_SECURITY_NONE,
- MODEST_PROTOCOL_AUTH_NONE);
+ MODEST_PROTOCOLS_CONNECTION_NONE,
+ MODEST_PROTOCOLS_AUTH_NONE);
fail_unless (result,
"modest_account_mgr_add_server_account failed:\n" \
"name: %s\nhostname: %s\nusername: %s\npassword: %s\nproto: %s",
/* Test 6 */
result = modest_account_mgr_remove_account (account_mgr,
- name,
- TRUE);
+ name);
fail_unless (result,
"modest_account_mgr_remove_account failed:\nname: %s\nerror: %s",
name);
* - Test 5: Create server account with NULL name
* - Test 6: Create server account with invalid name string
* - Test 7: Remove a non-existing account
- * - Test 8: Remove a non-existing server account
+ * - Test 8: Remove a non-existing server account (REMOVED)
* - Test 9: Remove with NULL acount manager
* - Test 10: Remove with NULL name
* - Test 11: Check if an account exists with NULL account_mgr
/* Test 1 */
result = modest_account_mgr_add_account (NULL,
TEST_MODEST_ACCOUNT_NAME,
+ "test display name",
+ "user fullname",
+ "user@email.com",
+ MODEST_ACCOUNT_RETRIEVE_HEADERS_ONLY,
"store_account",
"transport_account", TRUE);
fail_unless (!result,
/* Test 2 */
result = modest_account_mgr_add_account (account_mgr,
NULL,
+ "test display name",
+ "user fullname",
+ "user@email.com",
+ MODEST_ACCOUNT_RETRIEVE_HEADERS_ONLY,
"store_account",
"transport_account", TRUE);
fail_unless (!result,
/* Test 3*/
result = modest_account_mgr_add_account (account_mgr,
"ïnválid//accountñ//nÄméç",
+ "test display name",
+ "user fullname",
+ "user@email.com",
+ MODEST_ACCOUNT_RETRIEVE_HEADERS_ONLY,
"store_account",
"transport_account", TRUE);
fail_unless (!result,
result = modest_account_mgr_add_server_account (NULL,
TEST_MODEST_ACCOUNT_NAME,
"hostname",
+ 143,
"username",
"password",
- MODEST_PROTOCOL_STORE_IMAP,
- MODEST_PROTOCOL_SECURITY_NONE,
- MODEST_PROTOCOL_AUTH_NONE);
+ MODEST_PROTOCOLS_STORE_IMAP,
+ MODEST_PROTOCOLS_CONNECTION_NONE,
+ MODEST_PROTOCOLS_AUTH_NONE);
fail_unless (!result,
"modest_account_mgr_add_server_account does not return " \
"FALSE when passing a NULL ModestAccountMgr");
result = modest_account_mgr_add_server_account (account_mgr,
NULL,
"hostname",
+ 143,
"username",
"password",
- MODEST_PROTOCOL_STORE_IMAP,
- MODEST_PROTOCOL_SECURITY_NONE,
- MODEST_PROTOCOL_AUTH_NONE);
+ MODEST_PROTOCOLS_STORE_IMAP,
+ MODEST_PROTOCOLS_CONNECTION_NONE,
+ MODEST_PROTOCOLS_AUTH_NONE);
fail_unless (!result,
"modest_account_mgr_add_server_account does not return " \
"FALSE when passing a NULL account name");
result = modest_account_mgr_add_server_account (account_mgr,
"ïnválid//accountñ//nÄméç",
"hostname",
+ 143,
"username",
"password",
- MODEST_PROTOCOL_STORE_IMAP,
- MODEST_PROTOCOL_SECURITY_NONE,
- MODEST_PROTOCOL_AUTH_NONE);
+ MODEST_PROTOCOLS_STORE_IMAP,
+ MODEST_PROTOCOLS_CONNECTION_NONE,
+ MODEST_PROTOCOLS_AUTH_NONE);
fail_unless (!result,
"modest_account_mgr_add_server_account does not return " \
"FALSE when passing an invalid account name");
/* Test 7 */
result = modest_account_mgr_remove_account (account_mgr,
- "a_name_that_does_not_exist",
- FALSE);
+ "a_name_that_does_not_exist");
fail_unless (!result,
"modest_account_mgr_remove_acccount does not return FALSE " \
"when trying to remove an account that does not exist");
- /* Test 8 */
- result = modest_account_mgr_remove_account (account_mgr,
- "a_name_that_does_not_exist",
- TRUE);
- fail_unless (!result,
- "modest_account_mgr_remove_acccount does not return FALSE " \
- "when trying to remove a server account that does not exist");
-
/* Test 9 */
result = modest_account_mgr_remove_account (NULL,
- TEST_MODEST_ACCOUNT_NAME,
- FALSE);
+ TEST_MODEST_ACCOUNT_NAME);
fail_unless (!result,
"modest_account_mgr_remove_acccount does not return " \
"FALSE when passing a NULL ModestAccountMgr");
/* Test 10 */
result = modest_account_mgr_remove_account (account_mgr,
- NULL,
- FALSE);
+ NULL);
fail_unless (!result,
"modest_account_mgr_remove_acccount does not return " \
"FALSE when passing a NULL account name");
#include <modest-account-mgr.h>
#include <modest-mail-operation.h>
+#include <modest-init.h>
static gchar *cachedir=NULL;
static gboolean move=FALSE;
return;
folders = tny_simple_list_new ();
- tny_folder_store_get_folders (store, folders, query, NULL);
+ tny_folder_store_get_folders (store, folders, query, FALSE /*no poke*/, NULL);
iter = tny_list_create_iterator (folders);
while (!tny_iterator_is_done (iter) && (!*folder_src || !*folder_dst))
}
g_option_context_free (context);
+ if (!modest_init (argc, argv)) {
+ return 0;
+ }
+
acc_mgr = modest_runtime_get_account_mgr ();
account_store = modest_runtime_get_account_store();
src_headers = tny_simple_list_new ();
tny_folder_get_headers (folder_src, src_headers, TRUE, NULL);
- mail_op = modest_mail_operation_new ();
+ mail_op = modest_mail_operation_new (NULL);
modest_mail_operation_xfer_folder (mail_op,
folder_src,
- TNY_FOLDER_STORE (folder_dst), move);
+ TNY_FOLDER_STORE (folder_dst), move,
+ NULL, NULL);
g_object_unref (G_OBJECT (src_headers));
g_object_unref (G_OBJECT (mail_op));
*/
#include <check.h>
+#include <modest-defs.h>
#include <modest-conf.h>
#include <string.h>
/* Tests 1, 2, 3, 4 */
for (i = 0; i != sizeof(tests)/sizeof(StringPair); ++i) {
gchar *str = g_strdup (tests[i].original);
- str = modest_text_utils_get_display_address (str);
+ modest_text_utils_get_display_address (str);
fail_unless (str && strcmp(str, tests[i].expected) == 0,
"modest_text_utils_get_display_address failed for '%s': "
"expected '%s' but got '%s'",
START_TEST (test_get_display_address_invalid)
{
/* Test 1 */
- fail_unless (modest_text_utils_get_display_address (NULL) == NULL,
- "modest_text_utils_get_display_address(NULL) should be NULL");
+ modest_text_utils_get_display_address (NULL);
}
END_TEST
for (i = 0; i != sizeof(tests)/sizeof(StringPair); ++i) {
text = g_strdup (tests[i].original);
expected_quoted_text = g_strdup (tests[i].expected);
- quoted_text = modest_text_utils_quote (text, "text/plain", "foo@bar", 0, 15);
+ quoted_text = modest_text_utils_quote (text, "text/plain", NULL /*signature*/,
+ "foo@bar", 0 /* date */, NULL /*attachments*/, 15 /*limit*/);
fail_unless (quoted_text && strcmp(expected_quoted_text, quoted_text)==0,
"modest_text_utils_quote failed:\nOriginal text:\n\"%s\"\n" \
"Expected quotation:\n\"%s\"\nQuoted text:\n\"%s\"",
text = g_strdup ("Quotation test example");
expected_quoted_text =
g_strdup ("On Thu Jan 1 01:00:00 1970, foo@bar wrote:\n> Quotation\n> test\n> example\n> \n");
- quoted_text = modest_text_utils_quote (text, "text/plain", "foo@bar", 0, 1);
+ quoted_text = modest_text_utils_quote (text, "text/plain", NULL /*signature */,
+ "foo@bar", 0 /*date*/, NULL /*attachments*/, 1 /*limit*/);
fail_unless (quoted_text && !strcmp (expected_quoted_text, quoted_text),
"modest_text_utils_quote failed:\nOriginal text:\n\"%s\"\n" \
"Expected quotation:\n\"%s\"\nQuoted text:\n\"%s\"",
/* Test 1 (Fault) */
text = NULL;
- quoted_text = modest_text_utils_quote (NULL, "text/plain", "foo@bar", 0, 15);
+ quoted_text = modest_text_utils_quote (NULL, "text/plain", NULL, "foo@bar", 0, NULL, 15);
fail_unless (quoted_text == NULL,
"modest_text_utils_quote failed:\nOriginal text: NULL\n" \
"Expected quotation: NULL\nQuoted text: \"%s\"",
/* Test 2 (Fault) */
text = g_strdup ("Text");
expected_quoted_text = g_strdup ("On Thu Jan 1 01:00:00 1970, foo@bar wrote:\n> Text\n");
- quoted_text = modest_text_utils_quote (text, NULL, "foo@bar", 0, 15);
+ quoted_text = modest_text_utils_quote (text, NULL, NULL, "foo@bar", 0, NULL, 15);
fail_unless (quoted_text == NULL,
"modest_text_utils_quote failed:\nOriginal text: NULL\n" \
"Expected quotation: NULL\nQuoted text: \"%s\"",
/* Test 3 */
text = g_strdup ("Text");
expected_quoted_text = g_strdup ("On Thu Jan 1 01:00:00 1970, (null) wrote:\n> Text\n");
- quoted_text = modest_text_utils_quote (text, "text/plain", NULL, 0, 15);
+ quoted_text = modest_text_utils_quote (text, "text/plain", NULL, NULL, 0, NULL, 15);
fail_unless (quoted_text == NULL,
"modest_text_utils_quote failed:\nOriginal text: NULL\n" \
"Expected quotation: NULL\nQuoted text: \"%s\"",
/* Test 4 */
text = g_strdup ("This is a text");
expected_quoted_text = g_strdup ("On Thu Jan 1 01:00:00 1970, foo@bar wrote:\n> This\n> is\n> a\n> text\n> \n");
- quoted_text = modest_text_utils_quote (text, "text/plain", "foo@bar", 0, 0);
+ quoted_text = modest_text_utils_quote (text, "text/plain", NULL, "foo@bar", 0, NULL, 0);
fail_unless (quoted_text && !strcmp (expected_quoted_text, quoted_text),
"modest_text_utils_quote failed:\nOriginal text:\n\"%s\"\n" \
"Expected quotation:\n\"%s\"\nQuoted text:\n\"%s\"",
/* Tests 1, 2, 3, 4 */
for (i = 0; i != sizeof(tests)/sizeof(StringPair); ++i) {
- cited_text = modest_text_utils_cite (tests[i].original, "text/plain", "foo@bar", 0);
+ cited_text = modest_text_utils_cite (tests[i].original, "text/plain", NULL, "foo@bar", 0);
fail_unless (cited_text && !strcmp (tests[i].expected, cited_text),
"modest_text_utils_cite failed:\nOriginal text:\n\"%s\"\n" \
"Expected cite:\n\"%s\"\nCite obtained:\n\"%s\"",
/* Test 1 */
text = NULL;
expected_cite = g_strdup ("On Thu Jan 1 01:00:00 1970, foo@bar wrote:\n(null)\n");
- cited_text = modest_text_utils_cite (text, "text/plain", "foo@bar", 0);
+ cited_text = modest_text_utils_cite (text, "text/plain", NULL, "foo@bar", 0);
fail_unless (cited_text && !strcmp (expected_cite, cited_text),
"modest_text_utils_cite failed:\nOriginal text:\nNULL\n" \
"Expected cite:\n\"%s\"\nCite obtained:\n\"%s\"",
/* Test 2 */
text = g_strdup ("This is some text");
expected_cite = g_strdup ("On Thu Jan 1 01:00:00 1970, (null) wrote:\nThis is some text\n");
- cited_text = modest_text_utils_cite (text, "text/plain", NULL, 0);
+ cited_text = modest_text_utils_cite (text, "text/plain", NULL, NULL, 0);
fail_unless (cited_text && !strcmp (expected_cite, cited_text),
"modest_text_utils_cite failed:\nOriginal text:\n\"%s\"\n" \
"Expected cite:\n\"%s\"\nCite obtained:\n\"%s\"",
for (i = 0; i != sizeof(tests)/sizeof(StringPair); ++i) {
inlined_text = modest_text_utils_inline (tests[i].original,
"text/plain",
+ NULL,
"foo@bar",
0,
"bar@foo",
"(null)");
inlined_text = modest_text_utils_inline (NULL,
"text/plain",
+ NULL,
"foo@bar",
0,
"bar@foo",
"Some text");
inlined_text = modest_text_utils_inline (text,
NULL,
+ NULL,
"foo@bar",
0,
"bar@foo",
inlined_text = modest_text_utils_inline (text,
"text/plain",
NULL,
+ NULL,
0,
"bar@foo",
"Any subject");
"Some text");
inlined_text = modest_text_utils_inline (text,
"text/plain",
+ NULL,
"foo@bar",
0,
NULL,
"Some text");
inlined_text = modest_text_utils_inline (text,
"text/plain",
+ NULL,
"foo@bar",
0,
"bar@foo",
g_object_unref (G_OBJECT (accounts));
queue = modest_runtime_get_mail_operation_queue ();
- mail_op = modest_mail_operation_new ();
+ mail_op = modest_mail_operation_new (NULL);
g_signal_connect (G_OBJECT (mail_op), "progress_changed",
G_CALLBACK (on_progress_changed), queue);
- if (modest_mail_operation_update_account (mail_op, account))
- modest_mail_operation_queue_add (queue, mail_op);
+ modest_mail_operation_update_account (mail_op, tny_account_get_name (TNY_ACCOUNT (account)),
+ TRUE, FALSE, NULL, NULL, NULL);
+ modest_mail_operation_queue_add (queue, mail_op);
g_object_unref (G_OBJECT (mail_op));