4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Wonyoung Lee <wy1115.lee@samsung.com>, Tarun Kumar <tarun.kr@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.
25 #include <dbus/dbus.h>
29 static void _account_free_text(char *text)
37 bool _capability_get_callback(account_capability_type_e capability_type, account_capability_state_e capability_value, void* user_data)
39 int test_type = capability_type;
40 int test_value = capability_value;
42 printf("_capability_get_callback test_type = : %d\n", test_type);
43 printf("_capability_get_callback test_value = : %d\n", test_value);
47 int _account_get_account_info(account_h handle)
49 printf("_account_get_callback\n");
51 char *test_text = NULL;
53 account_get_user_name(handle, &test_text);
54 printf("_account_get_callback : %s\n", test_text);
56 _account_free_text(test_text);
58 account_get_display_name(handle, &test_text);
59 printf("_account_get_callback : %s\n", test_text);
61 _account_free_text(test_text);
63 account_get_email_address(handle, &test_text);
64 printf("_account_get_callback : %s\n", test_text);
66 _account_free_text(test_text);
68 account_get_icon_path(handle, &test_text);
69 printf("_account_get_callback : %s\n", test_text);
71 _account_free_text(test_text);
73 account_get_source(handle, &test_text);
74 printf("_account_get_callback : %s\n", test_text);
76 _account_free_text(test_text);
78 account_get_package_name(handle, &test_text);
79 printf("_account_get_callback : %s\n", test_text);
81 _account_free_text(test_text);
83 account_get_domain_name(handle, &test_text);
84 printf("_account_get_callback : %s\n", test_text);
86 _account_free_text(test_text);
88 account_get_access_token(handle, &test_text);
89 printf("_account_get_callback : %s\n", test_text);
94 for(i=0;i<USER_TXT_CNT;i++)
96 _account_free_text(test_text);
98 account_get_user_text(handle, i, &test_text);
99 printf("_account_get_callback : %s\n", test_text);
104 account_auth_type_e auth_type;
105 account_get_auth_type(handle, &auth_type);
106 printf("account_get_auth_type : %d\n", auth_type);
108 account_secrecy_state_e secret;
109 account_get_secret(handle, &secret);
110 printf("account_get_secret : %d\n", secret);
112 account_sync_state_e sync_support;
113 account_get_sync_support(handle, &sync_support);
114 printf("account_get_sync_support : %d\n", sync_support);
116 for(i=0;i<USER_INT_CNT;i++)
119 account_get_user_int(handle, i, &test_int);
120 printf("_account_get_callback : %d\n", test_int);
123 account_get_capability(handle, _capability_get_callback, NULL);
129 bool _account_get_callback(account_h handle, void* user_data)
131 printf("_account_get_callback\n");
133 char *test_text = NULL;
135 account_get_user_name(handle, &test_text);
136 printf("_account_get_callback : %s\n", test_text);
138 _account_free_text(test_text);
140 account_get_display_name(handle, &test_text);
141 printf("_account_get_callback : %s\n", test_text);
143 _account_free_text(test_text);
145 account_get_email_address(handle, &test_text);
146 printf("_account_get_callback : %s\n", test_text);
148 _account_free_text(test_text);
150 account_get_icon_path(handle, &test_text);
151 printf("_account_get_callback : %s\n", test_text);
153 _account_free_text(test_text);
155 account_get_source(handle, &test_text);
156 printf("_account_get_callback : %s\n", test_text);
158 _account_free_text(test_text);
160 account_get_package_name(handle, &test_text);
161 printf("_account_get_callback : %s\n", test_text);
163 _account_free_text(test_text);
165 account_get_domain_name(handle, &test_text);
166 printf("_account_get_callback : %s\n", test_text);
168 _account_free_text(test_text);
170 account_get_access_token(handle, &test_text);
171 printf("_account_get_callback : %s\n", test_text);
175 for(i=0;i<USER_TXT_CNT;i++)
177 _account_free_text(test_text);
179 account_get_user_text(handle, i, &test_text);
180 printf("_account_get_callback : %s\n", test_text);
185 account_auth_type_e auth_type;
186 account_get_auth_type(handle, &auth_type);
187 printf("account_get_auth_type : %d\n", auth_type);
189 account_secrecy_state_e secret;
190 account_get_secret(handle, &secret);
191 printf("account_get_secret : %d\n", secret);
193 account_sync_state_e sync_support;
194 account_get_sync_support(handle, &sync_support);
195 printf("account_get_sync_support : %d\n", sync_support);
197 for(i=0;i<USER_INT_CNT;i++)
200 account_get_user_int(handle, i, &test_int);
201 printf("_account_get_callback : %d\n", test_int);
204 account_get_capability(handle, _capability_get_callback, NULL);
209 static int _account_insert_test_new(void)
216 ret = account_connect();
218 if(ret != ACCOUNT_ERROR_NONE)
220 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
224 memset(temp, 0x00, sizeof(temp));
226 ret = account_create(&account);
227 printf("account_set_user_name: Enter User Name to be set \n");
230 ret = account_set_user_name(account, temp);
232 if(ret != ACCOUNT_ERROR_NONE)
234 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
236 memset(temp, 0x00, sizeof(temp));
237 printf("account_set_display_name: Enter display Name to be set \n");
240 ret = account_set_display_name(account, temp);
242 if(ret != ACCOUNT_ERROR_NONE)
244 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
246 memset(temp, 0x00, sizeof(temp));
247 printf("account_set_domain_name: Enter domain Name to be set \n");
250 ret = account_set_domain_name(account, temp);
251 if(ret != ACCOUNT_ERROR_NONE)
253 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
256 memset(temp, 0x00, sizeof(temp));
257 printf("account_set_email_address: Enter email Name to be set \n");
259 ret = account_set_email_address(account, temp);
260 if(ret != ACCOUNT_ERROR_NONE)
262 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
264 memset(temp, 0x00, sizeof(temp));
265 printf("account_set_package_name: Enter package Name to be set \n");
268 ret = account_set_package_name(account, temp);
269 if(ret != ACCOUNT_ERROR_NONE)
271 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
273 memset(temp, 0x00, sizeof(temp));
274 printf("account_set_icon_path: Enter icon path to be set \n");
277 ret = account_set_icon_path(account, temp);
278 if(ret != ACCOUNT_ERROR_NONE)
280 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
282 memset(temp, 0x00, sizeof(temp));
284 printf("account_set_access_token: Enter access token to be set \n");
287 ret = account_set_access_token(account, temp);
288 if(ret != ACCOUNT_ERROR_NONE)
290 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
292 memset(temp, 0x00, sizeof(temp));
293 printf("account_set_auth_type: Enter auth type to be set \n");
294 scanf("%d", &temp_int);
296 ret = account_set_auth_type( account, temp_int );
297 if(ret != ACCOUNT_ERROR_NONE)
299 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
302 printf("account_set_secret: Enter secret to be set \n");
303 scanf("%d", &temp_int);
305 ret = account_set_secret( account, temp_int );
306 if(ret != ACCOUNT_ERROR_NONE)
308 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
311 printf("account_set_sync_support: Enter sync support state \n");
312 scanf("%d", &temp_int);
314 ret = account_set_sync_support( account, temp_int );
315 if(ret != ACCOUNT_ERROR_NONE)
317 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
320 memset(temp, 0x00, sizeof(temp));
321 printf("account_set_source: Enter source to be set \n");
323 ret = account_set_source(account, temp);
327 for(i=0;i<USER_TXT_CNT;i++)
329 memset(temp, 0x00, sizeof(temp));
330 printf("account_set_user_text [%d]: Enter user text to be set \n", i);
332 ret = account_set_user_text(account, i, temp);
333 if(ret != ACCOUNT_ERROR_NONE)
335 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
340 for(i=0;i<USER_INT_CNT;i++)
343 printf("account_set_user_int [%d]: Enter user int to be set \n", i);
344 scanf("%d", &temp_int);
345 ret = account_set_user_int(account, i, temp_int);
346 if(ret != ACCOUNT_ERROR_NONE)
348 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
354 int want_to_enter_more_cap = 1;
355 while (want_to_enter_more_cap){
356 printf("account_set_capability: Enter capability key to set \n");
357 scanf("%d", &cap_key);
358 printf("account_set_capability: Enter capability value to set \n");
359 scanf("%d", &cap_value);
360 ret = account_set_capability(account, cap_key, cap_value);
361 if(ret != ACCOUNT_ERROR_NONE)
363 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
365 printf("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
366 scanf("%d", &temp_int);
368 want_to_enter_more_cap = 1;
370 want_to_enter_more_cap = 0;
373 ret = account_insert_to_db(account, &account_id);
374 if(ret != ACCOUNT_ERROR_NONE)
376 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
380 ret = account_destroy(account);
381 if(ret != ACCOUNT_ERROR_NONE)
383 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
386 ret = account_disconnect();
388 if(ret != ACCOUNT_ERROR_NONE)
390 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
395 static int _account_insert_test(void)
401 printf("account_connect returns %d\n", ret);
403 ret = account_create(&account);
405 printf("account = %p\n", account);
407 ret = account_set_user_name(account, "wy1115.lee");
409 if(ret != ACCOUNT_ERROR_NONE)
411 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
414 ret = account_set_display_name(account, "Wonyoung Lee");
416 if(ret != ACCOUNT_ERROR_NONE)
418 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
421 ret = account_set_domain_name(account, "Samsung electronics");
422 if(ret != ACCOUNT_ERROR_NONE)
424 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
426 ret = account_set_email_address(account, "urusa77@gmail.com");
427 if(ret != ACCOUNT_ERROR_NONE)
429 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
431 ret = account_set_package_name(account, "com.samsung.account");
432 if(ret != ACCOUNT_ERROR_NONE)
434 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
436 ret = account_set_icon_path(account, "icon-path");
437 if(ret != ACCOUNT_ERROR_NONE)
439 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
442 ret = account_set_access_token(account, "ACCESSTOKEN");
443 if(ret != ACCOUNT_ERROR_NONE)
445 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
448 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
449 if(ret != ACCOUNT_ERROR_NONE)
451 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
453 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
454 if(ret != ACCOUNT_ERROR_NONE)
456 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
458 ret = account_set_source(account, "URUSA inc.");
462 for(i=0;i<USER_TXT_CNT;i++)
464 ret = account_set_user_text(account, i, "user txt");
465 if(ret != ACCOUNT_ERROR_NONE)
467 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
472 for(i=0;i<USER_INT_CNT;i++)
474 ret = account_set_user_int(account, i, 888);
475 if(ret != ACCOUNT_ERROR_NONE)
477 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
481 ret = account_set_capability(account, ACCOUNT_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_ENABLED);
482 ret = account_set_capability(account, ACCOUNT_CAPABILITY_CALENDAR, ACCOUNT_CAPABILITY_ENABLED);
483 ret = account_set_capability(account, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED);
484 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_ENABLED);
485 ret = account_set_capability(account, ACCOUNT_CAPABILITY_EMAIL, ACCOUNT_CAPABILITY_ENABLED);
486 ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_ENABLED);
487 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VOIP, ACCOUNT_CAPABILITY_ENABLED);
488 //ret = account_set_capability(account, ACCOUNT_CAPABILITY_IM, ACCOUNT_CAPABILITY_ENABLED);
489 ret = account_set_capability(account, ACCOUNT_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_ENABLED);
490 ret = account_set_capability(account, ACCOUNT_CAPABILITY_MOBILE_TRACKER, ACCOUNT_CAPABILITY_ENABLED);
493 ret = account_insert_to_db(account, &account_id);
494 if(ret != ACCOUNT_ERROR_NONE)
496 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
500 ret = account_destroy(account);
501 if(ret != ACCOUNT_ERROR_NONE)
503 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
508 printf("account_connect returns %d\n", ret);
510 ret = account_create(&account);
512 account_query_account_by_account_id(account_id, &account);
513 _account_get_account_info(account);
515 account_query_capability_by_account_id(_capability_get_callback, account_id, NULL);
517 ret = account_destroy(account);
518 if(ret != ACCOUNT_ERROR_NONE)
520 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
526 printf("account_connect returns %d\n", ret);
528 ret = account_create(&account);
530 account_query_account_by_user_name(_account_get_callback, "usernamed-wy1115", NULL);
532 ret = account_destroy(account);
533 if(ret != ACCOUNT_ERROR_NONE)
535 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
541 static int _account_update_test_new_by_user_name(char *user_name, char *package_name)
549 memset(temp, 0x00, sizeof(temp));
550 ret = account_connect();
552 if(ret != ACCOUNT_ERROR_NONE)
554 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
557 ret = account_create(&account);
558 printf("account_set_user_name: Enter User Name to be set \n");
561 ret = account_set_user_name(account, temp);
563 if(ret != ACCOUNT_ERROR_NONE)
565 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
567 memset(temp, 0x00, sizeof(temp));
569 printf("account_set_display_name: Enter display Name to be set \n");
572 ret = account_set_display_name(account, temp);
574 if(ret != ACCOUNT_ERROR_NONE)
576 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
578 memset(temp, 0x00, sizeof(temp));
580 printf("account_set_domain_name: Enter domain Name to be set \n");
583 ret = account_set_domain_name(account, temp);
584 if(ret != ACCOUNT_ERROR_NONE)
586 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
589 memset(temp, 0x00, sizeof(temp));
591 printf("account_set_email_address: Enter email Name to be set \n");
593 ret = account_set_email_address(account, temp);
594 if(ret != ACCOUNT_ERROR_NONE)
596 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
598 memset(temp, 0x00, sizeof(temp));
600 printf("account_set_package_name: Enter package Name to be set \n");
603 ret = account_set_package_name(account, temp);
604 if(ret != ACCOUNT_ERROR_NONE)
606 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
608 memset(temp, 0x00, sizeof(temp));
610 printf("account_set_icon_path: Enter icon path to be set \n");
613 ret = account_set_icon_path(account, temp);
614 if(ret != ACCOUNT_ERROR_NONE)
616 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
618 memset(temp, 0x00, sizeof(temp));
620 printf("account_set_access_token: Enter access token to be set \n");
623 ret = account_set_access_token(account, temp);
624 if(ret != ACCOUNT_ERROR_NONE)
626 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
628 memset(temp, 0x00, sizeof(temp));
630 printf("account_set_auth_type: Enter auth type to be set \n");
631 scanf("%d", &temp_int);
633 ret = account_set_auth_type( account, temp_int );
634 if(ret != ACCOUNT_ERROR_NONE)
636 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
639 printf("account_set_secret: Enter secret to be set \n");
640 scanf("%d", &temp_int);
642 ret = account_set_secret( account, temp_int );
643 if(ret != ACCOUNT_ERROR_NONE)
645 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
649 printf("account_set_sync_support: Enter sync support state \n");
650 scanf("%d", &temp_int);
652 ret = account_set_sync_support( account, temp_int );
653 if(ret != ACCOUNT_ERROR_NONE)
655 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
658 memset(temp, 0x00, sizeof(temp));
660 printf("account_set_source: Enter source to be set \n");
662 ret = account_set_source(account, temp);
666 for(i=0;i<USER_TXT_CNT;i++)
668 memset(temp, 0x00, sizeof(temp));
670 printf("account_set_user_text [%d]: Enter user text to be set \n", i);
672 ret = account_set_user_text(account, i, temp);
673 if(ret != ACCOUNT_ERROR_NONE)
675 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
680 for(i=0;i<USER_INT_CNT;i++)
683 printf("account_set_user_int [%d]: Enter user int to be set \n", i);
684 scanf("%d", &temp_int);
685 ret = account_set_user_int(account, i, temp_int);
686 if(ret != ACCOUNT_ERROR_NONE)
688 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
694 int want_to_enter_more_cap = 1;
695 while (want_to_enter_more_cap){
696 printf("account_set_capability: Enter capability key to set \n");
697 scanf("%d", &cap_key);
698 printf("account_set_capability: Enter capability value to set \n");
699 scanf("%d", &cap_value);
700 ret = account_set_capability(account, cap_key, cap_value);
701 if(ret != ACCOUNT_ERROR_NONE)
703 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
705 printf("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
706 scanf("%d", &temp_int);
708 want_to_enter_more_cap = 1;
710 want_to_enter_more_cap = 0;
714 ret = account_update_to_db_by_user_name(account, user_name, package_name);
717 if(ret != ACCOUNT_ERROR_NONE)
719 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
722 ret = account_destroy(account);
723 if(ret != ACCOUNT_ERROR_NONE)
725 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
727 ret = account_disconnect();
729 if(ret != ACCOUNT_ERROR_NONE)
731 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
739 static int _account_update_test_new(int account_id)
748 memset(temp, 0x00, sizeof(temp));
749 ret = account_connect();
751 if(ret != ACCOUNT_ERROR_NONE)
753 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
757 ret = account_create(&account);
758 printf("account_set_user_name: Enter User Name to be set \n");
761 ret = account_set_user_name(account, temp);
763 if(ret != ACCOUNT_ERROR_NONE)
765 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
767 memset(temp, 0x00, sizeof(temp));
769 printf("account_set_display_name: Enter display Name to be set \n");
772 ret = account_set_display_name(account, temp);
774 if(ret != ACCOUNT_ERROR_NONE)
776 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
778 memset(temp, 0x00, sizeof(temp));
779 printf("account_set_domain_name: Enter domain Name to be set \n");
782 ret = account_set_domain_name(account, temp);
783 if(ret != ACCOUNT_ERROR_NONE)
785 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
788 memset(temp, 0x00, sizeof(temp));
789 printf("account_set_email_address: Enter email Name to be set \n");
791 ret = account_set_email_address(account, temp);
792 if(ret != ACCOUNT_ERROR_NONE)
794 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
796 memset(temp, 0x00, sizeof(temp));
798 printf("account_set_package_name: Enter package Name to be set \n");
801 ret = account_set_package_name(account, temp);
802 if(ret != ACCOUNT_ERROR_NONE)
804 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
806 memset(temp, 0x00, sizeof(temp));
808 printf("account_set_icon_path: Enter icon path to be set \n");
811 ret = account_set_icon_path(account, temp);
812 if(ret != ACCOUNT_ERROR_NONE)
814 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
816 memset(temp, 0x00, sizeof(temp));
818 printf("account_set_access_token: Enter access token to be set \n");
821 ret = account_set_access_token(account, temp);
822 if(ret != ACCOUNT_ERROR_NONE)
824 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
826 memset(temp, 0x00, sizeof(temp));
828 printf("account_set_auth_type: Enter auth type to be set \n");
829 scanf("%d", &temp_int);
831 ret = account_set_auth_type( account, temp_int );
832 if(ret != ACCOUNT_ERROR_NONE)
834 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
837 printf("account_set_secret: Enter secret to be set \n");
838 scanf("%d", &temp_int);
840 ret = account_set_secret( account, temp_int );
841 if(ret != ACCOUNT_ERROR_NONE)
843 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
847 printf("account_set_sync_support: Enter sync support state \n");
848 scanf("%d", &temp_int);
850 ret = account_set_sync_support( account, temp_int );
851 if(ret != ACCOUNT_ERROR_NONE)
853 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
856 memset(temp, 0x00, sizeof(temp));
858 printf("account_set_source: Enter source to be set \n");
860 ret = account_set_source(account, temp);
864 for(i=0;i<USER_TXT_CNT;i++)
866 memset(temp, 0x00, sizeof(temp));
868 printf("account_set_user_text [%d]: Enter user text to be set \n", i);
870 ret = account_set_user_text(account, i, temp);
871 if(ret != ACCOUNT_ERROR_NONE)
873 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
878 for(i=0;i<USER_INT_CNT;i++)
881 printf("account_set_user_int [%d]: Enter user int to be set \n", i);
882 scanf("%d", &temp_int);
883 ret = account_set_user_int(account, i, temp_int);
884 if(ret != ACCOUNT_ERROR_NONE)
886 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
892 int want_to_enter_more_cap = 1;
893 while (want_to_enter_more_cap){
894 printf("account_set_capability: Enter capability key to set \n");
895 scanf("%d", &cap_key);
896 printf("account_set_capability: Enter capability value to set \n");
897 scanf("%d", &cap_value);
898 ret = account_set_capability(account, cap_key, cap_value);
899 if(ret != ACCOUNT_ERROR_NONE)
901 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
903 printf("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
904 scanf("%d", &temp_int);
906 want_to_enter_more_cap = 1;
908 want_to_enter_more_cap = 0;
911 ret = account_update_to_db_by_id(account, account_id);
913 if(ret != ACCOUNT_ERROR_NONE)
915 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
918 ret = account_destroy(account);
919 if(ret != ACCOUNT_ERROR_NONE)
921 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
924 ret = account_disconnect();
926 if(ret != ACCOUNT_ERROR_NONE)
928 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
934 static int _account_update_test(int account_id)
940 ret = account_create(&account);
942 ret = account_set_user_name(account, "updated-wy1115");
944 if(ret != ACCOUNT_ERROR_NONE)
946 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
949 ret = account_set_display_name(account, "updated-Wonyoung Lee");
951 if(ret != ACCOUNT_ERROR_NONE)
953 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
956 ret = account_set_domain_name(account, "updated-Samsung Facebook");
957 if(ret != ACCOUNT_ERROR_NONE)
959 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
961 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
962 if(ret != ACCOUNT_ERROR_NONE)
964 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
966 ret = account_set_package_name(account, "updated-com.samsung.account");
967 if(ret != ACCOUNT_ERROR_NONE)
969 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
971 ret = account_set_icon_path(account, "updated-icon-path");
972 if(ret != ACCOUNT_ERROR_NONE)
974 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
977 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
978 if(ret != ACCOUNT_ERROR_NONE)
980 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
983 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
984 if(ret != ACCOUNT_ERROR_NONE)
986 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
988 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
989 if(ret != ACCOUNT_ERROR_NONE)
991 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
993 ret = account_set_source(account, "updated-URUSA inc.");
997 for(i=0;i<USER_TXT_CNT;i++)
999 ret = account_set_user_text(account, i, "updated-user txt");
1000 if(ret != ACCOUNT_ERROR_NONE)
1002 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1007 for(i=0;i<USER_INT_CNT;i++)
1009 ret = account_set_user_int(account, i, 111);
1010 if(ret != ACCOUNT_ERROR_NONE)
1012 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1017 ret = account_set_capability(account, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED);
1018 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_ENABLED);
1019 ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_ENABLED);
1020 ret = account_set_capability(account, ACCOUNT_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_ENABLED);
1021 ret = account_set_capability(account, ACCOUNT_CAPABILITY_MOBILE_TRACKER, ACCOUNT_CAPABILITY_ENABLED);
1023 ret = account_update_to_db_by_id(account, account_id);
1026 if(ret != ACCOUNT_ERROR_NONE)
1028 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1031 ret = account_destroy(account);
1032 if(ret != ACCOUNT_ERROR_NONE)
1034 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1042 static int _account_update_test_by_username()
1048 ret = account_create(&account);
1050 ret = account_set_user_name(account, "usernamed-wy1115");
1052 if(ret != ACCOUNT_ERROR_NONE)
1054 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1057 ret = account_set_display_name(account, "usernamed-Wonyoung Lee");
1059 if(ret != ACCOUNT_ERROR_NONE)
1061 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1064 ret = account_set_domain_name(account, "usernamed-Samsung Facebook");
1065 if(ret != ACCOUNT_ERROR_NONE)
1067 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1069 ret = account_set_email_address(account, "usernamed-urusa77@gmail.com");
1070 if(ret != ACCOUNT_ERROR_NONE)
1072 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1074 ret = account_set_package_name(account, "usernamed-com.samsung.account");
1075 if(ret != ACCOUNT_ERROR_NONE)
1077 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1079 ret = account_set_icon_path(account, "usernamed-icon-path");
1080 if(ret != ACCOUNT_ERROR_NONE)
1082 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1085 ret = account_set_access_token(account, "usernamed-ACCESSTOKEN");
1086 if(ret != ACCOUNT_ERROR_NONE)
1088 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1091 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
1092 if(ret != ACCOUNT_ERROR_NONE)
1094 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1096 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
1097 if(ret != ACCOUNT_ERROR_NONE)
1099 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1101 ret = account_set_source(account, "updated-URUSA inc.");
1105 for(i=0;i<USER_TXT_CNT;i++)
1107 ret = account_set_user_text(account, i, "usernamed-user txt");
1108 if(ret != ACCOUNT_ERROR_NONE)
1110 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1115 for(i=0;i<USER_INT_CNT;i++)
1117 ret = account_set_user_int(account, i, 111);
1118 if(ret != ACCOUNT_ERROR_NONE)
1120 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1125 ret = account_set_capability(account, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED);
1126 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_ENABLED);
1127 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VOIP, ACCOUNT_CAPABILITY_ENABLED);
1128 ret = account_set_capability(account, ACCOUNT_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_ENABLED);
1129 ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_ENABLED);
1131 ret = account_update_to_db_by_user_name(account, "updated-wy1115", "updated-com.samsung.account");
1134 if(ret != ACCOUNT_ERROR_NONE)
1136 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1139 ret = account_destroy(account);
1140 if(ret != ACCOUNT_ERROR_NONE)
1142 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1150 static int _account_test_capability()
1152 GSList* list = NULL;
1153 GSList* iter = NULL;
1156 list = g_slist_append(list, strdup("test 1"));
1157 list = g_slist_append(list, strdup("test 2"));
1158 list = g_slist_append(list, strdup("test 3"));
1159 list = g_slist_append(list, strdup("test 4"));
1160 list = g_slist_append(list, strdup("test 5"));
1161 list = g_slist_append(list, strdup("test 6"));
1163 glist_len = g_slist_length( list );
1165 int capability_count = g_slist_length( list );
1167 int binding_bufsize = 2+2*(capability_count*2)+1;
1169 int binding_buf_index = 0;
1170 char* binding_buf = (char*)malloc(sizeof(char)*binding_bufsize);
1172 memset(binding_buf, 0, sizeof(char)*binding_bufsize);
1174 binding_buf[binding_buf_index++]='(';
1176 printf("(%d)Binding buf = %s\n", __LINE__,binding_buf);
1180 for(i=0;i<capability_count;i++)
1182 /*snprintf(binding_buf+binding_buf_index, strlen(binding_buf)+2, "%s?,", binding_buf);*/
1183 binding_buf[binding_buf_index++]='?';
1184 if(i != capability_count -1)
1185 binding_buf[binding_buf_index++]=',';
1186 printf("(%d)Binding buf = %s\n", __LINE__,binding_buf);
1189 binding_buf[binding_buf_index]=')';
1191 printf("(%d)Binding buf = %s\n", __LINE__,binding_buf);
1193 printf("Length %d\n", glist_len);
1195 for (iter = list; iter != NULL; iter = g_slist_next(iter))
1198 capa = (char *)iter->data;
1199 printf("%s\n", (char *)iter->data);
1209 static int utc1_account_insert()
1214 int account_id = -1;
1215 ret = account_connect();
1216 if(ret != ACCOUNT_ERROR_NONE)
1218 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1221 ret = account_create(&account);
1223 printf("account = %p, ret = %d \n", account, ret);
1225 ret = account_insert_to_db(account, &account_id);
1227 if(ret != ACCOUNT_ERROR_NONE)
1229 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1233 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1236 ret = account_destroy(account);
1237 if(ret != ACCOUNT_ERROR_NONE)
1239 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1243 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1245 ret = account_disconnect();
1246 if(ret != ACCOUNT_ERROR_NONE)
1248 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1253 static int utc2_account_insert()
1258 int account_id = -1;
1259 ret = account_connect();
1260 if(ret != ACCOUNT_ERROR_NONE)
1262 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1265 ret = account_create(&account);
1267 printf("account = %p, ret = %d \n", account, ret);
1269 ret = account_set_user_name(account, NULL);
1270 if(ret != ACCOUNT_ERROR_NONE)
1272 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1276 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1278 ret = account_insert_to_db(account, &account_id);
1280 if(ret != ACCOUNT_ERROR_NONE)
1282 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1286 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1289 ret = account_destroy(account);
1290 if(ret != ACCOUNT_ERROR_NONE)
1292 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1296 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1298 ret = account_disconnect();
1299 if(ret != ACCOUNT_ERROR_NONE)
1301 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1309 static int utc3_account_insert()
1314 int account_id = -1;
1315 ret = account_connect();
1316 if(ret != ACCOUNT_ERROR_NONE)
1318 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1321 ret = account_create(&account);
1323 printf("account = %p, ret = %d \n", account, ret);
1325 ret = account_set_user_name(account, "11111111111111111111111111111111111 \
1326 2222222222222222222222222222222222222222222222222 \
1327 3333333333333333333333333333333333333333333333333\
1328 4444444444444444444444444444444444444444444444444\
1329 5555555555555555555555555555555555555555555555555\
1330 666666666666666666666666666666666666666666666666\
1331 777777777777777777777777777777777777777777777777\
1332 888888888888888888888888888888888888888888888888\
1333 99999999999999999999999999999999999999999999999\
1334 111111111111111111111111111111111111111111111111\
1335 22222222222222222222222222222222222222222222222\
1336 333333333333333333333333333333333333333333333\
1337 444444444444444444444444444444444444444444\
1338 444444444444444444444444444444444444444444444444\
1339 555555555555555555555555555555555555555555555555 \
1340 66666666666666666666666666666666666666666666666666\
1341 777777777777777777777777777777777777777777777777779999999999999999999999999999999999999999\
1342 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\
1343 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999");
1344 if(ret != ACCOUNT_ERROR_NONE)
1346 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1350 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1352 ret = account_insert_to_db(account, &account_id);
1354 if(ret != ACCOUNT_ERROR_NONE)
1356 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1360 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1363 ret = account_destroy(account);
1364 if(ret != ACCOUNT_ERROR_NONE)
1366 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1370 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1372 ret = account_disconnect();
1373 if(ret != ACCOUNT_ERROR_NONE)
1375 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1380 static int utc4_account_insert()
1385 int account_id = -1;
1386 ret = account_connect();
1387 if(ret != ACCOUNT_ERROR_NONE)
1389 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1392 ret = account_create(&account);
1394 printf("account = %p, ret = %d \n", account, ret);
1396 ret = account_set_user_name(account, "tarun.kr");
1397 if(ret != ACCOUNT_ERROR_NONE)
1399 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1403 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1406 ret = account_set_display_name(account, NULL);
1408 if(ret != ACCOUNT_ERROR_NONE)
1410 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1414 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1417 ret = account_insert_to_db(account, &account_id);
1419 if(ret != ACCOUNT_ERROR_NONE)
1421 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1425 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1428 ret = account_destroy(account);
1429 if(ret != ACCOUNT_ERROR_NONE)
1431 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1435 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1437 ret = account_disconnect();
1438 if(ret != ACCOUNT_ERROR_NONE)
1440 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1445 static int utc5_account_insert()
1450 int account_id = -1;
1451 ret = account_connect();
1452 if(ret != ACCOUNT_ERROR_NONE)
1454 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1457 ret = account_create(&account);
1459 printf("account = %p, ret = %d \n", account, ret);
1461 ret = account_set_user_name(account, "tarun.kr");
1462 if(ret != ACCOUNT_ERROR_NONE)
1464 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1468 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1471 ret = account_set_display_name(account, "tarun kumar");
1473 if(ret != ACCOUNT_ERROR_NONE)
1475 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1479 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1482 ret = account_set_domain_name(account, NULL);
1483 if(ret != ACCOUNT_ERROR_NONE)
1485 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1489 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1491 ret = account_insert_to_db(account, &account_id);
1493 if(ret != ACCOUNT_ERROR_NONE)
1495 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1499 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1502 ret = account_destroy(account);
1503 if(ret != ACCOUNT_ERROR_NONE)
1505 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1509 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1511 ret = account_disconnect();
1512 if(ret != ACCOUNT_ERROR_NONE)
1514 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1519 static int utc6_account_insert()
1524 int account_id = -1;
1525 ret = account_connect();
1526 if(ret != ACCOUNT_ERROR_NONE)
1528 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1531 ret = account_create(&account);
1533 printf("account = %p, ret = %d \n", account, ret);
1535 ret = account_set_user_name(account, "tarun.kr");
1536 if(ret != ACCOUNT_ERROR_NONE)
1538 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1542 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1545 ret = account_set_display_name(account, "tarun kumar");
1547 if(ret != ACCOUNT_ERROR_NONE)
1549 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1553 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1556 ret = account_set_domain_name(account, "Samsung");
1557 if(ret != ACCOUNT_ERROR_NONE)
1559 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1563 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1565 ret = account_insert_to_db(account, &account_id);
1567 if(ret != ACCOUNT_ERROR_NONE)
1569 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1573 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1576 ret = account_destroy(account);
1577 if(ret != ACCOUNT_ERROR_NONE)
1579 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1583 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1585 ret = account_disconnect();
1586 if(ret != ACCOUNT_ERROR_NONE)
1588 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1593 static int utc7_account_insert()
1598 int account_id = -1;
1599 ret = account_connect();
1600 if(ret != ACCOUNT_ERROR_NONE)
1602 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1605 ret = account_create(&account);
1607 printf("account = %p, ret = %d \n", account, ret);
1609 ret = account_set_user_name(account, "tarun.kr");
1610 if(ret != ACCOUNT_ERROR_NONE)
1612 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1616 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1619 ret = account_set_display_name(account, "tarun kumar");
1621 if(ret != ACCOUNT_ERROR_NONE)
1623 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1627 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1630 ret = account_set_domain_name(account, "Samsung");
1631 if(ret != ACCOUNT_ERROR_NONE)
1633 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1637 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1640 ret = account_set_email_address(account, NULL);
1641 if(ret != ACCOUNT_ERROR_NONE)
1643 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1647 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1650 ret = account_insert_to_db(account, &account_id);
1652 if(ret != ACCOUNT_ERROR_NONE)
1654 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1658 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1661 ret = account_destroy(account);
1662 if(ret != ACCOUNT_ERROR_NONE)
1664 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1668 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1670 ret = account_disconnect();
1671 if(ret != ACCOUNT_ERROR_NONE)
1673 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1678 static int utc8_account_insert()
1683 int account_id = -1;
1684 ret = account_connect();
1685 if(ret != ACCOUNT_ERROR_NONE)
1687 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1690 ret = account_create(&account);
1692 printf("account = %p, ret = %d \n", account, ret);
1694 ret = account_set_user_name(account, "tarun.kr");
1695 if(ret != ACCOUNT_ERROR_NONE)
1697 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1701 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1704 ret = account_set_display_name(account, "tarun kumar");
1706 if(ret != ACCOUNT_ERROR_NONE)
1708 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1712 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1715 ret = account_set_domain_name(account, "Samsung");
1716 if(ret != ACCOUNT_ERROR_NONE)
1718 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1722 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1725 ret = account_set_email_address(account, "tarun.kr@samsung.com");
1726 if(ret != ACCOUNT_ERROR_NONE)
1728 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1732 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1735 ret = account_insert_to_db(account, &account_id);
1737 if(ret != ACCOUNT_ERROR_NONE)
1739 printf("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1743 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1746 ret = account_destroy(account);
1747 if(ret != ACCOUNT_ERROR_NONE)
1749 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1753 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1755 ret = account_disconnect();
1756 if(ret != ACCOUNT_ERROR_NONE)
1758 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1763 static int utc9_account_insert()
1768 int account_id = -1;
1769 ret = account_connect();
1770 if(ret != ACCOUNT_ERROR_NONE)
1772 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1775 ret = account_create(&account);
1777 printf("account = %p, ret = %d \n", account, ret);
1779 ret = account_set_user_name(account, "tarun.kr");
1780 if(ret != ACCOUNT_ERROR_NONE)
1782 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1786 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1789 ret = account_set_display_name(account, "tarun kumar");
1791 if(ret != ACCOUNT_ERROR_NONE)
1793 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1797 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1800 ret = account_set_domain_name(account, "Samsung");
1801 if(ret != ACCOUNT_ERROR_NONE)
1803 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1807 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1810 ret = account_set_email_address(account, "tarun.kr@samsung.com");
1811 if(ret != ACCOUNT_ERROR_NONE)
1813 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1817 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1820 ret = account_set_package_name(account, NULL);
1821 if(ret != ACCOUNT_ERROR_NONE)
1823 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1827 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1829 ret = account_insert_to_db(account, &account_id);
1831 if(ret != ACCOUNT_ERROR_NONE)
1833 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1837 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1840 ret = account_destroy(account);
1841 if(ret != ACCOUNT_ERROR_NONE)
1843 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1847 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1849 ret = account_disconnect();
1850 if(ret != ACCOUNT_ERROR_NONE)
1852 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1857 static int utc10_account_insert()
1862 int account_id = -1;
1863 ret = account_connect();
1864 if(ret != ACCOUNT_ERROR_NONE)
1866 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1869 ret = account_create(&account);
1871 printf("account = %p, ret = %d \n", account, ret);
1873 ret = account_set_user_name(account, "tarun.kr");
1874 if(ret != ACCOUNT_ERROR_NONE)
1876 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1880 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1883 ret = account_set_display_name(account, "tarun kumar");
1885 if(ret != ACCOUNT_ERROR_NONE)
1887 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1891 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1894 ret = account_set_domain_name(account, "Samsung");
1895 if(ret != ACCOUNT_ERROR_NONE)
1897 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1901 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1904 ret = account_set_email_address(account, "tarun.kr@samsung.com");
1905 if(ret != ACCOUNT_ERROR_NONE)
1907 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1911 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1914 ret = account_set_package_name(account, "com.samsung.accounts");
1915 if(ret != ACCOUNT_ERROR_NONE)
1917 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1921 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1923 ret = account_insert_to_db(account, &account_id);
1925 if(ret != ACCOUNT_ERROR_NONE)
1927 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1931 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1934 ret = account_destroy(account);
1935 if(ret != ACCOUNT_ERROR_NONE)
1937 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1941 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1943 ret = account_disconnect();
1944 if(ret != ACCOUNT_ERROR_NONE)
1946 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1951 static int utc11_account_insert()
1956 int account_id = -1;
1957 ret = account_connect();
1958 if(ret != ACCOUNT_ERROR_NONE)
1960 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1963 ret = account_create(&account);
1965 printf("account = %p, ret = %d \n", account, ret);
1967 ret = account_set_user_name(account, "tarun.kr");
1968 if(ret != ACCOUNT_ERROR_NONE)
1970 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1974 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1977 ret = account_set_display_name(account, "tarun kumar");
1979 if(ret != ACCOUNT_ERROR_NONE)
1981 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1985 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1988 ret = account_set_domain_name(account, "Samsung");
1989 if(ret != ACCOUNT_ERROR_NONE)
1991 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1995 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1998 ret = account_set_email_address(account, "tarun.kr@samsung.com");
1999 if(ret != ACCOUNT_ERROR_NONE)
2001 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2005 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2008 ret = account_set_package_name(account, "com.samsung.accounts");
2009 if(ret != ACCOUNT_ERROR_NONE)
2011 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2015 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2018 ret = account_set_icon_path(account, NULL);
2020 if(ret != ACCOUNT_ERROR_NONE)
2022 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2026 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2028 ret = account_insert_to_db(account, &account_id);
2030 if(ret != ACCOUNT_ERROR_NONE)
2032 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2036 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2039 ret = account_destroy(account);
2040 if(ret != ACCOUNT_ERROR_NONE)
2042 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2046 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2048 ret = account_disconnect();
2049 if(ret != ACCOUNT_ERROR_NONE)
2051 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2056 static int utc12_account_insert()
2061 int account_id = -1;
2062 ret = account_connect();
2063 if(ret != ACCOUNT_ERROR_NONE)
2065 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2068 ret = account_create(&account);
2070 printf("account = %p, ret = %d \n", account, ret);
2072 ret = account_set_user_name(account, "tarun.kr");
2073 if(ret != ACCOUNT_ERROR_NONE)
2075 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2079 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2082 ret = account_set_display_name(account, "tarun kumar");
2084 if(ret != ACCOUNT_ERROR_NONE)
2086 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2090 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2093 ret = account_set_domain_name(account, "Samsung");
2094 if(ret != ACCOUNT_ERROR_NONE)
2096 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2100 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2103 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2104 if(ret != ACCOUNT_ERROR_NONE)
2106 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2110 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2113 ret = account_set_package_name(account, "com.samsung.accounts");
2114 if(ret != ACCOUNT_ERROR_NONE)
2116 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2120 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2123 ret = account_set_icon_path(account, "/test/test.jpg");
2125 if(ret != ACCOUNT_ERROR_NONE)
2127 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2131 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2133 ret = account_insert_to_db(account, &account_id);
2135 if(ret != ACCOUNT_ERROR_NONE)
2137 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2141 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2144 ret = account_destroy(account);
2145 if(ret != ACCOUNT_ERROR_NONE)
2147 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2151 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2153 ret = account_disconnect();
2154 if(ret != ACCOUNT_ERROR_NONE)
2156 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2161 static int utc13_account_insert()
2166 int account_id = -1;
2167 ret = account_connect();
2168 if(ret != ACCOUNT_ERROR_NONE)
2170 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2173 ret = account_create(&account);
2175 printf("account = %p, ret = %d \n", account, ret);
2177 ret = account_set_user_name(account, "tarun.kr");
2178 if(ret != ACCOUNT_ERROR_NONE)
2180 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2184 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2187 ret = account_set_display_name(account, "tarun kumar");
2189 if(ret != ACCOUNT_ERROR_NONE)
2191 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2195 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2198 ret = account_set_domain_name(account, "Samsung");
2199 if(ret != ACCOUNT_ERROR_NONE)
2201 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2205 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2208 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2209 if(ret != ACCOUNT_ERROR_NONE)
2211 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2215 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2218 ret = account_set_package_name(account, "com.samsung.accounts");
2219 if(ret != ACCOUNT_ERROR_NONE)
2221 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2225 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2228 ret = account_set_icon_path(account, "/test/test.jpg");
2230 if(ret != ACCOUNT_ERROR_NONE)
2232 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2236 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2239 ret = account_set_access_token(account, NULL);
2240 if(ret != ACCOUNT_ERROR_NONE)
2242 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2246 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2250 ret = account_insert_to_db(account, &account_id);
2252 if(ret != ACCOUNT_ERROR_NONE)
2254 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2258 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2261 ret = account_destroy(account);
2262 if(ret != ACCOUNT_ERROR_NONE)
2264 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2268 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2270 ret = account_disconnect();
2271 if(ret != ACCOUNT_ERROR_NONE)
2273 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2278 static int utc14_account_insert()
2283 int account_id = -1;
2284 ret = account_connect();
2285 if(ret != ACCOUNT_ERROR_NONE)
2287 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2290 ret = account_create(&account);
2292 printf("account = %p, ret = %d \n", account, ret);
2294 ret = account_set_user_name(account, "tarun.kr");
2295 if(ret != ACCOUNT_ERROR_NONE)
2297 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2301 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2304 ret = account_set_display_name(account, "tarun kumar");
2306 if(ret != ACCOUNT_ERROR_NONE)
2308 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2312 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2315 ret = account_set_domain_name(account, "Samsung");
2316 if(ret != ACCOUNT_ERROR_NONE)
2318 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2322 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2325 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2326 if(ret != ACCOUNT_ERROR_NONE)
2328 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2332 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2335 ret = account_set_package_name(account, "com.samsung.accounts");
2336 if(ret != ACCOUNT_ERROR_NONE)
2338 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2342 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2345 ret = account_set_icon_path(account, "/test/test.jpg");
2347 if(ret != ACCOUNT_ERROR_NONE)
2349 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2353 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2356 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
2357 if(ret != ACCOUNT_ERROR_NONE)
2359 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2363 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2367 ret = account_insert_to_db(account, &account_id);
2369 if(ret != ACCOUNT_ERROR_NONE)
2371 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2375 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2378 ret = account_destroy(account);
2379 if(ret != ACCOUNT_ERROR_NONE)
2381 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2385 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2387 ret = account_disconnect();
2388 if(ret != ACCOUNT_ERROR_NONE)
2390 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2395 static int utc15_account_insert()
2400 int account_id = -1;
2401 ret = account_connect();
2402 if(ret != ACCOUNT_ERROR_NONE)
2404 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2407 ret = account_create(&account);
2409 printf("account = %p, ret = %d \n", account, ret);
2411 ret = account_set_user_name(account, "tarun.kr");
2412 if(ret != ACCOUNT_ERROR_NONE)
2414 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2418 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2421 ret = account_set_display_name(account, "tarun kumar");
2423 if(ret != ACCOUNT_ERROR_NONE)
2425 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2429 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2432 ret = account_set_domain_name(account, "Samsung");
2433 if(ret != ACCOUNT_ERROR_NONE)
2435 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2439 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2442 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2443 if(ret != ACCOUNT_ERROR_NONE)
2445 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2449 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2452 ret = account_set_package_name(account, "com.samsung.accounts");
2453 if(ret != ACCOUNT_ERROR_NONE)
2455 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2459 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2462 ret = account_set_icon_path(account, "/test/test.jpg");
2464 if(ret != ACCOUNT_ERROR_NONE)
2466 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2470 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2473 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
2474 if(ret != ACCOUNT_ERROR_NONE)
2476 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2480 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2483 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
2484 if(ret != ACCOUNT_ERROR_NONE)
2486 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2490 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2492 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
2493 if(ret != ACCOUNT_ERROR_NONE)
2495 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2499 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2501 ret = account_insert_to_db(account, &account_id);
2503 if(ret != ACCOUNT_ERROR_NONE)
2505 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2509 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2512 ret = account_destroy(account);
2513 if(ret != ACCOUNT_ERROR_NONE)
2515 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2519 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2521 ret = account_disconnect();
2522 if(ret != ACCOUNT_ERROR_NONE)
2524 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2529 static int utc16_account_insert()
2534 int account_id = -1;
2535 ret = account_connect();
2536 if(ret != ACCOUNT_ERROR_NONE)
2538 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2541 ret = account_create(&account);
2543 printf("account = %p, ret = %d \n", account, ret);
2545 ret = account_set_user_name(account, "tarun.kr");
2546 if(ret != ACCOUNT_ERROR_NONE)
2548 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2552 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2555 ret = account_set_display_name(account, "tarun kumar");
2557 if(ret != ACCOUNT_ERROR_NONE)
2559 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2563 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2566 ret = account_set_domain_name(account, "Samsung");
2567 if(ret != ACCOUNT_ERROR_NONE)
2569 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2573 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2576 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2577 if(ret != ACCOUNT_ERROR_NONE)
2579 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2583 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2586 ret = account_set_package_name(account, "com.samsung.accounts");
2587 if(ret != ACCOUNT_ERROR_NONE)
2589 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2593 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2596 ret = account_set_icon_path(account, "/test/test.jpg");
2598 if(ret != ACCOUNT_ERROR_NONE)
2600 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2604 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2607 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
2608 if(ret != ACCOUNT_ERROR_NONE)
2610 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2614 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2617 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
2618 if(ret != ACCOUNT_ERROR_NONE)
2620 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2624 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2626 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
2627 if(ret != ACCOUNT_ERROR_NONE)
2629 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2633 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2635 ret = account_insert_to_db(account, &account_id);
2637 if(ret != ACCOUNT_ERROR_NONE)
2639 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2643 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2646 ret = account_destroy(account);
2647 if(ret != ACCOUNT_ERROR_NONE)
2649 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2653 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2655 ret = account_disconnect();
2656 if(ret != ACCOUNT_ERROR_NONE)
2658 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2663 static int utc17_account_insert()
2668 int account_id = -1;
2669 ret = account_connect();
2670 if(ret != ACCOUNT_ERROR_NONE)
2672 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2675 ret = account_create(&account);
2677 printf("account = %p, ret = %d \n", account, ret);
2679 ret = account_set_user_name(account, "tarun.kr");
2680 if(ret != ACCOUNT_ERROR_NONE)
2682 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2686 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2689 ret = account_set_display_name(account, "tarun kumar");
2691 if(ret != ACCOUNT_ERROR_NONE)
2693 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2697 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2700 ret = account_set_domain_name(account, "Samsung");
2701 if(ret != ACCOUNT_ERROR_NONE)
2703 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2707 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2710 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2711 if(ret != ACCOUNT_ERROR_NONE)
2713 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2717 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2720 ret = account_set_package_name(account, "com.samsung.accounts");
2721 if(ret != ACCOUNT_ERROR_NONE)
2723 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2727 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2730 ret = account_set_icon_path(account, "/test/test.jpg");
2732 if(ret != ACCOUNT_ERROR_NONE)
2734 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2738 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2741 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
2742 if(ret != ACCOUNT_ERROR_NONE)
2744 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2748 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2751 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
2752 if(ret != ACCOUNT_ERROR_NONE)
2754 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2758 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2760 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
2761 if(ret != ACCOUNT_ERROR_NONE)
2763 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2767 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2770 ret = account_set_source(account, NULL);
2771 if(ret != ACCOUNT_ERROR_NONE)
2773 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2777 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2779 ret = account_insert_to_db(account, &account_id);
2781 if(ret != ACCOUNT_ERROR_NONE)
2783 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2787 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2790 ret = account_destroy(account);
2791 if(ret != ACCOUNT_ERROR_NONE)
2793 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2797 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2799 ret = account_disconnect();
2800 if(ret != ACCOUNT_ERROR_NONE)
2802 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2807 static int utc18_account_insert()
2812 int account_id = -1;
2813 ret = account_connect();
2814 if(ret != ACCOUNT_ERROR_NONE)
2816 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2819 ret = account_create(&account);
2821 printf("account = %p, ret = %d \n", account, ret);
2823 ret = account_set_user_name(account, "tarun.kr");
2824 if(ret != ACCOUNT_ERROR_NONE)
2826 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2830 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2833 ret = account_set_display_name(account, "tarun kumar");
2835 if(ret != ACCOUNT_ERROR_NONE)
2837 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2841 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2844 ret = account_set_domain_name(account, "Samsung");
2845 if(ret != ACCOUNT_ERROR_NONE)
2847 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2851 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2854 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2855 if(ret != ACCOUNT_ERROR_NONE)
2857 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2861 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2864 ret = account_set_package_name(account, "com.samsung.accounts");
2865 if(ret != ACCOUNT_ERROR_NONE)
2867 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2871 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2874 ret = account_set_icon_path(account, "/test/test.jpg");
2876 if(ret != ACCOUNT_ERROR_NONE)
2878 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2882 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2885 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
2886 if(ret != ACCOUNT_ERROR_NONE)
2888 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2892 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2895 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
2896 if(ret != ACCOUNT_ERROR_NONE)
2898 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2902 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2904 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
2905 if(ret != ACCOUNT_ERROR_NONE)
2907 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2911 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2914 ret = account_set_source(account, "URUSA inc.");
2915 if(ret != ACCOUNT_ERROR_NONE)
2917 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2921 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2923 ret = account_insert_to_db(account, &account_id);
2925 if(ret != ACCOUNT_ERROR_NONE)
2927 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2931 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2934 ret = account_destroy(account);
2935 if(ret != ACCOUNT_ERROR_NONE)
2937 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2941 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2943 ret = account_disconnect();
2944 if(ret != ACCOUNT_ERROR_NONE)
2946 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2951 static int utc19_account_insert()
2956 int account_id = -1;
2957 ret = account_connect();
2958 if(ret != ACCOUNT_ERROR_NONE)
2960 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2963 ret = account_create(&account);
2965 printf("account = %p, ret = %d \n", account, ret);
2967 ret = account_set_user_name(account, "tarun.kr");
2968 if(ret != ACCOUNT_ERROR_NONE)
2970 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2974 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2977 ret = account_set_display_name(account, "tarun kumar");
2979 if(ret != ACCOUNT_ERROR_NONE)
2981 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2985 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2988 ret = account_set_domain_name(account, "Samsung");
2989 if(ret != ACCOUNT_ERROR_NONE)
2991 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2995 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2998 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2999 if(ret != ACCOUNT_ERROR_NONE)
3001 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3005 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3008 ret = account_set_package_name(account, "com.samsung.accounts");
3009 if(ret != ACCOUNT_ERROR_NONE)
3011 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3015 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3018 ret = account_set_icon_path(account, "/test/test.jpg");
3020 if(ret != ACCOUNT_ERROR_NONE)
3022 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3026 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3029 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3030 if(ret != ACCOUNT_ERROR_NONE)
3032 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3036 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3039 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3040 if(ret != ACCOUNT_ERROR_NONE)
3042 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3046 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3048 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3049 if(ret != ACCOUNT_ERROR_NONE)
3051 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3055 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3058 ret = account_set_source(account, "URUSA inc.");
3059 if(ret != ACCOUNT_ERROR_NONE)
3061 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3065 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3070 for(i=0; i<USER_TXT_CNT; i++)
3072 ret = account_set_user_text(account, i, NULL);
3073 if(ret != ACCOUNT_ERROR_NONE)
3075 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3079 ret = account_insert_to_db(account, &account_id);
3081 if(ret != ACCOUNT_ERROR_NONE)
3083 printf("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3087 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3090 ret = account_destroy(account);
3091 if(ret != ACCOUNT_ERROR_NONE)
3093 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3097 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3099 ret = account_disconnect();
3100 if(ret != ACCOUNT_ERROR_NONE)
3102 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3107 static int utc20_account_insert()
3112 int account_id = -1;
3113 ret = account_connect();
3114 if(ret != ACCOUNT_ERROR_NONE)
3116 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3119 ret = account_create(&account);
3121 printf("account = %p, ret = %d \n", account, ret);
3123 ret = account_set_user_name(account, "tarun.kr");
3124 if(ret != ACCOUNT_ERROR_NONE)
3126 printf("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3130 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3133 ret = account_set_display_name(account, "tarun kumar");
3135 if(ret != ACCOUNT_ERROR_NONE)
3137 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3141 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3144 ret = account_set_domain_name(account, "Samsung");
3145 if(ret != ACCOUNT_ERROR_NONE)
3147 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3151 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3154 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3155 if(ret != ACCOUNT_ERROR_NONE)
3157 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3161 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3164 ret = account_set_package_name(account, "com.samsung.accounts");
3165 if(ret != ACCOUNT_ERROR_NONE)
3167 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3171 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3174 ret = account_set_icon_path(account, "/test/test.jpg");
3176 if(ret != ACCOUNT_ERROR_NONE)
3178 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3182 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3185 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3186 if(ret != ACCOUNT_ERROR_NONE)
3188 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3192 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3195 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3196 if(ret != ACCOUNT_ERROR_NONE)
3198 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3202 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3204 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3205 if(ret != ACCOUNT_ERROR_NONE)
3207 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3211 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3214 ret = account_set_source(account, "URUSA inc.");
3215 if(ret != ACCOUNT_ERROR_NONE)
3217 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3221 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3226 for(i=0; i<USER_TXT_CNT; i++)
3228 ret = account_set_user_text(account, i, "user txt");
3229 if(ret != ACCOUNT_ERROR_NONE)
3231 printf("(%d)-[Account-else loop] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3235 ret = account_insert_to_db(account, &account_id);
3237 if(ret != ACCOUNT_ERROR_NONE)
3239 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3243 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3246 ret = account_destroy(account);
3247 if(ret != ACCOUNT_ERROR_NONE)
3249 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3253 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3255 ret = account_disconnect();
3256 if(ret != ACCOUNT_ERROR_NONE)
3258 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3263 static int utc21_account_insert()
3268 int account_id = -1;
3269 ret = account_connect();
3270 if(ret != ACCOUNT_ERROR_NONE)
3272 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3275 ret = account_create(&account);
3277 printf("account = %p, ret = %d \n", account, ret);
3279 ret = account_set_user_name(account, "tarun.kr");
3280 if(ret != ACCOUNT_ERROR_NONE)
3282 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3286 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3289 ret = account_set_display_name(account, "tarun kumar");
3291 if(ret != ACCOUNT_ERROR_NONE)
3293 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3297 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3300 ret = account_set_domain_name(account, "Samsung");
3301 if(ret != ACCOUNT_ERROR_NONE)
3303 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3307 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3310 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3311 if(ret != ACCOUNT_ERROR_NONE)
3313 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3317 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3320 ret = account_set_package_name(account, "com.samsung.accounts");
3321 if(ret != ACCOUNT_ERROR_NONE)
3323 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3327 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3330 ret = account_set_icon_path(account, "/test/test.jpg");
3332 if(ret != ACCOUNT_ERROR_NONE)
3334 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3338 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3341 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3342 if(ret != ACCOUNT_ERROR_NONE)
3344 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3348 printf("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3351 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3352 if(ret != ACCOUNT_ERROR_NONE)
3354 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3358 printf("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3360 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3361 if(ret != ACCOUNT_ERROR_NONE)
3363 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3367 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3370 ret = account_set_source(account, "URUSA inc.");
3371 if(ret != ACCOUNT_ERROR_NONE)
3373 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3377 printf("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3382 for(i=0; i<USER_TXT_CNT; i++)
3384 ret = account_set_user_text(account, i, "user txt");
3385 if(ret != ACCOUNT_ERROR_NONE)
3387 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3391 for(i=0;i<USER_INT_CNT;i++)
3393 ret = account_set_user_int(account, i, 000);
3394 if(ret != ACCOUNT_ERROR_NONE)
3396 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3399 ret = account_insert_to_db(account, &account_id);
3401 if(ret != ACCOUNT_ERROR_NONE)
3403 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3407 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3410 ret = account_destroy(account);
3411 if(ret != ACCOUNT_ERROR_NONE)
3413 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3417 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3419 ret = account_disconnect();
3420 if(ret != ACCOUNT_ERROR_NONE)
3422 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3427 static int utc22_account_insert()
3432 int account_id = -1;
3433 ret = account_connect();
3434 if(ret != ACCOUNT_ERROR_NONE)
3436 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3439 ret = account_create(&account);
3441 printf("account = %p, ret = %d \n", account, ret);
3443 ret = account_set_user_name(account, "tarun.kr");
3444 if(ret != ACCOUNT_ERROR_NONE)
3446 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3450 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3453 ret = account_set_display_name(account, "tarun kumar");
3455 if(ret != ACCOUNT_ERROR_NONE)
3457 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3461 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3464 ret = account_set_domain_name(account, "Samsung");
3465 if(ret != ACCOUNT_ERROR_NONE)
3467 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3471 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3474 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3475 if(ret != ACCOUNT_ERROR_NONE)
3477 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3481 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3484 ret = account_set_package_name(account, "com.samsung.accounts");
3485 if(ret != ACCOUNT_ERROR_NONE)
3487 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3491 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3494 ret = account_set_icon_path(account, "/test/test.jpg");
3496 if(ret != ACCOUNT_ERROR_NONE)
3498 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3502 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3505 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3506 if(ret != ACCOUNT_ERROR_NONE)
3508 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3512 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3515 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3516 if(ret != ACCOUNT_ERROR_NONE)
3518 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3522 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3524 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3525 if(ret != ACCOUNT_ERROR_NONE)
3527 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3531 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3534 ret = account_set_source(account, "URUSA inc.");
3535 if(ret != ACCOUNT_ERROR_NONE)
3537 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3541 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3546 for(i=0; i<USER_TXT_CNT; i++)
3548 ret = account_set_user_text(account, i, "user txt");
3549 if(ret != ACCOUNT_ERROR_NONE)
3551 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3556 for(i=0;i<USER_INT_CNT;i++)
3558 ret = account_set_user_int(account, i, 888);
3559 if(ret != ACCOUNT_ERROR_NONE)
3561 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3564 ret = account_insert_to_db(account, &account_id);
3566 if(ret != ACCOUNT_ERROR_NONE)
3568 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3572 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3575 ret = account_destroy(account);
3576 if(ret != ACCOUNT_ERROR_NONE)
3578 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3582 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3584 ret = account_disconnect();
3585 if(ret != ACCOUNT_ERROR_NONE)
3587 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3592 static int utc23_account_insert()
3597 int account_id = -1;
3598 ret = account_connect();
3599 if(ret != ACCOUNT_ERROR_NONE)
3601 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3604 ret = account_create(&account);
3606 printf("account = %p, ret = %d \n", account, ret);
3608 ret = account_set_user_name(account, "tarun.kr");
3609 if(ret != ACCOUNT_ERROR_NONE)
3611 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3615 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3618 ret = account_set_display_name(account, "tarun kumar");
3620 if(ret != ACCOUNT_ERROR_NONE)
3622 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3626 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3629 ret = account_set_domain_name(account, "Samsung");
3630 if(ret != ACCOUNT_ERROR_NONE)
3632 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3636 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3639 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3640 if(ret != ACCOUNT_ERROR_NONE)
3642 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3646 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3649 ret = account_set_package_name(account, "com.samsung.accounts");
3650 if(ret != ACCOUNT_ERROR_NONE)
3652 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3656 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3659 ret = account_set_icon_path(account, "/test/test.jpg");
3661 if(ret != ACCOUNT_ERROR_NONE)
3663 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3667 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3670 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3671 if(ret != ACCOUNT_ERROR_NONE)
3673 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3677 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3680 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3681 if(ret != ACCOUNT_ERROR_NONE)
3683 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3687 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3689 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3690 if(ret != ACCOUNT_ERROR_NONE)
3692 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3696 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3699 ret = account_set_source(account, "URUSA inc.");
3700 if(ret != ACCOUNT_ERROR_NONE)
3702 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3706 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3711 for(i=0; i<USER_TXT_CNT; i++)
3713 ret = account_set_user_text(account, i, "user txt");
3714 if(ret != ACCOUNT_ERROR_NONE)
3716 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3721 for(i=0;i<USER_INT_CNT;i++)
3723 ret = account_set_user_int(account, i, 888);
3724 if(ret != ACCOUNT_ERROR_NONE)
3726 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3730 ret = account_set_capability(account, ACCOUNT_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_ENABLED);
3731 if(ret != ACCOUNT_ERROR_NONE)
3733 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3737 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3739 ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_ENABLED);
3740 if(ret != ACCOUNT_ERROR_NONE)
3742 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3746 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3748 ret = account_set_capability(account, ACCOUNT_CAPABILITY_CALENDAR, ACCOUNT_CAPABILITY_ENABLED);
3749 if(ret != ACCOUNT_ERROR_NONE)
3751 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3755 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3757 ret = account_set_capability(account, -1, ACCOUNT_CAPABILITY_ENABLED);
3758 if(ret != ACCOUNT_ERROR_NONE)
3760 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3764 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3766 ret = account_set_capability(account, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED);
3767 if(ret != ACCOUNT_ERROR_NONE)
3769 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3773 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3775 ret = account_set_capability(account, 0, ACCOUNT_CAPABILITY_ENABLED);
3776 if(ret != ACCOUNT_ERROR_NONE)
3778 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3782 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3784 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_ENABLED);
3785 if(ret != ACCOUNT_ERROR_NONE)
3787 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3791 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3793 ret = account_set_capability(account, -1, ACCOUNT_CAPABILITY_ENABLED);
3794 if(ret != ACCOUNT_ERROR_NONE)
3796 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3800 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3802 ret = account_set_capability(account, ACCOUNT_CAPABILITY_EMAIL, ACCOUNT_CAPABILITY_ENABLED);
3804 if(ret != ACCOUNT_ERROR_NONE)
3806 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3810 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3812 ret = account_set_capability(account, 0, ACCOUNT_CAPABILITY_ENABLED);
3813 if(ret != ACCOUNT_ERROR_NONE)
3815 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3819 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3821 ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_ENABLED);
3822 if(ret != ACCOUNT_ERROR_NONE)
3824 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3828 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3830 ret = account_set_capability(account, -1, ACCOUNT_CAPABILITY_ENABLED);
3831 if(ret != ACCOUNT_ERROR_NONE)
3833 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3837 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3839 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VOIP, ACCOUNT_CAPABILITY_ENABLED);
3840 if(ret != ACCOUNT_ERROR_NONE)
3842 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3846 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3848 ret = account_set_capability(account, 2, ACCOUNT_CAPABILITY_DISABLED);
3849 if(ret != ACCOUNT_ERROR_NONE)
3851 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3855 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3857 if(ret != ACCOUNT_ERROR_NONE)
3859 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3863 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3865 ret = account_set_capability(account, 0, ACCOUNT_CAPABILITY_ENABLED);
3866 if(ret != ACCOUNT_ERROR_NONE)
3868 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3872 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3874 ret = account_set_capability(account, ACCOUNT_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_ENABLED);
3875 if(ret != ACCOUNT_ERROR_NONE)
3877 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3881 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3883 ret = account_set_capability(account, 3, ACCOUNT_CAPABILITY_ENABLED);
3884 if(ret != ACCOUNT_ERROR_NONE)
3886 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3890 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3892 ret = account_set_capability(account, ACCOUNT_CAPABILITY_MOBILE_TRACKER, ACCOUNT_CAPABILITY_ENABLED);
3893 if(ret != ACCOUNT_ERROR_NONE)
3895 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3899 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3901 ret = account_set_capability(account, 5, ACCOUNT_CAPABILITY_ENABLED);
3902 if(ret != ACCOUNT_ERROR_NONE)
3904 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3908 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3911 ret = account_insert_to_db(account, &account_id);
3913 if(ret != ACCOUNT_ERROR_NONE)
3915 printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3919 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3922 ret = account_destroy(account);
3923 if(ret != ACCOUNT_ERROR_NONE)
3925 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3929 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3931 ret = account_disconnect();
3932 if(ret != ACCOUNT_ERROR_NONE)
3934 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3940 static int utc1_account_update()
3945 ret = account_connect();
3946 if(ret != ACCOUNT_ERROR_NONE)
3948 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3951 ret = account_create(&account);
3953 if(ret != ACCOUNT_ERROR_NONE)
3955 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3959 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3962 ret = account_update_to_db_by_id(account, 0);
3964 if(ret != ACCOUNT_ERROR_NONE)
3966 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3970 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3972 ret = account_destroy(account);
3973 if(ret != ACCOUNT_ERROR_NONE)
3975 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3979 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3981 ret = account_disconnect();
3982 if(ret != ACCOUNT_ERROR_NONE)
3984 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3990 static int utc2_account_update()
3995 ret = account_connect();
3996 if(ret != ACCOUNT_ERROR_NONE)
3998 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4001 ret = account_create(&account);
4003 if(ret != ACCOUNT_ERROR_NONE)
4005 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4009 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4012 ret = account_update_to_db_by_id(account, -999);
4014 if(ret != ACCOUNT_ERROR_NONE)
4016 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4020 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4023 ret = account_destroy(account);
4024 if(ret != ACCOUNT_ERROR_NONE)
4026 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4030 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4032 ret = account_disconnect();
4033 if(ret != ACCOUNT_ERROR_NONE)
4035 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4041 static int utc3_account_update()
4046 ret = account_connect();
4047 if(ret != ACCOUNT_ERROR_NONE)
4049 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4052 ret = account_create(&account);
4054 if(ret != ACCOUNT_ERROR_NONE)
4056 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4060 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4063 ret = account_update_to_db_by_id(account, 555);
4065 if(ret != ACCOUNT_ERROR_NONE)
4067 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4071 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4074 ret = account_destroy(account);
4075 if(ret != ACCOUNT_ERROR_NONE)
4077 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4081 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4083 ret = account_disconnect();
4084 if(ret != ACCOUNT_ERROR_NONE)
4086 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4092 static int utc4_account_update()
4097 ret = account_connect();
4098 if(ret != ACCOUNT_ERROR_NONE)
4100 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4103 ret = account_create(&account);
4105 if(ret != ACCOUNT_ERROR_NONE)
4107 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4111 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4114 account_set_user_name(account, NULL);
4116 if(ret != ACCOUNT_ERROR_NONE)
4118 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4122 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4125 ret = account_update_to_db_by_id(account, account_id);
4127 if(ret != ACCOUNT_ERROR_NONE)
4129 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4133 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4136 ret = account_destroy(account);
4137 if(ret != ACCOUNT_ERROR_NONE)
4139 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4143 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4145 ret = account_disconnect();
4146 if(ret != ACCOUNT_ERROR_NONE)
4148 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4154 static int utc5_account_update()
4159 ret = account_connect();
4160 if(ret != ACCOUNT_ERROR_NONE)
4162 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4165 ret = account_create(&account);
4167 if(ret != ACCOUNT_ERROR_NONE)
4169 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4173 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4176 account_set_user_name(account, "updated-tarun.kr");
4178 if(ret != ACCOUNT_ERROR_NONE)
4180 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4184 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4187 ret = account_update_to_db_by_id(account, account_id);
4189 if(ret != ACCOUNT_ERROR_NONE)
4191 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4195 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4198 ret = account_destroy(account);
4199 if(ret != ACCOUNT_ERROR_NONE)
4201 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4205 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4207 ret = account_disconnect();
4208 if(ret != ACCOUNT_ERROR_NONE)
4210 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4216 static int utc6_account_update()
4221 ret = account_connect();
4222 if(ret != ACCOUNT_ERROR_NONE)
4224 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4227 ret = account_create(&account);
4229 if(ret != ACCOUNT_ERROR_NONE)
4231 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4235 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4238 account_set_user_name(account, "updated-tarun.kr");
4240 if(ret != ACCOUNT_ERROR_NONE)
4242 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4246 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4248 ret = account_set_display_name(account, NULL);
4249 if(ret != ACCOUNT_ERROR_NONE)
4251 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4255 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4258 ret = account_update_to_db_by_id(account, account_id);
4260 if(ret != ACCOUNT_ERROR_NONE)
4262 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4266 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4269 ret = account_destroy(account);
4270 if(ret != ACCOUNT_ERROR_NONE)
4272 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4276 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4278 ret = account_disconnect();
4279 if(ret != ACCOUNT_ERROR_NONE)
4281 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4287 static int utc7_account_update()
4292 ret = account_connect();
4293 if(ret != ACCOUNT_ERROR_NONE)
4295 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4298 ret = account_create(&account);
4300 if(ret != ACCOUNT_ERROR_NONE)
4302 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4306 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4309 account_set_user_name(account, "updated-tarun.kr");
4311 if(ret != ACCOUNT_ERROR_NONE)
4313 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4317 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4319 ret = account_set_display_name(account, "updated-tarun kumar");
4320 if(ret != ACCOUNT_ERROR_NONE)
4322 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4326 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4330 ret = account_update_to_db_by_id(account, account_id);
4332 if(ret != ACCOUNT_ERROR_NONE)
4334 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4338 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4341 ret = account_destroy(account);
4342 if(ret != ACCOUNT_ERROR_NONE)
4344 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4348 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4350 ret = account_disconnect();
4351 if(ret != ACCOUNT_ERROR_NONE)
4353 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4359 static int utc8_account_update()
4364 ret = account_connect();
4365 if(ret != ACCOUNT_ERROR_NONE)
4367 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4370 ret = account_create(&account);
4372 if(ret != ACCOUNT_ERROR_NONE)
4374 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4378 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4381 account_set_user_name(account, "updated-tarun.kr");
4383 if(ret != ACCOUNT_ERROR_NONE)
4385 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4389 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4391 ret = account_set_display_name(account, "updated-tarun kumar");
4392 if(ret != ACCOUNT_ERROR_NONE)
4394 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4398 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4400 ret = account_set_domain_name(account, NULL);
4401 if(ret != ACCOUNT_ERROR_NONE)
4403 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4407 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4409 ret = account_set_domain_name(account, NULL);
4410 if(ret != ACCOUNT_ERROR_NONE)
4412 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4416 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4419 ret = account_update_to_db_by_id(account, account_id);
4421 if(ret != ACCOUNT_ERROR_NONE)
4423 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4427 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4430 ret = account_destroy(account);
4431 if(ret != ACCOUNT_ERROR_NONE)
4433 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4437 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4439 ret = account_disconnect();
4440 if(ret != ACCOUNT_ERROR_NONE)
4442 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4447 static int utc9_account_update()
4452 ret = account_connect();
4453 if(ret != ACCOUNT_ERROR_NONE)
4455 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4458 ret = account_create(&account);
4460 if(ret != ACCOUNT_ERROR_NONE)
4462 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4466 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4469 account_set_user_name(account, "updated-tarun.kr");
4471 if(ret != ACCOUNT_ERROR_NONE)
4473 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4477 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4479 ret = account_set_display_name(account, "updated-tarun kumar");
4480 if(ret != ACCOUNT_ERROR_NONE)
4482 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4486 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4488 ret = account_set_domain_name(account, "updated-Samsung Facebook");
4489 if(ret != ACCOUNT_ERROR_NONE)
4491 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4495 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4498 ret = account_update_to_db_by_id(account, account_id);
4500 if(ret != ACCOUNT_ERROR_NONE)
4502 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4506 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4509 ret = account_destroy(account);
4510 if(ret != ACCOUNT_ERROR_NONE)
4512 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4516 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4518 ret = account_disconnect();
4519 if(ret != ACCOUNT_ERROR_NONE)
4521 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4527 static int utc10_account_update()
4532 ret = account_connect();
4533 if(ret != ACCOUNT_ERROR_NONE)
4535 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4538 ret = account_create(&account);
4540 if(ret != ACCOUNT_ERROR_NONE)
4542 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4546 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4549 account_set_user_name(account, "updated-tarun.kr");
4551 if(ret != ACCOUNT_ERROR_NONE)
4553 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4557 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4559 ret = account_set_display_name(account, "updated-tarun kumar");
4560 if(ret != ACCOUNT_ERROR_NONE)
4562 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4566 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4568 ret = account_set_domain_name(account, "updated-Samsung Facebook");
4569 if(ret != ACCOUNT_ERROR_NONE)
4571 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4575 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4577 ret = account_set_email_address(account, NULL);
4578 if(ret != ACCOUNT_ERROR_NONE)
4580 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4584 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4587 ret = account_update_to_db_by_id(account, account_id);
4589 if(ret != ACCOUNT_ERROR_NONE)
4591 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4595 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4598 ret = account_destroy(account);
4599 if(ret != ACCOUNT_ERROR_NONE)
4601 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4605 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4607 ret = account_disconnect();
4608 if(ret != ACCOUNT_ERROR_NONE)
4610 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4616 static int utc11_account_update()
4621 ret = account_connect();
4622 if(ret != ACCOUNT_ERROR_NONE)
4624 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4627 ret = account_create(&account);
4629 if(ret != ACCOUNT_ERROR_NONE)
4631 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4635 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4638 account_set_user_name(account, "updated-tarun.kr");
4640 if(ret != ACCOUNT_ERROR_NONE)
4642 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4646 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4648 ret = account_set_display_name(account, "updated-tarun kumar");
4649 if(ret != ACCOUNT_ERROR_NONE)
4651 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4655 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4657 ret = account_set_domain_name(account, "updated-Samsung Facebook");
4658 if(ret != ACCOUNT_ERROR_NONE)
4660 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4664 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4666 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
4667 if(ret != ACCOUNT_ERROR_NONE)
4669 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4673 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4676 ret = account_update_to_db_by_id(account, account_id);
4678 if(ret != ACCOUNT_ERROR_NONE)
4680 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4684 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4687 ret = account_destroy(account);
4688 if(ret != ACCOUNT_ERROR_NONE)
4690 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4694 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4696 ret = account_disconnect();
4697 if(ret != ACCOUNT_ERROR_NONE)
4699 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4705 static int utc12_account_update()
4710 ret = account_connect();
4711 if(ret != ACCOUNT_ERROR_NONE)
4713 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4716 ret = account_create(&account);
4718 if(ret != ACCOUNT_ERROR_NONE)
4720 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4724 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4727 account_set_user_name(account, "updated-tarun.kr");
4729 if(ret != ACCOUNT_ERROR_NONE)
4731 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4735 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4737 ret = account_set_display_name(account, "updated-tarun kumar");
4738 if(ret != ACCOUNT_ERROR_NONE)
4740 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4744 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4746 ret = account_set_domain_name(account, "updated-Samsung Facebook");
4747 if(ret != ACCOUNT_ERROR_NONE)
4749 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4753 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4755 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
4756 if(ret != ACCOUNT_ERROR_NONE)
4758 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4762 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4764 ret = account_set_package_name(account, NULL);
4765 if(ret != ACCOUNT_ERROR_NONE)
4767 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4771 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4774 ret = account_update_to_db_by_id(account, account_id);
4776 if(ret != ACCOUNT_ERROR_NONE)
4778 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4782 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4785 ret = account_destroy(account);
4786 if(ret != ACCOUNT_ERROR_NONE)
4788 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4792 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4794 ret = account_disconnect();
4795 if(ret != ACCOUNT_ERROR_NONE)
4797 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4803 static int utc13_account_update()
4808 ret = account_connect();
4809 if(ret != ACCOUNT_ERROR_NONE)
4811 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4814 ret = account_create(&account);
4816 if(ret != ACCOUNT_ERROR_NONE)
4818 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4822 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4825 account_set_user_name(account, "updated-tarun.kr");
4827 if(ret != ACCOUNT_ERROR_NONE)
4829 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4833 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4835 ret = account_set_display_name(account, "updated-tarun kumar");
4836 if(ret != ACCOUNT_ERROR_NONE)
4838 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4842 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4844 ret = account_set_domain_name(account, "updated-Samsung Facebook");
4845 if(ret != ACCOUNT_ERROR_NONE)
4847 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4851 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4853 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
4854 if(ret != ACCOUNT_ERROR_NONE)
4856 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4860 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4862 ret = account_set_package_name(account, "updated-com.samsung.account");
4863 if(ret != ACCOUNT_ERROR_NONE)
4865 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4869 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4872 ret = account_update_to_db_by_id(account, account_id);
4874 if(ret != ACCOUNT_ERROR_NONE)
4876 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4880 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4883 ret = account_destroy(account);
4884 if(ret != ACCOUNT_ERROR_NONE)
4886 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4890 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4892 ret = account_disconnect();
4893 if(ret != ACCOUNT_ERROR_NONE)
4895 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4901 static int utc14_account_update()
4906 ret = account_connect();
4907 if(ret != ACCOUNT_ERROR_NONE)
4909 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4912 ret = account_create(&account);
4914 if(ret != ACCOUNT_ERROR_NONE)
4916 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4920 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4923 account_set_user_name(account, "updated-tarun.kr");
4925 if(ret != ACCOUNT_ERROR_NONE)
4927 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4931 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4933 ret = account_set_display_name(account, "updated-tarun kumar");
4934 if(ret != ACCOUNT_ERROR_NONE)
4936 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4940 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4942 ret = account_set_domain_name(account, "updated-Samsung Facebook");
4943 if(ret != ACCOUNT_ERROR_NONE)
4945 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4949 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4951 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
4952 if(ret != ACCOUNT_ERROR_NONE)
4954 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4958 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4960 ret = account_set_package_name(account, "updated-com.samsung.account");
4961 if(ret != ACCOUNT_ERROR_NONE)
4963 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4967 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4969 ret = account_set_icon_path(account, NULL);
4970 if(ret != ACCOUNT_ERROR_NONE)
4972 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4976 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4979 ret = account_update_to_db_by_id(account, account_id);
4981 if(ret != ACCOUNT_ERROR_NONE)
4983 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4987 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4990 ret = account_destroy(account);
4991 if(ret != ACCOUNT_ERROR_NONE)
4993 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4997 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4999 ret = account_disconnect();
5000 if(ret != ACCOUNT_ERROR_NONE)
5002 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5008 static int utc15_account_update()
5013 ret = account_connect();
5014 if(ret != ACCOUNT_ERROR_NONE)
5016 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5019 ret = account_create(&account);
5021 if(ret != ACCOUNT_ERROR_NONE)
5023 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5027 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5030 account_set_user_name(account, "updated-tarun.kr");
5032 if(ret != ACCOUNT_ERROR_NONE)
5034 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5038 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5040 ret = account_set_display_name(account, "updated-tarun kumar");
5041 if(ret != ACCOUNT_ERROR_NONE)
5043 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5047 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5049 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5050 if(ret != ACCOUNT_ERROR_NONE)
5052 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5056 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5058 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5059 if(ret != ACCOUNT_ERROR_NONE)
5061 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5065 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5067 ret = account_set_package_name(account, "updated-com.samsung.account");
5068 if(ret != ACCOUNT_ERROR_NONE)
5070 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5074 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5076 ret = account_set_icon_path(account, "updated-icon-path");
5077 if(ret != ACCOUNT_ERROR_NONE)
5079 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5083 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5086 ret = account_update_to_db_by_id(account, account_id);
5088 if(ret != ACCOUNT_ERROR_NONE)
5090 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5094 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5097 ret = account_destroy(account);
5098 if(ret != ACCOUNT_ERROR_NONE)
5100 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5104 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5106 ret = account_disconnect();
5107 if(ret != ACCOUNT_ERROR_NONE)
5109 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5115 static int utc16_account_update()
5120 ret = account_connect();
5121 if(ret != ACCOUNT_ERROR_NONE)
5123 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5126 ret = account_create(&account);
5128 if(ret != ACCOUNT_ERROR_NONE)
5130 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5134 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5137 account_set_user_name(account, "updated-tarun.kr");
5139 if(ret != ACCOUNT_ERROR_NONE)
5141 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5145 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5147 ret = account_set_display_name(account, "updated-tarun kumar");
5148 if(ret != ACCOUNT_ERROR_NONE)
5150 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5154 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5156 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5157 if(ret != ACCOUNT_ERROR_NONE)
5159 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5163 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5165 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5166 if(ret != ACCOUNT_ERROR_NONE)
5168 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5172 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5174 ret = account_set_package_name(account, "updated-com.samsung.account");
5175 if(ret != ACCOUNT_ERROR_NONE)
5177 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5181 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5183 ret = account_set_icon_path(account, "updated-icon-path");
5184 if(ret != ACCOUNT_ERROR_NONE)
5186 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5190 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5192 ret = account_set_access_token(account, NULL);
5193 if(ret != ACCOUNT_ERROR_NONE)
5195 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5199 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5202 ret = account_update_to_db_by_id(account, account_id);
5204 if(ret != ACCOUNT_ERROR_NONE)
5206 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5210 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5213 ret = account_destroy(account);
5214 if(ret != ACCOUNT_ERROR_NONE)
5216 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5220 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5222 ret = account_disconnect();
5223 if(ret != ACCOUNT_ERROR_NONE)
5225 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5231 static int utc17_account_update()
5236 ret = account_connect();
5237 if(ret != ACCOUNT_ERROR_NONE)
5239 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5242 ret = account_create(&account);
5244 if(ret != ACCOUNT_ERROR_NONE)
5246 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5250 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5253 account_set_user_name(account, "updated-tarun.kr");
5255 if(ret != ACCOUNT_ERROR_NONE)
5257 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5261 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5263 ret = account_set_display_name(account, "updated-tarun kumar");
5264 if(ret != ACCOUNT_ERROR_NONE)
5266 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5270 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5272 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5273 if(ret != ACCOUNT_ERROR_NONE)
5275 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5279 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5281 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5282 if(ret != ACCOUNT_ERROR_NONE)
5284 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5288 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5290 ret = account_set_package_name(account, "updated-com.samsung.account");
5291 if(ret != ACCOUNT_ERROR_NONE)
5293 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5297 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5299 ret = account_set_icon_path(account, "updated-icon-path");
5300 if(ret != ACCOUNT_ERROR_NONE)
5302 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5306 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5308 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
5309 if(ret != ACCOUNT_ERROR_NONE)
5311 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5315 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5318 ret = account_update_to_db_by_id(account, account_id);
5320 if(ret != ACCOUNT_ERROR_NONE)
5322 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5326 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5329 ret = account_destroy(account);
5330 if(ret != ACCOUNT_ERROR_NONE)
5332 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5336 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5338 ret = account_disconnect();
5339 if(ret != ACCOUNT_ERROR_NONE)
5341 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5347 static int utc18_account_update()
5352 ret = account_connect();
5353 if(ret != ACCOUNT_ERROR_NONE)
5355 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5358 ret = account_create(&account);
5360 if(ret != ACCOUNT_ERROR_NONE)
5362 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5366 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5369 account_set_user_name(account, "updated-tarun.kr");
5371 if(ret != ACCOUNT_ERROR_NONE)
5373 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5377 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5379 ret = account_set_display_name(account, "updated-tarun kumar");
5380 if(ret != ACCOUNT_ERROR_NONE)
5382 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5386 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5388 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5389 if(ret != ACCOUNT_ERROR_NONE)
5391 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5395 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5397 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5398 if(ret != ACCOUNT_ERROR_NONE)
5400 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5404 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5406 ret = account_set_package_name(account, "updated-com.samsung.account");
5407 if(ret != ACCOUNT_ERROR_NONE)
5409 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5413 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5415 ret = account_set_icon_path(account, "updated-icon-path");
5416 if(ret != ACCOUNT_ERROR_NONE)
5418 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5422 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5424 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
5425 if(ret != ACCOUNT_ERROR_NONE)
5427 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5431 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5433 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
5434 if(ret != ACCOUNT_ERROR_NONE)
5436 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5440 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5442 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
5443 if(ret != ACCOUNT_ERROR_NONE)
5445 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5449 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5452 ret = account_update_to_db_by_id(account, account_id);
5454 if(ret != ACCOUNT_ERROR_NONE)
5456 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5460 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5463 ret = account_destroy(account);
5464 if(ret != ACCOUNT_ERROR_NONE)
5466 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5470 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5472 ret = account_disconnect();
5473 if(ret != ACCOUNT_ERROR_NONE)
5475 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5481 static int utc19_account_update()
5486 ret = account_connect();
5487 if(ret != ACCOUNT_ERROR_NONE)
5489 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5492 ret = account_create(&account);
5494 if(ret != ACCOUNT_ERROR_NONE)
5496 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5500 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5503 account_set_user_name(account, "updated-tarun.kr");
5505 if(ret != ACCOUNT_ERROR_NONE)
5507 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5511 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5513 ret = account_set_display_name(account, "updated-tarun kumar");
5514 if(ret != ACCOUNT_ERROR_NONE)
5516 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5520 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5522 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5523 if(ret != ACCOUNT_ERROR_NONE)
5525 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5529 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5531 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5532 if(ret != ACCOUNT_ERROR_NONE)
5534 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5538 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5540 ret = account_set_package_name(account, "updated-com.samsung.account");
5541 if(ret != ACCOUNT_ERROR_NONE)
5543 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5547 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5549 ret = account_set_icon_path(account, "updated-icon-path");
5550 if(ret != ACCOUNT_ERROR_NONE)
5552 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5556 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5558 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
5559 if(ret != ACCOUNT_ERROR_NONE)
5561 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5565 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5567 ret = account_set_source(account, NULL);
5568 if(ret != ACCOUNT_ERROR_NONE)
5570 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5574 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5577 ret = account_update_to_db_by_id(account, account_id);
5579 if(ret != ACCOUNT_ERROR_NONE)
5581 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5585 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5588 ret = account_destroy(account);
5589 if(ret != ACCOUNT_ERROR_NONE)
5591 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5595 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5597 ret = account_disconnect();
5598 if(ret != ACCOUNT_ERROR_NONE)
5600 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5606 static int utc20_account_update()
5611 ret = account_connect();
5612 if(ret != ACCOUNT_ERROR_NONE)
5614 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5617 ret = account_create(&account);
5619 if(ret != ACCOUNT_ERROR_NONE)
5621 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5625 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5628 account_set_user_name(account, "updated-tarun.kr");
5630 if(ret != ACCOUNT_ERROR_NONE)
5632 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5636 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5638 ret = account_set_display_name(account, "updated-tarun kumar");
5639 if(ret != ACCOUNT_ERROR_NONE)
5641 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5645 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5647 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5648 if(ret != ACCOUNT_ERROR_NONE)
5650 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5654 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5656 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5657 if(ret != ACCOUNT_ERROR_NONE)
5659 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5663 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5665 ret = account_set_package_name(account, "updated-com.samsung.account");
5666 if(ret != ACCOUNT_ERROR_NONE)
5668 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5672 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5674 ret = account_set_icon_path(account, "updated-icon-path");
5675 if(ret != ACCOUNT_ERROR_NONE)
5677 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5681 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5683 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
5684 if(ret != ACCOUNT_ERROR_NONE)
5686 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5690 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5692 ret = account_set_source(account, "updated-URUSA inc.");
5693 if(ret != ACCOUNT_ERROR_NONE)
5695 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5699 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5702 ret = account_update_to_db_by_id(account, account_id);
5704 if(ret != ACCOUNT_ERROR_NONE)
5706 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5710 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5713 ret = account_destroy(account);
5714 if(ret != ACCOUNT_ERROR_NONE)
5716 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5720 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5722 ret = account_disconnect();
5723 if(ret != ACCOUNT_ERROR_NONE)
5725 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5731 static int utc21_account_update()
5736 ret = account_connect();
5737 if(ret != ACCOUNT_ERROR_NONE)
5739 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5742 ret = account_create(&account);
5744 if(ret != ACCOUNT_ERROR_NONE)
5746 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5750 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5753 account_set_user_name(account, "updated-tarun.kr");
5755 if(ret != ACCOUNT_ERROR_NONE)
5757 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5761 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5763 ret = account_set_display_name(account, "updated-tarun kumar");
5764 if(ret != ACCOUNT_ERROR_NONE)
5766 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5770 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5772 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5773 if(ret != ACCOUNT_ERROR_NONE)
5775 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5779 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5781 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5782 if(ret != ACCOUNT_ERROR_NONE)
5784 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5788 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5790 ret = account_set_package_name(account, "updated-com.samsung.account");
5791 if(ret != ACCOUNT_ERROR_NONE)
5793 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5797 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5799 ret = account_set_icon_path(account, "updated-icon-path");
5800 if(ret != ACCOUNT_ERROR_NONE)
5802 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5806 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5808 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
5809 if(ret != ACCOUNT_ERROR_NONE)
5811 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5815 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5817 ret = account_set_source(account, "updated-URUSA inc.");
5818 if(ret != ACCOUNT_ERROR_NONE)
5820 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5824 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5828 for(i=0;i<USER_TXT_CNT;i++)
5830 ret = account_set_user_text(account, i, NULL);
5831 if(ret != ACCOUNT_ERROR_NONE)
5833 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
5838 ret = account_update_to_db_by_id(account, account_id);
5840 if(ret != ACCOUNT_ERROR_NONE)
5842 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5846 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5849 ret = account_destroy(account);
5850 if(ret != ACCOUNT_ERROR_NONE)
5852 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5856 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5858 ret = account_disconnect();
5859 if(ret != ACCOUNT_ERROR_NONE)
5861 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5867 static int utc22_account_update()
5872 ret = account_connect();
5873 if(ret != ACCOUNT_ERROR_NONE)
5875 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5878 ret = account_create(&account);
5880 if(ret != ACCOUNT_ERROR_NONE)
5882 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5886 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5889 account_set_user_name(account, "updated-tarun.kr");
5891 if(ret != ACCOUNT_ERROR_NONE)
5893 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5897 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5899 ret = account_set_display_name(account, "updated-tarun kumar");
5900 if(ret != ACCOUNT_ERROR_NONE)
5902 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5906 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5908 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5909 if(ret != ACCOUNT_ERROR_NONE)
5911 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5915 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5917 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5918 if(ret != ACCOUNT_ERROR_NONE)
5920 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5924 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5926 ret = account_set_package_name(account, "updated-com.samsung.account");
5927 if(ret != ACCOUNT_ERROR_NONE)
5929 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5933 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5935 ret = account_set_icon_path(account, "updated-icon-path");
5936 if(ret != ACCOUNT_ERROR_NONE)
5938 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5942 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5944 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
5945 if(ret != ACCOUNT_ERROR_NONE)
5947 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5951 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5953 ret = account_set_source(account, "updated-URUSA inc.");
5954 if(ret != ACCOUNT_ERROR_NONE)
5956 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5960 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5963 for(i=0;i<USER_TXT_CNT;i++)
5965 ret = account_set_user_text(account, i, "updated-user txt");
5966 if(ret != ACCOUNT_ERROR_NONE)
5968 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
5973 ret = account_update_to_db_by_id(account, account_id);
5975 if(ret != ACCOUNT_ERROR_NONE)
5977 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5981 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5984 ret = account_destroy(account);
5985 if(ret != ACCOUNT_ERROR_NONE)
5987 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5991 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5993 ret = account_disconnect();
5994 if(ret != ACCOUNT_ERROR_NONE)
5996 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6002 static int utc23_account_update()
6007 ret = account_connect();
6008 if(ret != ACCOUNT_ERROR_NONE)
6010 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6013 ret = account_create(&account);
6015 if(ret != ACCOUNT_ERROR_NONE)
6017 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6021 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6024 account_set_user_name(account, "updated-tarun.kr");
6026 if(ret != ACCOUNT_ERROR_NONE)
6028 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6032 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6034 ret = account_set_display_name(account, "updated-tarun kumar");
6035 if(ret != ACCOUNT_ERROR_NONE)
6037 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6041 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6043 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6044 if(ret != ACCOUNT_ERROR_NONE)
6046 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6050 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6052 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6053 if(ret != ACCOUNT_ERROR_NONE)
6055 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6059 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6061 ret = account_set_package_name(account, "updated-com.samsung.account");
6062 if(ret != ACCOUNT_ERROR_NONE)
6064 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6068 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6070 ret = account_set_icon_path(account, "updated-icon-path");
6071 if(ret != ACCOUNT_ERROR_NONE)
6073 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6077 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6079 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6080 if(ret != ACCOUNT_ERROR_NONE)
6082 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6086 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6088 ret = account_set_source(account, "updated-URUSA inc.");
6089 if(ret != ACCOUNT_ERROR_NONE)
6091 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6095 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6098 for(i=0;i<USER_TXT_CNT;i++)
6100 ret = account_set_user_text(account, i, "updated-user txt");
6101 if(ret != ACCOUNT_ERROR_NONE)
6103 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6107 for(i=0;i<USER_INT_CNT;i++)
6109 ret = account_set_user_int(account, i, -111);
6110 if(ret != ACCOUNT_ERROR_NONE)
6112 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6116 ret = account_update_to_db_by_id(account, account_id);
6118 if(ret != ACCOUNT_ERROR_NONE)
6120 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6124 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6127 ret = account_destroy(account);
6128 if(ret != ACCOUNT_ERROR_NONE)
6130 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6134 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6136 ret = account_disconnect();
6137 if(ret != ACCOUNT_ERROR_NONE)
6139 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6145 static int utc24_account_update()
6150 ret = account_connect();
6151 if(ret != ACCOUNT_ERROR_NONE)
6153 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6156 ret = account_create(&account);
6158 if(ret != ACCOUNT_ERROR_NONE)
6160 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6164 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6167 account_set_user_name(account, "updated-tarun.kr");
6169 if(ret != ACCOUNT_ERROR_NONE)
6171 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6175 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6177 ret = account_set_display_name(account, "updated-tarun kumar");
6178 if(ret != ACCOUNT_ERROR_NONE)
6180 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6184 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6186 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6187 if(ret != ACCOUNT_ERROR_NONE)
6189 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6193 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6195 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6196 if(ret != ACCOUNT_ERROR_NONE)
6198 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6202 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6204 ret = account_set_package_name(account, "updated-com.samsung.account");
6205 if(ret != ACCOUNT_ERROR_NONE)
6207 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6211 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6213 ret = account_set_icon_path(account, "updated-icon-path");
6214 if(ret != ACCOUNT_ERROR_NONE)
6216 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6220 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6222 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6223 if(ret != ACCOUNT_ERROR_NONE)
6225 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6229 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6231 ret = account_set_source(account, "updated-URUSA inc.");
6232 if(ret != ACCOUNT_ERROR_NONE)
6234 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6238 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6241 for(i=0;i<USER_TXT_CNT;i++)
6243 ret = account_set_user_text(account, i, "updated-user txt");
6244 if(ret != ACCOUNT_ERROR_NONE)
6246 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6250 for(i=0;i<USER_INT_CNT;i++)
6252 ret = account_set_user_int(account, i, 0);
6253 if(ret != ACCOUNT_ERROR_NONE)
6255 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6259 ret = account_update_to_db_by_id(account, account_id);
6261 if(ret != ACCOUNT_ERROR_NONE)
6263 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6267 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6270 ret = account_destroy(account);
6271 if(ret != ACCOUNT_ERROR_NONE)
6273 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6277 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6279 ret = account_disconnect();
6280 if(ret != ACCOUNT_ERROR_NONE)
6282 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6288 static int utc25_account_update()
6293 ret = account_connect();
6294 if(ret != ACCOUNT_ERROR_NONE)
6296 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6299 ret = account_create(&account);
6301 if(ret != ACCOUNT_ERROR_NONE)
6303 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6307 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6310 account_set_user_name(account, "updated-tarun.kr");
6312 if(ret != ACCOUNT_ERROR_NONE)
6314 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6318 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6320 ret = account_set_display_name(account, "updated-tarun kumar");
6321 if(ret != ACCOUNT_ERROR_NONE)
6323 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6327 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6329 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6330 if(ret != ACCOUNT_ERROR_NONE)
6332 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6336 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6338 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6339 if(ret != ACCOUNT_ERROR_NONE)
6341 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6345 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6347 ret = account_set_package_name(account, "updated-com.samsung.account");
6348 if(ret != ACCOUNT_ERROR_NONE)
6350 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6354 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6356 ret = account_set_icon_path(account, "updated-icon-path");
6357 if(ret != ACCOUNT_ERROR_NONE)
6359 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6363 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6365 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6366 if(ret != ACCOUNT_ERROR_NONE)
6368 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6372 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6374 ret = account_set_source(account, "updated-URUSA inc.");
6375 if(ret != ACCOUNT_ERROR_NONE)
6377 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6381 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6384 for(i=0;i<USER_TXT_CNT;i++)
6386 ret = account_set_user_text(account, i, "updated-user txt");
6387 if(ret != ACCOUNT_ERROR_NONE)
6389 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6393 for(i=0;i<USER_INT_CNT;i++)
6395 ret = account_set_user_int(account, i, 111);
6396 if(ret != ACCOUNT_ERROR_NONE)
6398 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6402 ret = account_update_to_db_by_id(account, account_id);
6404 if(ret != ACCOUNT_ERROR_NONE)
6406 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6410 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6413 ret = account_destroy(account);
6414 if(ret != ACCOUNT_ERROR_NONE)
6416 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6420 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6422 ret = account_disconnect();
6423 if(ret != ACCOUNT_ERROR_NONE)
6425 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6431 static int utc26_account_update()
6436 ret = account_connect();
6437 if(ret != ACCOUNT_ERROR_NONE)
6439 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6442 ret = account_create(&account);
6444 if(ret != ACCOUNT_ERROR_NONE)
6446 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6450 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6453 account_set_user_name(account, "updated-tarun.kr");
6455 if(ret != ACCOUNT_ERROR_NONE)
6457 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6461 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6463 ret = account_set_display_name(account, "updated-tarun kumar");
6464 if(ret != ACCOUNT_ERROR_NONE)
6466 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6470 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6472 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6473 if(ret != ACCOUNT_ERROR_NONE)
6475 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6479 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6481 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6482 if(ret != ACCOUNT_ERROR_NONE)
6484 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6488 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6490 ret = account_set_package_name(account, "updated-com.samsung.account");
6491 if(ret != ACCOUNT_ERROR_NONE)
6493 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6497 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6499 ret = account_set_icon_path(account, "updated-icon-path");
6500 if(ret != ACCOUNT_ERROR_NONE)
6502 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6506 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6508 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6509 if(ret != ACCOUNT_ERROR_NONE)
6511 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6515 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6517 ret = account_set_source(account, "updated-URUSA inc.");
6518 if(ret != ACCOUNT_ERROR_NONE)
6520 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6524 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6527 for(i=0;i<USER_TXT_CNT;i++)
6529 ret = account_set_user_text(account, i, "updated-user txt");
6530 if(ret != ACCOUNT_ERROR_NONE)
6532 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6536 for(i=0;i<USER_INT_CNT;i++)
6538 ret = account_set_user_int(account, i, 111);
6539 if(ret != ACCOUNT_ERROR_NONE)
6541 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6545 ret = account_update_to_db_by_id(account, account_id);
6547 if(ret != ACCOUNT_ERROR_NONE)
6549 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6553 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6556 ret = account_destroy(account);
6557 if(ret != ACCOUNT_ERROR_NONE)
6559 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6563 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6565 ret = account_disconnect();
6566 if(ret != ACCOUNT_ERROR_NONE)
6568 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6574 static int utc27_account_update()
6579 ret = account_connect();
6580 if(ret != ACCOUNT_ERROR_NONE)
6582 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6585 ret = account_create(&account);
6587 if(ret != ACCOUNT_ERROR_NONE)
6589 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6593 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6596 account_set_user_name(account, "updated-tarun.kr");
6598 if(ret != ACCOUNT_ERROR_NONE)
6600 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6604 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6606 ret = account_set_display_name(account, "updated-tarun kumar");
6607 if(ret != ACCOUNT_ERROR_NONE)
6609 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6613 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6615 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6616 if(ret != ACCOUNT_ERROR_NONE)
6618 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6622 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6624 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6625 if(ret != ACCOUNT_ERROR_NONE)
6627 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6631 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6633 ret = account_set_package_name(account, "updated-com.samsung.account");
6634 if(ret != ACCOUNT_ERROR_NONE)
6636 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6640 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6642 ret = account_set_icon_path(account, "updated-icon-path");
6643 if(ret != ACCOUNT_ERROR_NONE)
6645 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6649 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6651 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6652 if(ret != ACCOUNT_ERROR_NONE)
6654 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6658 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6660 ret = account_set_source(account, "updated-URUSA inc.");
6661 if(ret != ACCOUNT_ERROR_NONE)
6663 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6667 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6670 for(i=0;i<USER_TXT_CNT;i++)
6672 ret = account_set_user_text(account, i, "updated-user txt");
6673 if(ret != ACCOUNT_ERROR_NONE)
6675 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6679 for(i=0;i<USER_INT_CNT;i++)
6681 ret = account_set_user_int(account, i, 111);
6682 if(ret != ACCOUNT_ERROR_NONE)
6684 printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6687 ret = account_set_capability(account, ACCOUNT_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_ENABLED);
6688 ret = account_set_capability(account, ACCOUNT_CAPABILITY_CALENDAR, ACCOUNT_CAPABILITY_ENABLED);
6689 ret = account_set_capability(account, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED);
6690 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_ENABLED);
6691 ret = account_set_capability(account, ACCOUNT_CAPABILITY_EMAIL, ACCOUNT_CAPABILITY_ENABLED);
6692 ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_ENABLED);
6693 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VOIP, ACCOUNT_CAPABILITY_ENABLED);
6694 ret = account_set_capability(account, ACCOUNT_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_ENABLED);
6695 ret = account_set_capability(account, ACCOUNT_CAPABILITY_MOBILE_TRACKER, ACCOUNT_CAPABILITY_ENABLED);
6696 ret = account_set_capability(account, 0, ACCOUNT_CAPABILITY_ENABLED);
6697 ret = account_set_capability(account, -1, ACCOUNT_CAPABILITY_ENABLED);
6698 ret = account_set_capability(account, 1, ACCOUNT_CAPABILITY_ENABLED);
6700 ret = account_update_to_db_by_id(account, account_id);
6702 if(ret != ACCOUNT_ERROR_NONE)
6704 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6708 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6711 ret = account_destroy(account);
6712 if(ret != ACCOUNT_ERROR_NONE)
6714 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6718 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6720 ret = account_disconnect();
6721 if(ret != ACCOUNT_ERROR_NONE)
6723 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6729 bool _utc1_account_get_callback(account_h handle, void* user_data)
6731 printf("_account_get_callback handle = %s , user_data = %s \n", (char *)handle, (char *)user_data);
6733 char **test_text = NULL;
6735 account_get_user_name(handle, test_text);
6736 printf("_account_get_callback : %s\n", *test_text);
6738 _account_free_text(*test_text);
6740 account_get_display_name(handle, test_text);
6741 printf("_account_get_callback : %s\n", *test_text);
6743 _account_free_text(*test_text);
6745 account_get_email_address(handle, test_text);
6746 printf("_account_get_callback : %s\n", *test_text);
6748 _account_free_text(*test_text);
6750 account_get_icon_path(handle, test_text);
6751 printf("_account_get_callback : %s\n", *test_text);
6753 _account_free_text(*test_text);
6755 account_get_source(handle, test_text);
6756 printf("_account_get_callback : %s\n", *test_text);
6758 _account_free_text(*test_text);
6760 account_get_package_name(handle, test_text);
6761 printf("_account_get_callback : %s\n", *test_text);
6763 _account_free_text(*test_text);
6765 account_get_domain_name(handle, test_text);
6766 printf("_account_get_callback : %s\n", *test_text);
6768 _account_free_text(*test_text);
6770 account_get_access_token(handle, test_text);
6771 printf("_account_get_callback : %s\n", *test_text);
6775 for(i=0;i<USER_TXT_CNT;i++)
6777 _account_free_text(*test_text);
6778 account_get_user_text(handle, i, test_text);
6779 printf("_account_get_callback : %s\n", *test_text);
6782 int *test_int = NULL;
6784 account_auth_type_e auth_type;
6785 account_get_auth_type(handle, &auth_type);
6786 printf("account_get_auth_type : %d\n", auth_type);
6788 account_secrecy_state_e secret;
6789 account_get_secret(handle, &secret);
6790 printf("account_get_secret : %d\n", secret);
6792 account_sync_state_e sync_support;
6793 account_get_sync_support(handle, &sync_support);
6794 printf("account_get_sync_support : %d\n", sync_support);
6796 for(i=0;i<USER_INT_CNT;i++)
6798 account_get_user_int(handle, i, test_int);
6799 printf("_account_get_callback : %d\n", *test_int);
6802 account_get_capability(handle, _capability_get_callback, NULL);
6808 static int utc1_get_account_by_id()
6813 ret = account_connect();
6814 if(ret != ACCOUNT_ERROR_NONE)
6816 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6819 ret = account_create(&account);
6821 if(ret != ACCOUNT_ERROR_NONE)
6823 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6827 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6830 ret = account_query_account_by_account_id(account_id, &account);
6832 if(ret != ACCOUNT_ERROR_NONE)
6834 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6838 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6841 _account_get_account_info(account);
6843 ret = account_destroy(account);
6844 if(ret != ACCOUNT_ERROR_NONE)
6846 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6850 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6852 ret = account_disconnect();
6853 if(ret != ACCOUNT_ERROR_NONE)
6855 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6861 static int utc2_get_account_by_id()
6866 ret = account_connect();
6867 if(ret != ACCOUNT_ERROR_NONE)
6869 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6872 ret = account_create(&account);
6874 if(ret != ACCOUNT_ERROR_NONE)
6876 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6880 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6883 ret = account_query_account_by_account_id(account_id, &account);
6885 _account_get_account_info(account);
6887 if(ret != ACCOUNT_ERROR_NONE)
6889 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6893 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6896 ret = account_destroy(account);
6897 if(ret != ACCOUNT_ERROR_NONE)
6899 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6903 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6905 ret = account_disconnect();
6906 if(ret != ACCOUNT_ERROR_NONE)
6908 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6914 static int utc1_get_account_by_user_name()
6919 ret = account_connect();
6920 if(ret != ACCOUNT_ERROR_NONE)
6922 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6925 ret = account_query_account_by_user_name(_account_get_callback, "usernamed-wy1115", NULL);
6927 if(ret != ACCOUNT_ERROR_NONE)
6929 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6933 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6936 ret = account_disconnect();
6937 if(ret != ACCOUNT_ERROR_NONE)
6939 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6945 static int utc2_get_account_by_user_name()
6950 ret = account_connect();
6951 if(ret != ACCOUNT_ERROR_NONE)
6953 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6956 char *user_data = "test user_data";
6958 ret = account_query_account_by_user_name(_account_get_callback, "usernamed-wy1115", (void *)user_data);
6960 if(ret != ACCOUNT_ERROR_NONE)
6962 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6966 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6969 ret = account_disconnect();
6970 if(ret != ACCOUNT_ERROR_NONE)
6972 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6978 static int utc1_get_account_by_capability()
6983 ret = account_connect();
6984 if(ret != ACCOUNT_ERROR_NONE)
6986 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6989 ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED, NULL);
6991 if(ret != ACCOUNT_ERROR_NONE)
6993 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6997 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7000 ret = account_disconnect();
7001 if(ret != ACCOUNT_ERROR_NONE)
7003 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7009 static int utc2_get_account_by_capability()
7014 ret = account_connect();
7015 if(ret != ACCOUNT_ERROR_NONE)
7017 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7020 char *user_data = "test user_data";
7022 ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_DISABLED, NULL);
7024 if(ret != ACCOUNT_ERROR_NONE)
7026 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7030 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7033 ret = account_disconnect();
7034 if(ret != ACCOUNT_ERROR_NONE)
7036 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7042 static int utc3_get_account_by_capability()
7047 ret = account_connect();
7048 if(ret != ACCOUNT_ERROR_NONE)
7050 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7053 char *user_data = "test user_data";
7055 ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_CAPABILITY_PHOTO, -1, NULL);
7057 if(ret != ACCOUNT_ERROR_NONE)
7059 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7063 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7066 ret = account_disconnect();
7067 if(ret != ACCOUNT_ERROR_NONE)
7069 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7075 static int utc4_get_account_by_capability()
7080 ret = account_connect();
7081 if(ret != ACCOUNT_ERROR_NONE)
7083 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7086 char *user_data = "test user_data";
7088 ret = account_query_account_by_capability(_account_get_callback, -1, ACCOUNT_CAPABILITY_DISABLED, NULL);
7090 if(ret != ACCOUNT_ERROR_NONE)
7092 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7096 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7099 ret = account_disconnect();
7100 if(ret != ACCOUNT_ERROR_NONE)
7102 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7108 static int utc5_get_account_by_capability()
7113 ret = account_connect();
7114 if(ret != ACCOUNT_ERROR_NONE)
7116 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7119 char *user_data = "test user_data";
7121 ret = account_query_account_by_capability(_account_get_callback, -1, -1, NULL);
7123 if(ret != ACCOUNT_ERROR_NONE)
7125 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7129 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7132 ret = account_disconnect();
7133 if(ret != ACCOUNT_ERROR_NONE)
7135 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7141 static int utc1_get_all_accounts()
7145 ret = account_connect();
7146 if(ret != ACCOUNT_ERROR_NONE)
7148 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7151 ret = account_foreach_account_from_db(_account_get_callback, NULL);
7153 if(ret != ACCOUNT_ERROR_NONE)
7155 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7159 printf("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7162 ret = account_disconnect();
7163 if(ret != ACCOUNT_ERROR_NONE)
7165 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7171 static int utc2_get_all_accounts()
7175 ret = account_connect();
7176 if(ret != ACCOUNT_ERROR_NONE)
7178 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7181 char *user_data = "test user_data";
7183 ret = account_foreach_account_from_db(_account_get_callback, (void *)user_data);
7185 if(ret != ACCOUNT_ERROR_NONE)
7187 printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret);
7191 printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret);
7194 ret = account_disconnect();
7195 if(ret != ACCOUNT_ERROR_NONE)
7197 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7203 bool _utc_capability_get_callback(account_capability_type_e capability_type, account_capability_state_e capability_value, void* user_data)
7205 int test_type = capability_type;
7206 int test_value = capability_value;
7208 printf("_capability_get_callback test_type = : %d\n", test_type);
7209 printf("_capability_get_callback test_value = : %d\n", test_value);
7214 static int utc1_account_get_capability_by_account_id()
7217 ret = account_connect();
7218 if(ret != ACCOUNT_ERROR_NONE)
7220 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7223 ret = account_query_capability_by_account_id(_utc_capability_get_callback, account_id, NULL);
7225 if(ret != ACCOUNT_ERROR_NONE)
7227 printf("(%d)-[Account] ret = %d,\n", __LINE__, ret);
7231 printf("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7233 ret = account_disconnect();
7234 if(ret != ACCOUNT_ERROR_NONE)
7236 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7241 static int utc2_account_get_capability_by_account_id()
7245 char *user_data = "test user_data";
7246 ret = account_connect();
7247 if(ret != ACCOUNT_ERROR_NONE)
7249 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7252 ret = account_query_capability_by_account_id(_utc_capability_get_callback, account_id, (void *)user_data);
7254 if(ret != ACCOUNT_ERROR_NONE)
7256 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7260 printf("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7262 ret = account_disconnect();
7263 if(ret != ACCOUNT_ERROR_NONE)
7265 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7270 static int utc_account_delete_by_id()
7274 ret = account_connect();
7275 if(ret != ACCOUNT_ERROR_NONE)
7277 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7280 ret = account_delete(account_id);
7281 if(ret != ACCOUNT_ERROR_NONE)
7283 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7287 printf("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7289 ret = account_disconnect();
7290 if(ret != ACCOUNT_ERROR_NONE)
7292 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7297 static int utc_account_delete_by_user_name()
7300 ret = account_connect();
7301 if(ret != ACCOUNT_ERROR_NONE)
7303 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7306 ret = account_delete_from_db_by_user_name("usernamed-wy1115", "usernamed-com.samsung.account");
7307 if(ret != ACCOUNT_ERROR_NONE)
7309 printf("(%d)-[Account] ret = %d \n", __LINE__, ret);
7313 printf("(%d)-[Account-else loop] ret = %d \n", __LINE__, ret);
7315 ret = account_disconnect();
7316 if(ret != ACCOUNT_ERROR_NONE)
7318 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7323 static int utc_account_delete_by_package_name()
7326 ret = account_connect();
7327 if(ret != ACCOUNT_ERROR_NONE)
7329 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7332 ret = account_delete_from_db_by_package_name("usernamed-com.samsung.account");
7333 if(ret != ACCOUNT_ERROR_NONE)
7335 printf("(%d)-[Account] ret = %d\n", __LINE__, ret);
7339 printf("(%d)-[Account-else loop] ret = %d\n", __LINE__, ret);
7341 ret = account_disconnect();
7342 if(ret != ACCOUNT_ERROR_NONE)
7344 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7350 static int utc_account_get_and_update()
7355 ret = account_connect();
7356 printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7358 ret = account_create(&account);
7359 printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7361 ret = account_query_account_by_account_id( 2, &account);
7362 printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7364 ret = account_set_access_token(account, "ACCESSSSSSSSSSSSSSSSSSSFASFASDGDSFFASDFASFDSDGAASDFASDGDFDFGAFASDFASFASDFASASGSGASDFASFSADDSGASGASGGASDFASDFASGSAASDFAAAG");
7365 printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7367 ret = account_update_to_db_by_id( account, 2);
7368 printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7370 ret = account_destroy(account);
7371 printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7373 ret = account_disconnect();
7374 printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7380 static int utc_notify_account_insert_update_delete()
7383 DBusConnection* conn;
7386 printf("Listening for signals\n");
7388 /*initialise the errors */
7389 dbus_error_init(&err);
7391 /* connect to the bus and check for errors*/
7392 conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
7393 if (dbus_error_is_set(&err)) {
7394 fprintf(stderr, "Connection Error (%s)\n", err.message);
7395 dbus_error_free(&err);
7401 /* add a rule for which messages we want to see*/
7402 dbus_bus_add_match(conn, "type='signal',interface='account.signal.Type'", &err); /* see signals from the given interface*/
7403 dbus_connection_flush(conn);
7404 if (dbus_error_is_set(&err)) {
7405 fprintf(stderr, "Match Error (%s)\n", err.message);
7408 printf("Match rule sent\n");
7410 /* loop listening for signals being emmitted*/
7413 /* non blocking read of the next available message*/
7414 dbus_connection_read_write(conn, 0);
7415 msg = dbus_connection_pop_message(conn);
7417 /* loop again if we haven't read a message*/
7423 /* check if the message is a signal from the correct interface and with the correct name*/
7424 if (dbus_message_is_signal(msg, ACCOUNT_DBUS_SIGNAL_INTERFACE, ACCOUNT_DBUS_NOTI_NAME_INSERT)) {
7425 printf("Got Signal with name insert\n");
7428 if (dbus_message_is_signal(msg, ACCOUNT_DBUS_SIGNAL_INTERFACE, ACCOUNT_DBUS_NOTI_NAME_UPDATE)) {
7429 printf("Got Signal with name update\n");
7432 if (dbus_message_is_signal(msg, ACCOUNT_DBUS_SIGNAL_INTERFACE, ACCOUNT_DBUS_NOTI_NAME_DELETE)) {
7433 printf("Got Signal with name delete\n");
7435 /* free the message*/
7436 dbus_message_unref(msg);
7438 /*close the connection*/
7439 dbus_connection_close(conn);
7443 int main(int argc, char** argv)
7446 utc_notify_account_insert_update_delete();
7448 int account_id = -1;
7453 memset(temp, 0x00, sizeof(temp));
7455 printf("\n\n**************************** Account Unit Test case Execution Suite ************************************ \n\n");
7456 printf("1. Press 1 for account insert test \n");
7457 printf("2. Press 2 for account update test \n");
7458 printf("3. Press 3 for account delete test \n");
7459 printf("4. Press 4 for query account test \n");
7460 scanf("%d", &user_resp);
7462 if (user_resp == 1) {
7463 printf("In Account Insert Test Mode \n");
7464 account_id = _account_insert_test_new();
7467 printf("(%d)-[Account] account insert test Success!! account id = %d\n", __LINE__, account_id);
7469 utc_account_get_and_update();
7470 } else if (user_resp == 2) {
7471 printf("In Account Update Test Mode \n");
7472 printf("1. Press 1 to upadte account by id test \n");
7473 printf("2. Press 2 for update account by user name test \n");
7474 scanf("%d", &user_resp);
7475 if (user_resp == 1) {
7476 printf("Enter Account Id to be Updated \n");
7477 scanf("%d", &account_id);
7478 if (_account_update_test_new(account_id) == ACCOUNT_ERROR_NONE)
7479 printf("Account update Success \n");
7481 printf("Account update Failed \n");
7482 } else if (user_resp == 2) {
7483 printf("Enter Account user name to be Updated \n");
7484 memset(temp, 0x00, sizeof(temp));
7487 memset(temp2, 0x00, sizeof(temp2));
7488 printf("Enter Account package name to be Updated \n");
7490 if (_account_update_test_new_by_user_name(temp, temp2) == ACCOUNT_ERROR_NONE)
7491 printf("Account update Success \n");
7493 printf("Account update Failed \n");
7495 printf("Wrong info entered \n");
7498 } else if (user_resp == 3) {
7499 printf("In Account Delete Test Mode \n");
7500 printf("1. Press 1 to delete account by id test \n");
7501 printf("2. Press 2 to delete account by user name test \n");
7502 printf("3. Press 3 to delete account by package name test \n");
7503 scanf("%d", &user_resp);
7504 if (user_resp == 1) {
7505 printf("Enter Account Id to be Deleted \n");
7506 scanf("%d", &account_id);
7507 int ret = account_connect();
7508 if(ret != ACCOUNT_ERROR_NONE)
7510 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7512 if (account_delete_from_db_by_id(account_id) == ACCOUNT_ERROR_NONE)
7513 printf("Account delete Success \n");
7515 printf("Account delete Failed \n");
7517 ret = account_disconnect();
7518 if(ret != ACCOUNT_ERROR_NONE)
7520 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7522 } else if (user_resp == 2) {
7523 printf("Enter Account user name to be Deleted \n");
7524 memset(temp, 0x00, sizeof(temp));
7527 memset(temp2, 0x00, sizeof(temp2));
7528 printf("Enter Account package name to be Deleted \n");
7530 int ret = account_connect();
7531 if(ret != ACCOUNT_ERROR_NONE)
7533 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7535 if (account_delete_from_db_by_user_name(temp, temp2) == ACCOUNT_ERROR_NONE)
7536 printf("Account delete Success \n");
7538 printf("Account delete Failed \n");
7539 ret = account_disconnect();
7540 if(ret != ACCOUNT_ERROR_NONE)
7542 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7544 } else if (user_resp == 3) {
7545 printf("Enter Account package name to be Deleted \n");
7546 memset(temp, 0x00, sizeof(temp));
7548 int ret = account_connect();
7549 if(ret != ACCOUNT_ERROR_NONE)
7551 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7553 if (account_delete_from_db_by_package_name(temp) == ACCOUNT_ERROR_NONE )
7554 printf("Account delete Success \n");
7556 printf("Account delete Failed \n");
7557 ret = account_disconnect();
7558 if(ret != ACCOUNT_ERROR_NONE)
7560 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7564 printf("Wrong info entered \n");
7568 } else if (user_resp == 4) {
7569 printf("In Account Query Test Mode \n");
7570 printf("1. Press 1 to Query account by id test \n");
7571 printf("2. Press 2 to Query account by user name test \n");
7572 printf("3. Press 3 to Query account by package name test \n");
7573 printf("4. Press 4 to Query account by capability test \n");
7574 scanf("%d", &user_resp);
7575 if (user_resp == 1) {
7576 printf("Enter Account Id to be Queried \n");
7577 scanf("%d", &account_id);
7580 account_create(&account);
7581 if (account_query_account_by_account_id(account_id, &account) == ACCOUNT_ERROR_NONE)
7582 printf("Account Queried Successfully \n");
7584 printf("Account Queried failed \n");
7585 account_destroy(account);
7586 account_disconnect();
7587 } else if (user_resp == 2) {
7588 printf("Enter Account user name to be Queried \n");
7590 int ret = account_connect();
7591 if(ret != ACCOUNT_ERROR_NONE)
7593 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7595 if (account_query_account_by_user_name(_account_get_callback, temp, NULL) == ACCOUNT_ERROR_NONE)
7596 printf("Account Queried Successfully \n");
7598 printf("Account Queried failed \n");
7600 ret = account_disconnect();
7601 if(ret != ACCOUNT_ERROR_NONE)
7603 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7605 } else if (user_resp == 3) {
7606 printf("Enter Account package name to be Queried \n");
7608 int ret = account_connect();
7609 if(ret != ACCOUNT_ERROR_NONE)
7611 printf("(%d)-[Account] ret = %d\n", __LINE__, ret);
7613 if (account_query_account_by_package_name(_account_get_callback, temp, NULL) == ACCOUNT_ERROR_NONE)
7614 printf("Account Queried Successfully \n");
7616 printf("Account Queried failed \n");
7617 ret = account_disconnect();
7618 if(ret != ACCOUNT_ERROR_NONE)
7620 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7622 } else if (user_resp == 4) {
7623 printf("Enter Account capability key to be Queried \n");
7624 scanf("%d", &cap_key);
7625 printf("Enter Account capability key's value to be Queried \n");
7626 scanf("%d", &cap_value);
7627 int ret = account_connect();
7628 if(ret != ACCOUNT_ERROR_NONE)
7630 printf("(%d)-[Account] ret = %d\n", __LINE__, ret);
7632 if (account_query_account_by_capability(_account_get_callback, cap_key, cap_value, NULL) == ACCOUNT_ERROR_NONE)
7633 printf("Account Queried Successfully \n");
7635 printf("Account Queried failed \n");
7636 ret = account_disconnect();
7637 if(ret != ACCOUNT_ERROR_NONE)
7639 printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7642 printf("Wrong info entered \n");
7647 printf("Wrong info entered \n");
7654 utc1_account_insert();
7655 utc2_account_insert();
7656 utc3_account_insert();
7657 utc4_account_insert();
7658 utc5_account_insert();
7659 utc6_account_insert();
7660 utc7_account_insert();
7661 utc8_account_insert();
7662 utc9_account_insert();
7663 utc10_account_insert();
7664 utc11_account_insert();
7665 utc12_account_insert();
7666 utc13_account_insert();
7667 utc14_account_insert();
7668 utc15_account_insert();
7669 utc16_account_insert();
7670 utc17_account_insert();
7671 utc18_account_insert();
7672 utc19_account_insert();
7673 utc20_account_insert();
7674 utc21_account_insert();
7675 utc22_account_insert();
7676 utc23_account_insert();
7681 utc1_account_update();
7682 utc2_account_update();
7683 utc3_account_update();
7684 utc4_account_update();
7685 utc5_account_update();
7686 utc6_account_update();
7687 utc7_account_update();
7688 utc8_account_update();
7689 utc9_account_update();
7690 utc10_account_update();
7691 utc11_account_update();
7692 utc12_account_update();
7693 utc13_account_update();
7694 utc14_account_update();
7695 utc15_account_update();
7696 utc16_account_update();
7697 utc17_account_update();
7698 utc18_account_update();
7699 utc19_account_update();
7700 utc20_account_update();
7701 utc21_account_update();
7702 utc22_account_update();
7703 utc23_account_update();
7704 utc24_account_update();
7705 utc25_account_update();
7706 utc26_account_update();
7707 utc27_account_update();
7710 //utc get account by id
7712 utc1_get_account_by_id();
7713 utc2_get_account_by_id();
7716 //utc get account by user name
7718 utc1_get_account_by_user_name();
7719 utc2_get_account_by_user_name();
7722 //utc get account by capability
7724 utc1_get_account_by_capability();
7725 utc2_get_account_by_capability();
7726 utc3_get_account_by_capability();
7727 utc4_get_account_by_capability();
7728 utc5_get_account_by_capability();
7731 //utc get all accounts
7733 utc1_get_all_accounts();
7734 utc2_get_all_accounts();
7737 //utc get capability by account id
7739 utc1_account_get_capability_by_account_id();
7740 utc2_account_get_capability_by_account_id();
7743 //utc_account_delete_by_id();
7745 utc_account_delete_by_user_name();
7746 utc_account_delete_by_package_name();