X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-local-folder-info.c;h=f0668095192a06cbebe042fa6bb2852ccfcbf646;hp=c1956b41dbf39fd8e916713de81537523a89e5f2;hb=96d9a8c787c693406a0f26e3d3a00065c7236fe5;hpb=88e39d1da468c96136518441377fe454867dbe26 diff --git a/src/modest-local-folder-info.c b/src/modest-local-folder-info.c index c1956b4..f066809 100644 --- a/src/modest-local-folder-info.c +++ b/src/modest-local-folder-info.c @@ -30,6 +30,7 @@ #include #include /* strcmp */ #include +#include typedef struct { TnyFolderType type; @@ -48,8 +49,10 @@ const ModestLocalFolder ModestLocalFolderMap[] = { { TNY_FOLDER_TYPE_ROOT, "", N_("")}, { TNY_FOLDER_TYPE_NOTES, "notes", N_("Notes")}, { TNY_FOLDER_TYPE_DRAFTS, "drafts", N_("mcen_me_folder_drafts")}, - { TNY_FOLDER_TYPE_OUTBOX, "contacts", N_("Contacts")}, +/* TODO: Do we want these? If so, they need a type ID: + * { TNY_FOLDER_TYPE_OUTBOX, "contacts", N_("Contacts")}, { TNY_FOLDER_TYPE_OUTBOX, "calendar", N_("Calendar")}, +*/ { TNY_FOLDER_TYPE_ARCHIVE, "archive", N_("Archive")} }; @@ -110,3 +113,29 @@ modest_local_folder_info_get_maildir_path (void) NULL); } +gchar *modest_per_account_local_outbox_folder_info_get_maildir_path (TnyAccount *account) +{ + /* This directory should contain an "outbox" child directory: */ + return g_build_filename (g_get_home_dir(), + MODEST_DIR, + MODEST_PER_ACCOUNT_LOCAL_OUTBOX_FOLDERS_MAILDIR, + tny_account_get_id (account), + NULL); +} + +gchar *modest_per_account_local_outbox_folder_info_get_maildir_path_to_outbox_folder (TnyAccount *account) +{ + gchar *path_to_account_folder = + modest_per_account_local_outbox_folder_info_get_maildir_path(account); + if (!path_to_account_folder) + return NULL; + + gchar *path = g_build_filename (path_to_account_folder, "outbox", NULL); + + g_free (path_to_account_folder); + + return path; +} + + +