4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
33 #include "email-api-account.h"
34 #include "email-api-mail.h"
37 #include "testapp-utility.h"
38 #include "testapp-thread.h"
40 static gboolean testapp_test_move_thread()
42 int thread_id, move_always_flag;
43 char target_mailbox_name[512];
46 testapp_print("\n > Enter thread_id: ");
47 scanf("%d", &thread_id);
49 testapp_print("\n > Enter target_mailbox_name: ");
50 scanf("%s", target_mailbox_name);
52 testapp_print("\n > Enter move_always_flag: ");
53 scanf("%d", &move_always_flag);
55 result = email_move_thread_to_mailbox(thread_id, target_mailbox_name, move_always_flag);
60 static gboolean testapp_test_delete_thread()
62 int thread_id, delete_always_flag;
65 testapp_print("\n > Enter thread_id: ");
66 scanf("%d", &thread_id);
68 testapp_print("\n > Enter delete_always_flag: ");
69 scanf("%d", &delete_always_flag);
71 result = email_delete_thread(thread_id, delete_always_flag);
76 static gboolean testapp_test_set_seen_flag_of_thread()
78 int thread_id, seen_flag, on_server;
81 testapp_print("\n > Enter thread_id: ");
82 scanf("%d", &thread_id);
84 testapp_print("\n > Enter seen_flag: ");
85 scanf("%d", &seen_flag);
87 testapp_print("\n > Enter on_server: ");
88 scanf("%d", &on_server);
90 result = email_modify_seen_flag_of_thread(thread_id, seen_flag, on_server);
95 static gboolean testapp_test_interpret_command (int menu_number)
97 gboolean go_to_loop = TRUE;
99 switch (menu_number) {
101 testapp_test_move_thread();
105 testapp_test_delete_thread();
109 testapp_test_set_seen_flag_of_thread();
122 void testapp_thread_main()
124 gboolean go_to_loop = TRUE;
128 testapp_show_menu (EMF_THREAD_MENU);
129 testapp_show_prompt (EMF_THREAD_MENU);
131 scanf ("%d", &menu_number);
133 go_to_loop = testapp_test_interpret_command (menu_number);