summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintae, jeon <intae.jeon@samsung.com>2016-03-07 16:36:18 +0900
committerintae, jeon <intae.jeon@samsung.com>2016-03-07 16:36:18 +0900
commit21984c03f5d7b624c4042dcfec1c5058eaf61430 (patch)
treeeae1edc404cdc17cb770fdef3c4035030c7162d0
parent8d3bff6f3705eb0aaddb500331278bca8b097761 (diff)
downloademail-service-21984c03f5d7b624c4042dcfec1c5058eaf61430.tar.gz
email-service-21984c03f5d7b624c4042dcfec1c5058eaf61430.tar.bz2
email-service-21984c03f5d7b624c4042dcfec1c5058eaf61430.zip
removed hard code path for multi user
Signed-off-by: intae, jeon <intae.jeon@samsung.com>
-rwxr-xr-xemail-core/email-core-gmime.c4
-rwxr-xr-xemail-core/email-core-utils.c12
-rwxr-xr-xutilities/test-application/testapp-account.c6
-rwxr-xr-xutilities/test-application/testapp-mail.c2
4 files changed, 14 insertions, 10 deletions
diff --git a/email-core/email-core-gmime.c b/email-core/email-core-gmime.c
index be4a739..d44a263 100755
--- a/email-core/email-core-gmime.c
+++ b/email-core/email-core-gmime.c
@@ -32,6 +32,7 @@
#include <sys/time.h>
#include <glib.h>
#include <glib/gstdio.h>
+#include <tzplatform_config.h>
#include "email-internal-types.h"
#include "email-utilities.h"
@@ -46,6 +47,7 @@
#include "email-core-signal.h"
#include "email-core-mailbox-sync.h"
#include "email-debug-log.h"
+#include "email-types.h"
static int multipart_status = 0;
@@ -64,7 +66,7 @@ INTERNAL_FUNC void emcore_gmime_init(void)
g_mime_init(0);
#ifdef __FEATURE_SECURE_PGP__
- setenv("GNUPGHOME", "/opt/usr/apps/org.tizen.email/data/.gnupg", 1);
+ setenv("GNUPGHOME", tzplatform_mkpath(TZ_SYS_RW_APP ,"org.tizen.email/data/.gnupg"), 1);
#endif
EM_DEBUG_FUNC_END();
diff --git a/email-core/email-core-utils.c b/email-core/email-core-utils.c
index 737d662..4d80815 100755
--- a/email-core/email-core-utils.c
+++ b/email-core/email-core-utils.c
@@ -103,10 +103,10 @@
#define EMAIL_CH_SQUARE_BRACKET_S '['
#define EMAIL_CH_SQUARE_BRACKET_E ']'
#define EMAIL_CH_SPACE ' '
-#define EMAIL_NOTI_ICON_PATH "/usr/apps/org.tizen.quickpanel/shared/res/noti_icons/E-mail/noti_email.png"
-#define EMAIL_NOTI_INDICATOR_ICON_PATH "/usr/apps/org.tizen.indicator/res/icons/Event/B03_Event_email.png"
+#define EMAIL_NOTI_ICON_PATH tzplatform_mkpath(TZ_SYS_RO_APP, "org.tizen.quickpanel/shared/res/noti_icons/E-mail/noti_email.png")
+#define EMAIL_NOTI_INDICATOR_ICON_PATH tzplatform_mkpath(TZ_SYS_RO_APP, "org.tizen.indicator/res/icons/Event/B03_Event_email.png")
#define EMAIL_NOTI_MAX_MAIL_ID 100
-
+//#define TEST TZ_SYS_RO_APPS
typedef struct _em_transaction_info_type_t {
int mail_id;
@@ -1458,7 +1458,7 @@ INTERNAL_FUNC int emcore_add_notification(char *multi_user_name, int account_id,
goto FINISH_OFF;
}
- if ((noti_err = notification_set_text_domain(noti, NATIVE_EMAIL_DOMAIN, "/usr/apps/org.tizen.email/res/locale")) != NOTIFICATION_ERROR_NONE) {
+ if ((noti_err = notification_set_text_domain(noti, NATIVE_EMAIL_DOMAIN, tzplatform_mkpath(TZ_SYS_RO_APP,"org.tizen.email/res/locale"))) != NOTIFICATION_ERROR_NONE) {
EM_DEBUG_EXCEPTION("notification_set_text_domain failed [%d]", noti_err);
err = EMAIL_ERROR_SYSTEM_FAILURE;
goto FINISH_OFF;
@@ -1724,7 +1724,7 @@ INTERNAL_FUNC int emcore_add_notification_for_send(char *multi_user_name, int ac
textdomain("sys_string");
*/
setlocale(LC_MESSAGES, vconf_get_str(VCONFKEY_LANGSET));
- bindtextdomain(NATIVE_EMAIL_DOMAIN, "/usr/apps/org.tizen.email/res/locale");
+ bindtextdomain(NATIVE_EMAIL_DOMAIN, tzplatform_mkpath(TZ_SYS_RO_APP,"org.tizen.email/res/localea"));
textdomain(NATIVE_EMAIL_DOMAIN);
switch (sending_error) {
@@ -1845,7 +1845,7 @@ INTERNAL_FUNC int emcore_add_notification_for_send(char *multi_user_name, int ac
case EMAIL_ACTION_SENDING_MAIL:
- if ((noti_err = notification_set_text_domain(noti, NATIVE_EMAIL_DOMAIN, "/usr/apps/org.tizen.email/res/locale")) != NOTIFICATION_ERROR_NONE) {
+ if ((noti_err = notification_set_text_domain(noti, NATIVE_EMAIL_DOMAIN, tzplatform_mkpath(TZ_SYS_RO_APP,"org.tizen.email/res/locale"))) != NOTIFICATION_ERROR_NONE) {
EM_DEBUG_EXCEPTION("notification_set_text_domain failed [%d]", noti_err);
err = EMAIL_ERROR_NOTI;
goto FINISH_OFF;
diff --git a/utilities/test-application/testapp-account.c b/utilities/test-application/testapp-account.c
index 84cb27d..5cb81d5 100755
--- a/utilities/test-application/testapp-account.c
+++ b/utilities/test-application/testapp-account.c
@@ -31,12 +31,14 @@
#include "email-api-smime.h"
#include "email-api-account.h"
#include "email-api-network.h"
+#include "email-types.h"
/* internal header */
#include "testapp-utility.h"
#include "testapp-account.h"
#include <sys/time.h>
#include <sys/times.h>
+#include <tzplatform_config.h>
/* internal defines */
@@ -770,7 +772,7 @@ FINISH_OFF:
static gboolean testapp_test_backup_account()
{
- char *file_name = "/opt/usr/data/email/accounts_file";
+ char *file_name = tzplatform_mkpath(TZ_SYS_DATA, "email/accounts_file");
int error_code;
error_code = email_backup_accounts_into_secure_storage(file_name);
testapp_print("\n email_backup_accounts_into_secure_storage returned [%d]\n", error_code);
@@ -778,7 +780,7 @@ static gboolean testapp_test_backup_account()
}
static gboolean testapp_test_restore_account()
{
- char *file_name = "/opt/usr/data/email/accounts_file";
+ char *file_name = tzplatform_mkpath(TZ_SYS_DATA,"email/accounts_file");
int error_code;
error_code = email_restore_accounts_from_secure_storage(file_name);
testapp_print("\n email_restore_accounts_from_secure_storage returned [%d]\n", error_code);
diff --git a/utilities/test-application/testapp-mail.c b/utilities/test-application/testapp-mail.c
index 01a50be..c9ccf68 100755
--- a/utilities/test-application/testapp-mail.c
+++ b/utilities/test-application/testapp-mail.c
@@ -2389,7 +2389,7 @@ static gboolean testapp_test_email_write_mime_file()
return false;
}
- snprintf(file_path, 512, "/opt/usr/data/email/.email_data/tmp/%d_%8d.eml", mail_id, (int)time(NULL));
+ snprintf(file_path, 512, tzplatform_mkpath(TZ_SYS_DATA,"email/.email_data/tmp/%d_%8d.eml"), mail_id, (int)time(NULL));
err = email_write_mime_file(mail_data, mail_attachment_data, attachment_count, &file_path);
if (err != EMAIL_ERROR_NONE) {