summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorSunghyun Kwon <sh0701.kwon@samsung.com>2012-12-10 14:59:08 +0900
committerSunghyun Kwon <sh0701.kwon@samsung.com>2012-12-10 14:59:08 +0900
commita9bf821f70945ca9fa19e36f3cb041099584825a (patch)
tree97a217037f2f11fa958bc01754a79dbce085a2ee /utilities
parentcecdd6912622320f0a3a3c0f2bca737e2e245a5c (diff)
downloademail-service-a9bf821f70945ca9fa19e36f3cb041099584825a.tar.gz
email-service-a9bf821f70945ca9fa19e36f3cb041099584825a.tar.bz2
email-service-a9bf821f70945ca9fa19e36f3cb041099584825a.zip
Update tizen source
Diffstat (limited to 'utilities')
-rwxr-xr-xutilities/test-application/testapp-account.c12
-rwxr-xr-xutilities/test-application/testapp-mail.c43
-rwxr-xr-xutilities/test-application/testapp-utility.c1
3 files changed, 54 insertions, 2 deletions
diff --git a/utilities/test-application/testapp-account.c b/utilities/test-application/testapp-account.c
index 915981c..b94116a 100755
--- a/utilities/test-application/testapp-account.c
+++ b/utilities/test-application/testapp-account.c
@@ -261,6 +261,17 @@ gboolean testapp_test_create_account_by_account_type(int account_type,int *accou
account->outgoing_server_need_authentication = 1;
break;
+ case 13: /* Yahoo IMAP ID */
+ account->incoming_server_type = EMAIL_SERVER_TYPE_IMAP4;
+ account->incoming_server_address= strdup("samsung.imap.mail.yahoo.com");
+ account->incoming_server_port_number = 993;
+ account->incoming_server_secure_connection = 1;
+ account->outgoing_server_address = strdup("samsung.smtp.mail.yahoo.com");
+ account->outgoing_server_port_number = 465;
+ account->outgoing_server_secure_connection = 1;
+ account->outgoing_server_need_authentication = 1;
+ break;
+
default:
testapp_print("Invalid Account Number\n");
return FALSE;
@@ -300,6 +311,7 @@ static gboolean testapp_test_create_account()
testapp_print("10. Hotmail\n");
testapp_print("11. Daum (IMAP4)\n");
testapp_print("12. Daum (POP3)\n");
+ testapp_print("13. Yahoo (IMAP ID)\n");
testapp_print("Choose server type: ");
result_from_scanf = scanf("%d",&account_type);
diff --git a/utilities/test-application/testapp-mail.c b/utilities/test-application/testapp-mail.c
index 78db88d..3b88911 100755
--- a/utilities/test-application/testapp-mail.c
+++ b/utilities/test-application/testapp-mail.c
@@ -1032,6 +1032,41 @@ static gboolean testapp_test_count ()
return 0;
}
+static gboolean testapp_test_move_mails_to_mailbox_of_another_account()
+{
+ int err = EMAIL_ERROR_NONE;
+ int mail_id_count = 0 ;
+ int *mail_id_array = NULL;
+ int source_mailbox_id = 0;
+ int target_mailbox_id = 0;
+ int task_id = 0;
+ int i = 0;
+ int result_from_scanf = 0;
+
+ testapp_print("\n > Enter source mailbox id: ");
+ result_from_scanf = scanf("%d", &source_mailbox_id);
+
+ testapp_print("\n > Enter target mailbox id: ");
+ result_from_scanf = scanf("%d", &target_mailbox_id);
+
+ testapp_print("\n > Enter mail count: ");
+ result_from_scanf = scanf("%d", &mail_id_count);
+
+ if(mail_id_count > 0) {
+ mail_id_array = malloc(sizeof(int) * mail_id_count);
+ }
+
+ for(i = 0; i < mail_id_count; i++) {
+ testapp_print("\n > Enter mail id: ");
+ result_from_scanf = scanf("%d", (mail_id_array + i));
+ }
+
+ err = email_move_mails_to_mailbox_of_another_account(source_mailbox_id, mail_id_array, mail_id_count, target_mailbox_id, &task_id);
+
+ testapp_print("\nemail_move_mails_to_mailbox_of_another_account returns [%d], tast_id [%d] \n", err, task_id);
+ return 0;
+}
+
static gboolean testapp_test_set_flags_field ()
{
int account_id = 0;
@@ -1446,6 +1481,7 @@ static gboolean testapp_test_search_mail_on_server()
email_search_filter_type search_filter_type = 0;
email_search_filter_t search_filter;
int handle = 0;
+ time_t current_time = 0;
char search_key_value_string[MAX_EMAIL_ADDRESS_LENGTH];
testapp_print("input account id : ");
@@ -1511,10 +1547,10 @@ static gboolean testapp_test_search_mail_on_server()
case EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_BEFORE :
case EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_ON :
case EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_SINCE :
- testapp_print("input search filter key value (format = YYYYMMDDHHMMSS) : ");
- result_from_scanf = scanf("%s", search_key_value_string);
+ time(&current_time);
/* TODO : write codes for converting string to time */
/* search_filter.search_filter_key_value.time_type_key_value = search_key_value_string; */
+ search_filter.search_filter_key_value.time_type_key_value = current_time;
break;
default :
testapp_print("Invalid filter type [%d]", search_filter_type);
@@ -1823,6 +1859,9 @@ static gboolean testapp_test_interpret_command (int menu_number)
case 9:
testapp_test_count();
break;
+ case 10:
+ testapp_test_move_mails_to_mailbox_of_another_account();
+ break;
case 14:
testapp_test_delete();
break;
diff --git a/utilities/test-application/testapp-utility.c b/utilities/test-application/testapp-utility.c
index 7783f55..dc3a39e 100755
--- a/utilities/test-application/testapp-utility.c
+++ b/utilities/test-application/testapp-utility.c
@@ -98,6 +98,7 @@ void testapp_show_menu (eEMAIL_MENU menu)
testapp_print ("7. Send read receipt\n");
testapp_print ("8. Delete attachment\n");
testapp_print ("9. Mail Count \n");
+ testapp_print ("10. Move mails to another account\n");
testapp_print ("14. Delete a mail \n");
testapp_print ("16. Download mail body\n");
testapp_print ("17. Download an attachment\n");