#include <sys/time.h>
#include <glib.h>
#include <glib/gstdio.h>
+#include <tzplatform_config.h>
#include "email-internal-types.h"
#include "email-utilities.h"
#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;
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();
#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;
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;
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) {
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;
#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 */
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);
}
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);
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) {