4 * Copyright (c) 2012 - 2013 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.
30 #include <glib/gprintf.h>
33 #include "testapp-utility.h"
35 /* internal data struct */
37 void testapp_print (char *fmt, ...)
41 vfprintf (stdout, fmt, args);
46 void testapp_show_menu (eEMAIL_MENU menu)
50 testapp_print ("==========================================\n");
51 testapp_print (" Email test application \n");
52 testapp_print ("==========================================\n");
53 testapp_print ("1. Account Test\n");
54 testapp_print ("2. Mail Test\n");
55 testapp_print ("3. Mailbox Test\n");
56 testapp_print ("5. Rule Test\n");
57 testapp_print ("6. Thread Test\n");
58 testapp_print ("7. Others\n");
59 testapp_print ("0. Exit \n");
60 testapp_print ("------------------------------------------\n");
63 case EMAIL_ACCOUNT_MENU:
64 testapp_print ("==========================================\n");
65 testapp_print (" ACCOUNT MENU \n");
66 testapp_print ("==========================================\n");
67 testapp_print (" 1. Add account with validation\n");
68 testapp_print (" 2. Update account\n");
69 testapp_print (" 3. Delete account\n");
70 testapp_print (" 4. Get account\n");
71 testapp_print (" 5. Get account list\n");
72 testapp_print (" 6. Update check interval\n");
73 testapp_print (" 7. Validate account\n");
74 testapp_print (" 8. Cancel validate Account\n");
75 testapp_print (" 9. Backup All accounts\n");
76 testapp_print (" 10. Restore accounts\n");
77 testapp_print (" 11. Get password length of account\n");
78 testapp_print (" 12. Query server info\n");
79 testapp_print (" 13. Clear all notifications\n");
80 testapp_print (" 14. Save default account ID\n");
81 testapp_print (" 15. Load default account ID\n");
82 testapp_print (" 16. Add certificate\n");
83 testapp_print (" 17. Get certificate\n");
84 testapp_print (" 18. Delete certificate\n");
85 testapp_print (" 19. Add Account\n");
86 testapp_print (" 0. Go to Main Menu\n");
87 testapp_print ("------------------------------------------\n");
91 testapp_print ("==========================================\n");
92 testapp_print (" MAIL MENU\n");
93 testapp_print ("==========================================\n");
94 testapp_print ("1. Get mails\n");
95 testapp_print ("2. Send a mail\n");
96 testapp_print ("3. Get mail list ex\n");
97 testapp_print ("4. Add Attachment\n");
98 testapp_print ("5. Set deleted flag\n");
99 testapp_print ("6. Expunge deleted flagged mails\n");
100 testapp_print ("7. Send read receipt\n");
101 testapp_print ("8. Delete attachment\n");
102 testapp_print ("9. Mail Count \n");
103 testapp_print ("10. Move mails to another account\n");
104 testapp_print ("11. Send mail with downloading attachment of original mail\n");
105 testapp_print ("12. Get mail data\n");
106 testapp_print ("13. Schedule sending mail\n");
107 testapp_print ("14. Delete a mail \n");
108 testapp_print ("15. Update mail attribute \n");
109 testapp_print ("16. Download mail body\n");
110 testapp_print ("17. Download an attachment\n");
111 testapp_print ("20. Delete all mail\n");
112 testapp_print ("21. Move Mail \n");
113 testapp_print ("23. Resend Mail \n");
114 testapp_print ("27. Move all mails to mailbox\n");
115 testapp_print ("38. Get total email disk usage \n");
116 testapp_print ("40. Verify Email Address Format\n");
117 testapp_print ("41. Get Max Mail Count\n");
118 testapp_print ("42. Storage test : (Input : to fields)\n");
119 testapp_print ("43. Send mail Cancel\n");
120 testapp_print ("44. Cancel Download Body\n");
121 testapp_print ("46. Get thread list\n");
122 testapp_print ("48. Get thread information\n");
123 testapp_print ("51. Get mail list\n");
124 testapp_print ("52. Get address info list\n");
125 testapp_print ("55. Set a field of flags\n");
126 testapp_print ("56. Add mail\n");
127 testapp_print ("57. Update mail\n");
128 testapp_print ("58. Search on server\n");
129 testapp_print ("59. Add mail to search result table\n");
130 testapp_print ("60. Parse mime file\n");
131 testapp_print ("61. Write mime file\n");
132 testapp_print ("0. Go to Main Menu\n");
133 testapp_print ("------------------------------------------\n");
136 case EMAIL_MAILBOX_MENU:
137 testapp_print ("==========================================\n");
138 testapp_print (" MAILBOX MENU\n");
139 testapp_print ("==========================================\n");
140 testapp_print (" 1. Add mailbox\n");
141 testapp_print (" 2. Delete mailbox\n");
142 testapp_print (" 3. Raname mailbox\n");
143 testapp_print (" 4. Get IMAP mailbox List\n");
144 testapp_print (" 5. Set local mailbox\n");
145 testapp_print (" 6. Delete mailbox ex\n");
146 testapp_print (" 7. Get mailbox by mailbox type\n");
147 testapp_print (" 8. Set mailbox type\n");
148 testapp_print (" 9. Set mail slot size\n");
149 testapp_print ("10. Get mailbox list\n");
150 testapp_print ("11. Sync mailbox\n");
151 testapp_print ("12. Stamp sync time\n");
152 testapp_print ("0. Go to Main Menu\n");
153 testapp_print ("------------------------------------------\n");
156 case EMAIL_RULE_MENU:
157 testapp_print ("==========================================\n");
158 testapp_print (" RULE MENU\n");
159 testapp_print ("==========================================\n");
160 testapp_print ("1. Add Rule\n");
161 testapp_print ("2. Delete Rule\n");
162 testapp_print ("3. Update Rule\n");
163 testapp_print ("5. Get Rule\n");
164 testapp_print ("6. Get Rule List\n");
165 testapp_print ("0. Go to Main Menu\n");
166 testapp_print ("------------------------------------------\n");
169 case EMAIL_THREAD_MENU:
170 testapp_print ("==========================================\n");
171 testapp_print (" TRHEAD MENU\n");
172 testapp_print ("==========================================\n");
173 testapp_print ("1. Move Thread\n");
174 testapp_print ("2. Delete Thread\n");
175 testapp_print ("3. Set Seen Flag of Thread\n");
176 testapp_print ("0. Go to Main Menu\n");
177 testapp_print ("------------------------------------------\n");
180 case EMAIL_OTHERS_MENU:
181 testapp_print ("==========================================\n");
182 testapp_print (" OTHERS\n");
183 testapp_print ("==========================================\n");
184 testapp_print ("1. Get Network Status\n");
185 testapp_print ("2. Get Pending Job\n");
186 testapp_print ("3. Cancel Job\n");
187 testapp_print ("5. Set DNET Proper Profile Type\n");
188 testapp_print ("6. Get DNET Proper Profile Type\n");
189 testapp_print ("7. Get preview text\n");
190 testapp_print ("11. Print receiving event queue via debug msg\n");
191 testapp_print ("12. Create DB full\n");
192 testapp_print ("13. Encoding Test\n");
193 testapp_print ("14. DTT Test\n");
194 testapp_print ("15. Show User Message\n");
195 testapp_print ("16. Get mime entity in signed file\n");
196 testapp_print ("0. Go to Main Menu\n");
197 testapp_print ("------------------------------------------\n");
204 void testapp_show_prompt (eEMAIL_MENU menu)
207 case EMAIL_MAIN_MENU:
208 testapp_print ("[MAIN]# ");
211 case EMAIL_ACCOUNT_MENU:
212 testapp_print ("[ACCOUNT]# ");
215 case EMAIL_MAIL_MENU:
216 testapp_print ("[MAIL]# ");
219 case EMAIL_MAILBOX_MENU:
220 testapp_print ("[MAILBOX]# ");
223 case EMAIL_RULE_MENU:
224 testapp_print ("[RULE]# ");
227 case EMAIL_THREAD_MENU:
228 testapp_print ("[THREAD]# ");
231 case EMAIL_OTHERS_MENU:
232 testapp_print ("[OTHERS]# ");