SET(LIBDIR "${PREFIX}/lib")
SET(DATADIR "${PREFIX}/data")
SET(LOCALEDIR "${RESDIR}/locale")
-SET(ICONDIR "/opt/share/icons/default/small")
SET(EDJDIR "${RESDIR}/edje")
SET(IMGDIR "${RESDIR}/images")
SET(JSDIR "${RESDIR}/js")
-SET(UGDIR "/opt/ug/lib")
+SET(SHAREDIR "/usr/share")
+SET(ICONDIR "${SHAREDIR}/icons/default/small")
+SET(UGDIR "/usr/ug/lib")
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
ADD_DEFINITIONS("-DIMGDIR=\"${IMGDIR}\"")
ADD_DEFINITIONS("-DJSDIR=\"${JSDIR}\"")
+ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
# Add your submodule directory name
ADD_SUBDIRECTORY(common)
#define MAX_PATH_LEN 1024
#define MAX_URL_LEN 1024
#define MAX_RECPT_LEN (MAX_STR_LEN * 8 + 1)
+#define MIN_FREE_SPACE (5) /* 5MB */
-#define DIR_DEFAULT_MEDIA_PHONE "/opt/media"
+#define DIR_TMP_PREFIX "/tmp"
+#define DIR_DEFAULT_MEDIA_PHONE "/opt/usr/media"
+#define DIR_DEFAULT_MEDIA_MMC "/opt/storage/sdcard"
+#define DIR_DEFAULT_EMAIL_STORAGE "/opt/usr/data"
/* define bundle key */
#define EMAIL_BUNDLE_KEY_ACCOUNT_ID "ACCOUNT_ID"
#define PKGNAME "org.tizen.email"
#endif
-#ifndef LOCALEDIR
-#define LOCALEDIR "/opt/apps/org.tizen.email/res/locale"
+/*#ifndef LOCALEDIR
+#define LOCALEDIR "/usr/apps/org.tizen.email/res/locale"
#endif
#ifndef EDJDIR
-#define EDJDIR "/opt/apps/org.tizen.email/res/edje"
+#define EDJDIR "/usr/apps/org.tizen.email/res/edje"
#endif
#ifndef IMGDIR
-#define IMGDIR "/opt/apps/org.tizen.email/res/images"
+#define IMGDIR "/usr/apps/org.tizen.email/res/images"
#endif
#ifndef DATADIR
-#define DATADIR "/opt/apps/org.tizen.email/data"
-#endif
+#define DATADIR "/usr/apps/org.tizen.email/data"
+#endif*/
#undef _
#undef N_
#if _USE_LOG_FILE_ == 1
static void _save_log(const gchar *message)
{
-#define LOG_PATH "/tmp/email.log"
+#define LOG_PATH DIR_TMP_PREFIX"/email.log"
if (!_g_log_init) {
if (g_file_test(LOG_PATH, G_FILE_TEST_EXISTS)) {
time_t now = time(NULL);
struct tm *t = localtime(&now);
- gchar buff_path[MAX_STR_LEN] = "\0";
+ gchar buff_path[MAX_PATH_LEN] = "\0";
- g_sprintf(buff_path, "%s/%04d.%02d.%02d[%02dH.%02dM].html", DIR_SRV_PREFIX, t->tm_year + 1900, t->tm_mon, t->tm_mday, t->tm_hour, t->tm_min);
+ g_sprintf(buff_path, "%s/%04d.%02d.%02d[%02dH.%02dM].html", DIR_TMP_PREFIX, t->tm_year + 1900, t->tm_mon, t->tm_mday, t->tm_hour, t->tm_min);
debug_log("path [%s]", buff_path);
#include "email-debug.h"
-#define MYFILE_IMGE_PATH "/opt/apps/org.tizen.myfile/res/images"
-#define UG_MYFILE_PATH "/opt/media/"
+#define MYFILE_IMGE_PATH "/usr/apps/org.tizen.myfile/res/images"
+#define UG_MYFILE_PATH DIR_DEFAULT_MEDIA_PHONE
#define COMPOSER_EDJ_NAME EDJDIR"/email-composer-view.edj"
-#define EMAIL_TMP_FOLDER "/tmp/email/"
+#define EMAIL_TMP_FOLDER DIR_TMP_PREFIX"/email"
#define EMAIL_TMP_FOLDER_PERMISSION 0755
#define SAVE_HTML_FILE_NAME "mail.html"
-#define SAVE_URI EMAIL_TMP_FOLDER"mail.txt"
+#define SAVE_URI EMAIL_TMP_FOLDER"/mail.txt"
#define THUMBNAIL_SIZE 80
#define COMPOSER_ORINGIN_HTML_STR N_("Original mail.htm")
COMPOSER_ERROR_DBUS_FAIL = -15,
COMPOSER_ERROR_RECIPIENT_DUPLICATED = -16,
COMPOSER_ERROR_ENGINE_INIT_FAILED = -17,
+ COMPOSER_ERROR_STORAGE_FULL = -18,
} COMPOSER_ERROR_TYPE_E;
typedef enum {
char *file_ext = NULL;
email_parse_get_filename_n_ext_from_path(source, &file_name, &file_ext);
- snprintf(filename, sizeof(filename), "%s%s%s%s", DATADIR"/", file_name, file_ext, ".jpg");
+ snprintf(filename, sizeof(filename), "%s%s%s%s", EMAIL_TMP_FOLDER"/", file_name, file_ext, ".jpg");
g_free(file_name);
g_free(file_ext);
debug_log("attachment_data_list[%d].attachment_path :%s", i, ugd->existing_mail_info->attachment_list[i].attachment_path);
temp_save_name = g_strdup(ugd->existing_mail_info->attachment_list[i].attachment_path);
inline_image_name = email_composer_parse_filepath(temp_save_name, EINA_FALSE);
- softlink_path = g_strconcat(EMAIL_TMP_FOLDER, inline_image_name, NULL);
+ softlink_path = g_strconcat(EMAIL_TMP_FOLDER, "/", inline_image_name, NULL);
g_free(inline_image_name);
if (softlink_path)
}
ugd->has_body_html = EINA_TRUE;
- ugd->saved_html_path = g_strconcat(EMAIL_TMP_FOLDER, SAVE_HTML_FILE_NAME, NULL);
+ ugd->saved_html_path = g_strconcat(EMAIL_TMP_FOLDER, "/", SAVE_HTML_FILE_NAME, NULL);
if (ugd->composer_type == RUN_COMPOSER_EDIT || ugd->composer_type == RUN_COMPOSER_REPLY || ugd->composer_type == RUN_COMPOSER_REPLY_ALL || ugd->composer_type == RUN_COMPOSER_FORWARD) {
if (email_get_mail_data(ugd->nExistingMailID, &ugd->existing_mail_info->mail_data) != EMAIL_ERROR_NONE) {
debug_log("%s", dir_entry->d_name);
if (g_strcmp0(".", dir_entry->d_name) == 0 || g_strcmp0("..", dir_entry->d_name) == 0)
continue;
- snprintf(buffer, 256, "%s%s", EMAIL_TMP_FOLDER, dir_entry->d_name);
+ snprintf(buffer, 256, "%s/%s", EMAIL_TMP_FOLDER, dir_entry->d_name);
remove(buffer);
}
closedir(dir);
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
-# install xml file & icon
-INSTALL(FILES ${CMAKE_EMAIL_BINARY_DIR}/${PKGNAME}.xml DESTINATION /opt/share/packages)
-INSTALL(FILES ${CMAKE_EMAIL_BINARY_DIR}/${PKGNAME}.account.xml DESTINATION /opt/share/account)
-INSTALL(FILES ${CMAKE_EMAIL_SOURCE_DIR}/${PKGNAME}.png DESTINATION ${ICONDIR})
-INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/images DESTINATION ${RESDIR} FILES_MATCHING PATTERN "*.png")
+# install manifest file
+INSTALL(FILES ${CMAKE_EMAIL_BINARY_DIR}/${PKGNAME}.xml DESTINATION ${SHAREDIR}/packages)
+
+#install account xml
+INSTALL(FILES ${CMAKE_EMAIL_BINARY_DIR}/${PKGNAME}.account.xml DESTINATION /opt/usr/share/account)
# install ini file
-INSTALL(FILES ${CMAKE_EMAIL_SOURCE_DIR}/${PROJECT_NAME}.ini DESTINATION /usr/share/process-info)
+INSTALL(FILES ${CMAKE_EMAIL_SOURCE_DIR}/${PROJECT_NAME}.ini DESTINATION ${SHAREDIR}/process-info)
+# install license file
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${SHAREDIR}/license/${PKGNAME})
+
+# install image files
+INSTALL(FILES ${CMAKE_EMAIL_SOURCE_DIR}/${PKGNAME}.png DESTINATION ${ICONDIR})
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/images DESTINATION ${RESDIR} FILES_MATCHING PATTERN "*.png")
\ No newline at end of file
-<account multiple="true" icon_path="/opt/apps/com.samsung.email/res/images/com.samsung.email.png">
+<account multiple="true" icon_path="/usr/apps/org.tizen.email/res/images/org.tizen.email.png">
<capability>http://tizen.org/account/capability/email</capability>
</account>
<label>Email</label>
<author email="minnsoo.kim@samsung.com" href="www.samsung.com">Minsoo Kim</author>
<description>Email Application</description>
- <ui-application appid="org.tizen.email" exec="/opt/apps/org.tizen.email/bin/email" nodisplay="false" taskmanage="true" multiple="false" type = "capp">
+ <ui-application appid="org.tizen.email" exec="/usr/apps/org.tizen.email/bin/email" nodisplay="false" taskmanage="true" multiple="false" type = "capp">
<label>Email</label>
<icon>org.tizen.email.png</icon>
<label xml:lang="en-us">Email</label>
<uri name="mailto"/>
</application-service>
</ui-application>
- <ui-application appid="email-composer-efl" exec="/opt/ug/bin/email-composer-efl" nodisplay="true" multiple="true" type="capp" taskmanage="false">
+ <ui-application appid="email-composer-efl" exec="/usr/ug/bin/email-composer-efl" nodisplay="true" multiple="true" type="capp" taskmanage="false">
<label>Email composer</label>
<application-service>
<mime name="*/*"/>
--- /dev/null
+<manifest>
+ <define>
+ <domain name="org.tizen.email" />
+ </define>
+ <assign>
+ <filesystem path="/usr/ug/lib/libug-email-composer-efl.so" label="_" />
+ <filesystem path="/usr/ug/lib/libug-email-viewer-efl.so" label="_" />
+ <filesystem path="/usr/ug/lib/libug-email-account-efl.so" label="_" />
+ <filesystem path="/usr/ug/lib/libug-email-mailbox-efl.so" label="_" />
+ <filesystem path="/usr/ug/lib/libug-email-setting-efl.so" label="_" />
+ <filesystem path="/usr/apps/org.tizen.email/lib/libemail-common.so" label="_" />
+ <filesystem path="/usr/share/packages/org.tizen.email.xml" label="_" />
+ <filesystem path="/usr/share/icons/default/small/org.tizen.email.png" label="_" />
+ <filesystem path="/usr/apps/org.tizen.email/data/_email_default.html" label="org.tizen.email" type="transmutable" />
+ </assign>
+ <request>
+ <domain name="org.tizen.email" />
+ </request>
+</manifest>
-%define _optdir /opt
-%define _appdir %{_optdir}/apps
-%define _ugdir %{_optdir}/ug
-%define _libdir %{_appdir}/org.tizen.email/lib
-
Name: org.tizen.email
Summary: email application
-Version: 0.0.7
+Version: 0.0.8
Release: 1
Group: devel
License: Flora
Source0: %{name}-%{version}.tar.gz
Requires(post): /usr/bin/vconftool
BuildRequires: cmake
-BuildRequires: libug-contacts-devel
-BuildRequires: libicu-devel
BuildRequires: edje-tools
BuildRequires: embryo-bin
BuildRequires: gettext-tools
+BuildRequires: libug-contacts-devel
+BuildRequires: pkgconfig(icu-i18n)
BuildRequires: pkgconfig(appcore-common)
BuildRequires: pkgconfig(appcore-efl)
BuildRequires: pkgconfig(email-service)
%build
+%define _usrdir /usr
+%define _ugdir %{_usrdir}/ug
+%define _appdir %{_usrdir}/apps
+%define _pkgdir %{_appdir}/%{name}
+%define _libdir %{_pkgdir}/lib
+%define _sharedir %{_usrdir}/share
+
export CFLAGS="${CFLAGS} -fPIC -Wall -g"
export CXXFLAGS="${CXXFLAGS} -fPIC -Wall -g"
export LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,-zdefs"
-cmake . -DCMAKE_INSTALL_PREFIX=%{_appdir}/org.tizen.email
+cmake . -DCMAKE_INSTALL_PREFIX=%{_pkgdir}
#make %{?jobs:-j%jobs}
make
%install
rm -rf %{buildroot}
+mkdir -p %{buildroot}/usr/share/license
+
%make_install
/usr/bin/vconftool set -t int file/private/org.tizen.email/hotmail_receiving_port "995" -g 6514
/usr/bin/vconftool set -t int file/private/org.tizen.email/hotmail_receiving_ssl "1" -g 6514
-chown -R 5000:5000 /opt/apps/org.tizen.email/data
+chown -R 5000:5000 %{_pkgdir}/data
-mkdir -p /opt/ug/bin/
-ln -sf /usr/bin/ug-client /opt/ug/bin/email-composer-efl
+mkdir -p %{_ugdir}/bin/
+ln -sf /usr/bin/ug-client %{_ugdir}/bin/email-composer-efl
%files
+%manifest org.tizen.email.manifest
%defattr(-,root,root,-)
-%exclude %{_datadir}/process-info/email.ini
-%{_appdir}/org.tizen.email/lib/libemail-common.so
+%exclude %{_sharedir}/process-info/email.ini
+%{_libdir}/libemail-common.so
%{_ugdir}/lib/libug-email-composer-efl.so
%{_ugdir}/lib/libug-email-viewer-efl.so
%{_ugdir}/lib/libug-email-account-efl.so
%{_ugdir}/lib/libug-email-mailbox-efl.so
%{_ugdir}/lib/libug-email-setting-efl.so
-%{_appdir}/org.tizen.email/res/edje/email-viewer-theme.edj
-%{_appdir}/org.tizen.email/res/edje/email-setting-theme.edj
-%{_appdir}/org.tizen.email/res/edje/email-account-theme.edj
-%{_appdir}/org.tizen.email/res/edje/email-effect-layout.edj
-%{_appdir}/org.tizen.email/res/edje/email-composer-view.edj
-%{_appdir}/org.tizen.email/res/edje/email-mailbox-theme.edj
-%{_appdir}/org.tizen.email/res/locale/*/LC_MESSAGES/*
-%{_appdir}/org.tizen.email/res/images/*
-%{_appdir}/org.tizen.email/bin/email
-%{_appdir}/org.tizen.email/data/_email_default.html
-%{_appdir}/org.tizen.email/data/sp_list.xml
-%{_optdir}/share/packages/org.tizen.email.xml
-%{_optdir}/share/account/org.tizen.email.account.xml
-%{_optdir}/share/icons/default/small/org.tizen.email.png
+%{_pkgdir}/res/edje/email-viewer-theme.edj
+%{_pkgdir}/res/edje/email-setting-theme.edj
+%{_pkgdir}/res/edje/email-account-theme.edj
+%{_pkgdir}/res/edje/email-effect-layout.edj
+%{_pkgdir}/res/edje/email-composer-view.edj
+%{_pkgdir}/res/edje/email-mailbox-theme.edj
+%{_pkgdir}/res/locale/*/LC_MESSAGES/*
+%{_pkgdir}/res/images/*
+%{_pkgdir}/bin/email
+%{_pkgdir}/data/_email_default.html
+%{_pkgdir}/data/sp_list.xml
+%{_sharedir}/packages/org.tizen.email.xml
+/opt/usr/share/account/org.tizen.email.account.xml
+%{_sharedir}/icons/default/small/org.tizen.email.png
+%{_sharedir}/license/%{name}/LICENSE
<id>1</id>\r
<name>Google</name>\r
<name_str_id>IDS_COM_BODY_GOOGLE</name_str_id>\r
- <icon>/opt/share/icons/default/small/M02_email_list_icon_gmail.png</icon>\r
+ <icon>/usr/apps/org.tizen.email/res/images/M02_email_list_icon_gmail.png</icon>\r
<sending_address>smtp.gmail.com</sending_address>\r
<sending_port>465</sending_port>\r
<sending_security>0</sending_security>\r
<id>2</id>\r
<name>AOL</name>\r
<name_str_id>IDS_EMAIL_BODY_AOL</name_str_id>\r
- <icon>/opt/share/icons/default/small/M02_email_list_icon_AOL.png</icon>\r
+ <icon>/usr/apps/org.tizen.email/res/images/M02_email_list_icon_AOL.png</icon>\r
<sending_address>smtp.aol.com</sending_address>\r
<sending_port>465</sending_port>\r
<sending_security>1</sending_security>\r
<id>3</id>\r
<name>Windows Live Hotmail</name>\r
<name_str_id>IDS_EMAIL_BODY_WINDOW_LIVE_HOTMAIL</name_str_id>\r
- <icon>/opt/share/icons/default/small/M02_email_list_icon_hotmail.png</icon>\r
+ <icon>/usr/apps/org.tizen.email/res/images/M02_email_list_icon_hotmail.png</icon>\r
<sending_address>smtp.live.com</sending_address>\r
<sending_port>587</sending_port>\r
<sending_security>2</sending_security>\r
<id>4</id>\r
<name>Yahoo</name>\r
<name_str_id>IDS_EMAIL_BODY_YAHOO_E_MAIL</name_str_id>\r
- <icon>/opt/share/icons/default/small/M02_email_list_icon_YahooMail.png</icon>\r
+ <icon>/usr/apps/org.tizen.email/res/images/M02_email_list_icon_YahooMail.png</icon>\r
<sending_address>smtp.mail.yahoo.co.kr</sending_address>\r
<sending_port>465</sending_port>\r
<sending_security>1</sending_security>\r
#include "email-viewer.h"
-#define EMAIL_TMP_FILE_PATH DATADIR"/_email.tmp"
+#define EMAIL_TMP_FILE_PATH DIR_TMP_PREFIX"/_email.tmp"
Evas_Object *viewer_get_webview(EmailViewerUGD *ug_data, gboolean has_html);
void viewer_set_webview_content(EmailViewerUGD *ug_data, int reload);
#include "email-engine.h"
#include "email-debug.h"
-#define MYFILE_IMGE_PATH "/opt/apps/com.samsung.myfile/res/images"
+#define MYFILE_IMGE_PATH "/usr/apps/org.tizen.myfile/res/images"
#define MB_SVC_FILE_PATH_LEN_MAX 255
static void _thumbnail_generated_cb(void *data, Ethumb *e, Eina_Bool success);
ethumb_thumb_aspect_set(e, ETHUMB_THUMB_KEEP_ASPECT);
ethumb_thumb_size_set(e, 40, 40);
ethumb_thumb_category_set(e, "thumbnails");
- ethumb_thumb_dir_path_set(e, DATADIR);
+ ethumb_thumb_dir_path_set(e, DIR_TMP_PREFIX);
ethumb_file_set(e, path, NULL);
const char *thumb_path_tmp = NULL;
char *file_ext = NULL;
email_parse_get_filename_n_ext_from_path(path, &file_name, &file_ext);
- snprintf(filename, sizeof(filename), "%s%s%s%s", DATADIR"/", file_name, file_ext, ".jpg");
+ snprintf(filename, sizeof(filename), "%s%s%s%s", DIR_TMP_PREFIX"/", file_name, file_ext, ".jpg");
g_free(file_name);
g_free(file_ext);
ug_data->webview_data = NULL;
}
+ if (ecore_file_exists(DIR_TMP_PREFIX"/mail.txt"))
+ ecore_file_remove(DIR_TMP_PREFIX"/mail.txt");
+
debug_log("free address info list");
email_free_address_info_list(&(priv->addrs_info_list));
ug_data->from_list = NULL;
evas_object_hide(ug_data->noc_bx);
evas_object_hide(ug_data->dn_btn);
+ if (ecore_file_exists(EMAIL_TMP_FILE_PATH ".html"))
+ ecore_file_remove(EMAIL_TMP_FILE_PATH ".html");
+
+ if (ecore_file_exists(DIR_TMP_PREFIX"/mail.txt"))
+ ecore_file_remove(DIR_TMP_PREFIX"/mail.txt");
+
ewk_view_uri_set(ug_data->webview, EMAIL_DEFAULT_HTML);
debug_log("free address info list");