4 * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Wonyoung Lee <wy1115.lee@samsung.com>, Sungchan Kim <sungchan81.kim@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.
24 #include "account-private.h"
26 //#include <dbus/dbus.h>
30 static void _account_free_text(char *text)
38 bool _capability_get_callback(const char* capability_type, account_capability_state_e capability_value, void* user_data)
40 char* test_type = (char*)capability_type;
41 int test_value = capability_value;
43 ACCOUNT_SLOGD("_capability_get_callback test_type = : %s\n", test_type);
44 ACCOUNT_SLOGD("_capability_get_callback test_value = : %d\n", test_value);
48 int _account_get_account_info(account_h handle)
50 ACCOUNT_SLOGD("_account_get_callback\n");
52 char *test_text = NULL;
54 account_get_user_name(handle, &test_text);
55 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
57 _account_free_text(test_text);
59 account_get_display_name(handle, &test_text);
60 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
62 _account_free_text(test_text);
64 account_get_email_address(handle, &test_text);
65 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
67 _account_free_text(test_text);
69 account_get_icon_path(handle, &test_text);
70 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
72 _account_free_text(test_text);
74 account_get_source(handle, &test_text);
75 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
77 _account_free_text(test_text);
79 account_get_package_name(handle, &test_text);
80 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
82 _account_free_text(test_text);
84 account_get_domain_name(handle, &test_text);
85 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
87 _account_free_text(test_text);
89 account_get_access_token(handle, &test_text);
90 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
95 for(i=0;i<USER_TXT_CNT;i++)
97 _account_free_text(test_text);
99 account_get_user_text(handle, i, &test_text);
100 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
105 account_auth_type_e auth_type;
106 account_get_auth_type(handle, &auth_type);
107 ACCOUNT_SLOGD("account_get_auth_type : %d\n", auth_type);
109 account_secrecy_state_e secret;
110 account_get_secret(handle, &secret);
111 ACCOUNT_SLOGD("account_get_secret : %d\n", secret);
113 account_sync_state_e sync_support;
114 account_get_sync_support(handle, &sync_support);
115 ACCOUNT_SLOGD("account_get_sync_support : %d\n", sync_support);
117 for(i=0;i<USER_INT_CNT;i++)
120 account_get_user_int(handle, i, &test_int);
121 ACCOUNT_SLOGD("_account_get_callback : %d\n", test_int);
124 account_get_capability_all(handle, _capability_get_callback, NULL);
130 bool _account_get_callback(account_h handle, void* user_data)
132 ACCOUNT_SLOGD("_account_get_callback\n");
134 char *test_text = NULL;
136 account_get_user_name(handle, &test_text);
137 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
139 _account_free_text(test_text);
141 account_get_display_name(handle, &test_text);
142 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
144 _account_free_text(test_text);
146 account_get_email_address(handle, &test_text);
147 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
149 _account_free_text(test_text);
151 account_get_icon_path(handle, &test_text);
152 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
154 _account_free_text(test_text);
156 account_get_source(handle, &test_text);
157 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
159 _account_free_text(test_text);
161 account_get_package_name(handle, &test_text);
162 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
164 _account_free_text(test_text);
166 account_get_domain_name(handle, &test_text);
167 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
169 _account_free_text(test_text);
171 account_get_access_token(handle, &test_text);
172 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
176 for(i=0;i<USER_TXT_CNT;i++)
178 _account_free_text(test_text);
180 account_get_user_text(handle, i, &test_text);
181 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
186 account_auth_type_e auth_type;
187 account_get_auth_type(handle, &auth_type);
188 ACCOUNT_SLOGD("account_get_auth_type : %d\n", auth_type);
190 account_secrecy_state_e secret;
191 account_get_secret(handle, &secret);
192 ACCOUNT_SLOGD("account_get_secret : %d\n", secret);
194 account_sync_state_e sync_support;
195 account_get_sync_support(handle, &sync_support);
196 ACCOUNT_SLOGD("account_get_sync_support : %d\n", sync_support);
198 for(i=0;i<USER_INT_CNT;i++)
201 account_get_user_int(handle, i, &test_int);
202 ACCOUNT_SLOGD("_account_get_callback : %d\n", test_int);
205 account_get_capability_all(handle, _capability_get_callback, NULL);
210 static int _account_insert_test_new(void)
214 account_h account = NULL;
217 ret = account_connect();
219 if(ret != ACCOUNT_ERROR_NONE)
221 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
225 memset(temp, 0x00, sizeof(temp));
227 ret = account_create(&account);
228 ACCOUNT_SLOGD("account_set_user_name: Enter User Name to be set \n");
229 if (scanf("%s", temp) != 1) {
230 ACCOUNT_SLOGD("scanf Failed !!!! \n");
231 ret = account_destroy(account);
232 if(ret != ACCOUNT_ERROR_NONE)
234 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
237 ret = account_disconnect();
239 if(ret != ACCOUNT_ERROR_NONE)
241 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
246 ret = account_set_user_name(account, temp);
248 if(ret != ACCOUNT_ERROR_NONE)
250 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
252 memset(temp, 0x00, sizeof(temp));
253 ACCOUNT_SLOGD("account_set_display_name: Enter display Name to be set \n");
254 if (scanf("%s", temp) != 1) {
255 ACCOUNT_SLOGD("scanf Failed !!!! \n");
256 ret = account_destroy(account);
257 if(ret != ACCOUNT_ERROR_NONE)
259 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
262 ret = account_disconnect();
264 if(ret != ACCOUNT_ERROR_NONE)
266 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
271 ret = account_set_display_name(account, temp);
273 if(ret != ACCOUNT_ERROR_NONE)
275 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
277 memset(temp, 0x00, sizeof(temp));
278 ACCOUNT_SLOGD("account_set_domain_name: Enter domain Name to be set \n");
279 if (scanf("%s", temp) != 1) {
280 ACCOUNT_SLOGD("scanf Failed !!!! \n");
281 ret = account_destroy(account);
282 if(ret != ACCOUNT_ERROR_NONE)
284 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
287 ret = account_disconnect();
289 if(ret != ACCOUNT_ERROR_NONE)
291 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
296 ret = account_set_domain_name(account, temp);
297 if(ret != ACCOUNT_ERROR_NONE)
299 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
302 memset(temp, 0x00, sizeof(temp));
303 ACCOUNT_SLOGD("account_set_email_address: Enter email Name to be set \n");
304 if (scanf("%s", temp) != 1) {
305 ACCOUNT_SLOGD("scanf Failed !!!! \n");
306 ret = account_destroy(account);
307 if(ret != ACCOUNT_ERROR_NONE)
309 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
312 ret = account_disconnect();
314 if(ret != ACCOUNT_ERROR_NONE)
316 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
320 ret = account_set_email_address(account, temp);
321 if(ret != ACCOUNT_ERROR_NONE)
323 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
325 memset(temp, 0x00, sizeof(temp));
326 ACCOUNT_SLOGD("account_set_package_name: Enter package Name to be set \n");
327 if (scanf("%s", temp) != 1) {
328 ACCOUNT_SLOGD("scanf Failed !!!! \n");
329 ret = account_destroy(account);
330 if(ret != ACCOUNT_ERROR_NONE)
332 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
335 ret = account_disconnect();
337 if(ret != ACCOUNT_ERROR_NONE)
339 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
344 ret = account_set_package_name(account, temp);
345 if(ret != ACCOUNT_ERROR_NONE)
347 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
349 memset(temp, 0x00, sizeof(temp));
350 ACCOUNT_SLOGD("account_set_icon_path: Enter icon path to be set \n");
351 if (scanf("%s", temp) != 1) {
352 ACCOUNT_SLOGD("scanf Failed !!!! \n");
353 ret = account_destroy(account);
354 if(ret != ACCOUNT_ERROR_NONE)
356 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
359 ret = account_disconnect();
361 if(ret != ACCOUNT_ERROR_NONE)
363 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
368 ret = account_set_icon_path(account, temp);
369 if(ret != ACCOUNT_ERROR_NONE)
371 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
373 memset(temp, 0x00, sizeof(temp));
375 ACCOUNT_SLOGD("account_set_access_token: Enter access token to be set \n");
376 if (scanf("%s", temp) != 1) {
377 ACCOUNT_SLOGD("scanf Failed !!!! \n");
378 ret = account_destroy(account);
379 if(ret != ACCOUNT_ERROR_NONE)
381 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
384 ret = account_disconnect();
386 if(ret != ACCOUNT_ERROR_NONE)
388 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
393 ret = account_set_access_token(account, temp);
394 if(ret != ACCOUNT_ERROR_NONE)
396 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
398 memset(temp, 0x00, sizeof(temp));
399 ACCOUNT_SLOGD("account_set_auth_type: Enter auth type to be set \n");
400 if (scanf("%d", &temp_int) != 1) {
401 ACCOUNT_SLOGD("scanf Failed !!!! \n");
402 ret = account_destroy(account);
403 if(ret != ACCOUNT_ERROR_NONE)
405 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
408 ret = account_disconnect();
410 if(ret != ACCOUNT_ERROR_NONE)
412 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
417 ret = account_set_auth_type( account, temp_int );
418 if(ret != ACCOUNT_ERROR_NONE)
420 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
423 ACCOUNT_SLOGD("account_set_secret: Enter secret to be set \n");
424 if (scanf("%d", &temp_int) != 1) {
425 ACCOUNT_SLOGD("scanf Failed !!!! \n");
426 ret = account_destroy(account);
427 if(ret != ACCOUNT_ERROR_NONE)
429 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
432 ret = account_disconnect();
434 if(ret != ACCOUNT_ERROR_NONE)
436 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
441 ret = account_set_secret( account, temp_int );
442 if(ret != ACCOUNT_ERROR_NONE)
444 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
447 ACCOUNT_SLOGD("account_set_sync_support: Enter sync support state \n");
448 if (scanf("%d", &temp_int) != 1) {
449 ACCOUNT_SLOGD("scanf Failed !!!! \n");
450 ret = account_destroy(account);
451 if(ret != ACCOUNT_ERROR_NONE)
453 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
456 ret = account_disconnect();
458 if(ret != ACCOUNT_ERROR_NONE)
460 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
465 ret = account_set_sync_support( account, temp_int );
466 if(ret != ACCOUNT_ERROR_NONE)
468 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
471 memset(temp, 0x00, sizeof(temp));
472 ACCOUNT_SLOGD("account_set_source: Enter source to be set \n");
473 if (scanf("%s", temp) != 1) {
474 ACCOUNT_SLOGD("scanf Failed !!!! \n");
475 ret = account_destroy(account);
476 if(ret != ACCOUNT_ERROR_NONE)
478 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
481 ret = account_disconnect();
483 if(ret != ACCOUNT_ERROR_NONE)
485 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
489 ret = account_set_source(account, temp);
493 for(i=0;i<USER_TXT_CNT;i++)
495 memset(temp, 0x00, sizeof(temp));
496 ACCOUNT_SLOGD("account_set_user_text [%d]: Enter user text to be set \n", i);
497 if (scanf("%s", temp) != 1) {
498 ACCOUNT_SLOGD("scanf Failed !!!! \n");
499 ret = account_destroy(account);
500 if(ret != ACCOUNT_ERROR_NONE)
502 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
505 ret = account_disconnect();
507 if(ret != ACCOUNT_ERROR_NONE)
509 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
513 ret = account_set_user_text(account, i, temp);
514 if(ret != ACCOUNT_ERROR_NONE)
516 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
521 for(i=0;i<USER_INT_CNT;i++)
524 ACCOUNT_SLOGD("account_set_user_int [%d]: Enter user int to be set \n", i);
525 if (scanf("%d", &temp_int) != 1) {
526 ACCOUNT_SLOGD("scanf Failed !!!! \n");
527 ret = account_destroy(account);
528 if(ret != ACCOUNT_ERROR_NONE)
530 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
533 ret = account_disconnect();
535 if(ret != ACCOUNT_ERROR_NONE)
537 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
541 ret = account_set_user_int(account, i, temp_int);
542 if(ret != ACCOUNT_ERROR_NONE)
544 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
550 int want_to_enter_more_cap = 1;
551 while (want_to_enter_more_cap){
552 ACCOUNT_SLOGD("account_set_capability: Enter capability key to set \n");
553 if (scanf("%d", &cap_key) != 1) {
554 ACCOUNT_SLOGD("Scanf Failed!!!\n");
557 ACCOUNT_SLOGD("account_set_capability: Enter capability value to set \n");
558 if (scanf("%d", &cap_value) != 1 ) {
559 ACCOUNT_SLOGD("Scanf Failed!!!\n");
562 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL, cap_value);
563 if(ret != ACCOUNT_ERROR_NONE)
565 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
567 ACCOUNT_SLOGD("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
568 if (scanf("%d", &temp_int) != 1) {
569 ACCOUNT_SLOGD("scanf Failed !!!! \n");
570 ret = account_destroy(account);
571 if(ret != ACCOUNT_ERROR_NONE)
573 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
576 ret = account_disconnect();
578 if(ret != ACCOUNT_ERROR_NONE)
580 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
585 want_to_enter_more_cap = 1;
587 want_to_enter_more_cap = 0;
590 ret = account_insert_to_db(account, &account_id);
591 if(ret != ACCOUNT_ERROR_NONE)
593 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
594 ret = account_destroy(account);
595 if(ret != ACCOUNT_ERROR_NONE)
597 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
599 ret = account_disconnect();
601 if(ret != ACCOUNT_ERROR_NONE)
603 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
608 ret = account_destroy(account);
609 if(ret != ACCOUNT_ERROR_NONE)
611 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
614 ret = account_disconnect();
616 if(ret != ACCOUNT_ERROR_NONE)
618 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
624 static int _account_insert_test(void)
628 account_h account = NULL;
630 ACCOUNT_SLOGD("account_connect returns %d\n", ret);
632 ret = account_create(&account);
634 ACCOUNT_SLOGD("account = %p\n", account);
636 ret = account_set_user_name(account, "wy1115.lee");
638 if(ret != ACCOUNT_ERROR_NONE)
640 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
643 ret = account_set_display_name(account, "Wonyoung Lee");
645 if(ret != ACCOUNT_ERROR_NONE)
647 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
650 ret = account_set_domain_name(account, "Samsung electronics");
651 if(ret != ACCOUNT_ERROR_NONE)
653 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
655 ret = account_set_email_address(account, "urusa77@gmail.com");
656 if(ret != ACCOUNT_ERROR_NONE)
658 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
660 ret = account_set_package_name(account, "com.samsung.account");
661 if(ret != ACCOUNT_ERROR_NONE)
663 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
665 ret = account_set_icon_path(account, "icon-path");
666 if(ret != ACCOUNT_ERROR_NONE)
668 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
671 ret = account_set_access_token(account, "ACCESSTOKEN");
672 if(ret != ACCOUNT_ERROR_NONE)
674 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
677 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
678 if(ret != ACCOUNT_ERROR_NONE)
680 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
682 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
683 if(ret != ACCOUNT_ERROR_NONE)
685 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
687 ret = account_set_source(account, "URUSA inc.");
691 for(i=0;i<USER_TXT_CNT;i++)
693 ret = account_set_user_text(account, i, "user txt");
694 if(ret != ACCOUNT_ERROR_NONE)
696 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
701 for(i=0;i<USER_INT_CNT;i++)
703 ret = account_set_user_int(account, i, 888);
704 if(ret != ACCOUNT_ERROR_NONE)
706 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
710 ret = account_set_capability(account, ACCOUNT_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_ENABLED);
711 ret = account_set_capability(account, ACCOUNT_CAPABILITY_CALENDAR, ACCOUNT_CAPABILITY_ENABLED);
712 ret = account_set_capability(account, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED);
713 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_ENABLED);
714 ret = account_set_capability(account, ACCOUNT_CAPABILITY_EMAIL, ACCOUNT_CAPABILITY_ENABLED);
715 ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_ENABLED);
716 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VOIP, ACCOUNT_CAPABILITY_ENABLED);
717 //ret = account_set_capability(account, ACCOUNT_CAPABILITY_IM, ACCOUNT_CAPABILITY_ENABLED);
718 ret = account_set_capability(account, ACCOUNT_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_ENABLED);
719 ret = account_set_capability(account, ACCOUNT_CAPABILITY_MOBILE_TRACKER, ACCOUNT_CAPABILITY_ENABLED);
722 ret = account_insert_to_db(account, &account_id);
723 if(ret != ACCOUNT_ERROR_NONE)
725 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
729 ret = account_destroy(account);
730 if(ret != ACCOUNT_ERROR_NONE)
732 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
737 ACCOUNT_SLOGD("account_connect returns %d\n", ret);
739 ret = account_create(&account);
741 account_query_account_by_account_id(account_id, &account);
742 _account_get_account_info(account);
744 account_query_capability_by_account_id(_capability_get_callback, account_id, NULL);
746 ret = account_destroy(account);
747 if(ret != ACCOUNT_ERROR_NONE)
749 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
755 ACCOUNT_SLOGD("account_connect returns %d\n", ret);
757 ret = account_create(&account);
759 account_query_account_by_user_name(_account_get_callback, "usernamed-wy1115", NULL);
761 ret = account_destroy(account);
762 if(ret != ACCOUNT_ERROR_NONE)
764 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
771 static int _account_update_test_new_by_user_name(char *user_name, char *package_name)
775 account_h account = NULL;
779 memset(temp, 0x00, sizeof(temp));
780 ret = account_connect();
782 if(ret != ACCOUNT_ERROR_NONE)
784 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
787 ret = account_create(&account);
788 ACCOUNT_SLOGD("account_set_user_name: Enter User Name to be set \n");
789 if (scanf("%s", temp) != 1) {
790 ACCOUNT_SLOGD("scanf Failed !!!! \n");
791 ret = account_destroy(account);
792 if(ret != ACCOUNT_ERROR_NONE)
794 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
797 ret = account_disconnect();
799 if(ret != ACCOUNT_ERROR_NONE)
801 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
806 ret = account_set_user_name(account, temp);
808 if(ret != ACCOUNT_ERROR_NONE)
810 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
812 memset(temp, 0x00, sizeof(temp));
814 ACCOUNT_SLOGD("account_set_display_name: Enter display Name to be set \n");
815 if (scanf("%s", temp) != 1) {
816 ACCOUNT_SLOGD("scanf Failed !!!! \n");
817 ret = account_destroy(account);
818 if(ret != ACCOUNT_ERROR_NONE)
820 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
823 ret = account_disconnect();
825 if(ret != ACCOUNT_ERROR_NONE)
827 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
832 ret = account_set_display_name(account, temp);
834 if(ret != ACCOUNT_ERROR_NONE)
836 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
838 memset(temp, 0x00, sizeof(temp));
840 ACCOUNT_SLOGD("account_set_domain_name: Enter domain Name to be set \n");
841 if (scanf("%s", temp) != 1) {
842 ACCOUNT_SLOGD("scanf Failed !!!! \n");
843 ret = account_destroy(account);
844 if(ret != ACCOUNT_ERROR_NONE)
846 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
849 ret = account_disconnect();
851 if(ret != ACCOUNT_ERROR_NONE)
853 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
858 ret = account_set_domain_name(account, temp);
859 if(ret != ACCOUNT_ERROR_NONE)
861 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
864 memset(temp, 0x00, sizeof(temp));
866 ACCOUNT_SLOGD("account_set_email_address: Enter email Name to be set \n");
867 if (scanf("%s", temp) != 1) {
868 ACCOUNT_SLOGD("scanf Failed !!!! \n");
869 ret = account_destroy(account);
870 if(ret != ACCOUNT_ERROR_NONE)
872 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
875 ret = account_disconnect();
877 if(ret != ACCOUNT_ERROR_NONE)
879 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
883 ret = account_set_email_address(account, temp);
884 if(ret != ACCOUNT_ERROR_NONE)
886 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
888 memset(temp, 0x00, sizeof(temp));
890 ACCOUNT_SLOGD("account_set_package_name: Enter package Name to be set \n");
891 if (scanf("%s", temp) != 1) {
892 ACCOUNT_SLOGD("scanf Failed !!!! \n");
893 ret = account_destroy(account);
894 if(ret != ACCOUNT_ERROR_NONE)
896 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
899 ret = account_disconnect();
901 if(ret != ACCOUNT_ERROR_NONE)
903 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
908 ret = account_set_package_name(account, temp);
909 if(ret != ACCOUNT_ERROR_NONE)
911 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
913 memset(temp, 0x00, sizeof(temp));
915 ACCOUNT_SLOGD("account_set_icon_path: Enter icon path to be set \n");
916 if (scanf("%s", temp) != 1) {
917 ACCOUNT_SLOGD("scanf Failed !!!! \n");
918 ret = account_destroy(account);
919 if(ret != ACCOUNT_ERROR_NONE)
921 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
924 ret = account_disconnect();
926 if(ret != ACCOUNT_ERROR_NONE)
928 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
933 ret = account_set_icon_path(account, temp);
934 if(ret != ACCOUNT_ERROR_NONE)
936 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
938 memset(temp, 0x00, sizeof(temp));
940 ACCOUNT_SLOGD("account_set_access_token: Enter access token to be set \n");
941 if (scanf("%s", temp) != 1) {
942 ACCOUNT_SLOGD("scanf Failed !!!! \n");
943 ret = account_destroy(account);
944 if(ret != ACCOUNT_ERROR_NONE)
946 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
949 ret = account_disconnect();
951 if(ret != ACCOUNT_ERROR_NONE)
953 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
958 ret = account_set_access_token(account, temp);
959 if(ret != ACCOUNT_ERROR_NONE)
961 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
963 memset(temp, 0x00, sizeof(temp));
965 ACCOUNT_SLOGD("account_set_auth_type: Enter auth type to be set \n");
966 if (scanf("%d", &temp_int) != 1) {
967 ACCOUNT_SLOGD("scanf Failed !!!! \n");
968 ret = account_destroy(account);
969 if(ret != ACCOUNT_ERROR_NONE)
971 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
974 ret = account_disconnect();
976 if(ret != ACCOUNT_ERROR_NONE)
978 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
983 ret = account_set_auth_type( account, temp_int );
984 if(ret != ACCOUNT_ERROR_NONE)
986 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
989 ACCOUNT_SLOGD("account_set_secret: Enter secret to be set \n");
990 if (scanf("%d", &temp_int) != 1) {
991 ACCOUNT_SLOGD("scanf Failed !!!! \n");
992 ret = account_destroy(account);
993 if(ret != ACCOUNT_ERROR_NONE)
995 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
998 ret = account_disconnect();
1000 if(ret != ACCOUNT_ERROR_NONE)
1002 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1007 ret = account_set_secret( account, temp_int );
1008 if(ret != ACCOUNT_ERROR_NONE)
1010 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1014 ACCOUNT_SLOGD("account_set_sync_support: Enter sync support state \n");
1015 if (scanf("%d", &temp_int) != 1) {
1016 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1017 ret = account_destroy(account);
1018 if(ret != ACCOUNT_ERROR_NONE)
1020 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1023 ret = account_disconnect();
1025 if(ret != ACCOUNT_ERROR_NONE)
1027 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1032 ret = account_set_sync_support( account, temp_int );
1033 if(ret != ACCOUNT_ERROR_NONE)
1035 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1038 memset(temp, 0x00, sizeof(temp));
1040 ACCOUNT_SLOGD("account_set_source: Enter source to be set \n");
1041 if (scanf("%s", temp) != 1) {
1042 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1043 ret = account_destroy(account);
1044 if(ret != ACCOUNT_ERROR_NONE)
1046 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1049 ret = account_disconnect();
1051 if(ret != ACCOUNT_ERROR_NONE)
1053 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1057 ret = account_set_source(account, temp);
1061 for(i=0;i<USER_TXT_CNT;i++)
1063 memset(temp, 0x00, sizeof(temp));
1065 ACCOUNT_SLOGD("account_set_user_text [%d]: Enter user text to be set \n", i);
1066 if (scanf("%s", temp) != 1) {
1067 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1068 ret = account_destroy(account);
1069 if(ret != ACCOUNT_ERROR_NONE)
1071 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1074 ret = account_disconnect();
1076 if(ret != ACCOUNT_ERROR_NONE)
1078 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1082 ret = account_set_user_text(account, i, temp);
1083 if(ret != ACCOUNT_ERROR_NONE)
1085 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1090 for(i=0;i<USER_INT_CNT;i++)
1093 ACCOUNT_SLOGD("account_set_user_int [%d]: Enter user int to be set \n", i);
1094 if (scanf("%d", &temp_int) != 1) {
1095 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1096 ret = account_destroy(account);
1097 if(ret != ACCOUNT_ERROR_NONE)
1099 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1102 ret = account_disconnect();
1104 if(ret != ACCOUNT_ERROR_NONE)
1106 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1110 ret = account_set_user_int(account, i, temp_int);
1111 if(ret != ACCOUNT_ERROR_NONE)
1113 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1119 int want_to_enter_more_cap = 1;
1120 while (want_to_enter_more_cap){
1121 ACCOUNT_SLOGD("account_set_capability: Enter capability key to set \n");
1122 if (scanf("%d", &cap_key) != 1 ) {
1123 ACCOUNT_SLOGD("Scanf Failed!!!\n");
1126 ACCOUNT_SLOGD("account_set_capability: Enter capability value to set \n");
1127 if (scanf("%d", &cap_value) != 1) {
1128 ACCOUNT_SLOGD("Scanf Failed!!!\n");
1131 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL, cap_value);
1132 if(ret != ACCOUNT_ERROR_NONE)
1134 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1136 ACCOUNT_SLOGD("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
1137 if (scanf("%d", &temp_int) != 1) {
1138 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1139 ret = account_destroy(account);
1140 if(ret != ACCOUNT_ERROR_NONE)
1142 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1145 ret = account_disconnect();
1147 if(ret != ACCOUNT_ERROR_NONE)
1149 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1154 want_to_enter_more_cap = 1;
1156 want_to_enter_more_cap = 0;
1160 ret = account_update_to_db_by_user_name(account, user_name, package_name);
1163 if(ret != ACCOUNT_ERROR_NONE)
1165 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1168 ret = account_destroy(account);
1169 if(ret != ACCOUNT_ERROR_NONE)
1171 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1173 ret = account_disconnect();
1175 if(ret != ACCOUNT_ERROR_NONE)
1177 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1185 static int _account_update_test_new(int account_id)
1190 account_h account = NULL;
1194 memset(temp, 0x00, sizeof(temp));
1195 ret = account_connect();
1197 if(ret != ACCOUNT_ERROR_NONE)
1199 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1203 ret = account_create(&account);
1204 ACCOUNT_SLOGD("account_set_user_name: Enter User Name to be set \n");
1205 if (scanf("%s", temp) != 1) {
1206 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1207 ret = account_destroy(account);
1208 if(ret != ACCOUNT_ERROR_NONE)
1210 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1213 ret = account_disconnect();
1215 if(ret != ACCOUNT_ERROR_NONE)
1217 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1222 ret = account_set_user_name(account, temp);
1224 if(ret != ACCOUNT_ERROR_NONE)
1226 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1228 memset(temp, 0x00, sizeof(temp));
1230 ACCOUNT_SLOGD("account_set_display_name: Enter display Name to be set \n");
1231 if (scanf("%s", temp) != 1) {
1232 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1233 ret = account_destroy(account);
1234 if(ret != ACCOUNT_ERROR_NONE)
1236 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1239 ret = account_disconnect();
1241 if(ret != ACCOUNT_ERROR_NONE)
1243 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1248 ret = account_set_display_name(account, temp);
1250 if(ret != ACCOUNT_ERROR_NONE)
1252 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1254 memset(temp, 0x00, sizeof(temp));
1255 ACCOUNT_SLOGD("account_set_domain_name: Enter domain Name to be set \n");
1256 if (scanf("%s", temp) != 1) {
1257 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1258 ret = account_destroy(account);
1259 if(ret != ACCOUNT_ERROR_NONE)
1261 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1264 ret = account_disconnect();
1266 if(ret != ACCOUNT_ERROR_NONE)
1268 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1273 ret = account_set_domain_name(account, temp);
1274 if(ret != ACCOUNT_ERROR_NONE)
1276 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1279 memset(temp, 0x00, sizeof(temp));
1280 ACCOUNT_SLOGD("account_set_email_address: Enter email Name to be set \n");
1281 if (scanf("%s", temp) != 1) {
1282 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1283 ret = account_destroy(account);
1284 if(ret != ACCOUNT_ERROR_NONE)
1286 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1289 ret = account_disconnect();
1291 if(ret != ACCOUNT_ERROR_NONE)
1293 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1297 ret = account_set_email_address(account, temp);
1298 if(ret != ACCOUNT_ERROR_NONE)
1300 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1302 memset(temp, 0x00, sizeof(temp));
1304 ACCOUNT_SLOGD("account_set_package_name: Enter package Name to be set \n");
1305 if (scanf("%s", temp) != 1) {
1306 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1307 ret = account_destroy(account);
1308 if(ret != ACCOUNT_ERROR_NONE)
1310 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1313 ret = account_disconnect();
1315 if(ret != ACCOUNT_ERROR_NONE)
1317 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1322 ret = account_set_package_name(account, temp);
1323 if(ret != ACCOUNT_ERROR_NONE)
1325 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1327 memset(temp, 0x00, sizeof(temp));
1329 ACCOUNT_SLOGD("account_set_icon_path: Enter icon path to be set \n");
1330 if (scanf("%s", temp) != 1) {
1331 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1332 ret = account_destroy(account);
1333 if(ret != ACCOUNT_ERROR_NONE)
1335 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1338 ret = account_disconnect();
1340 if(ret != ACCOUNT_ERROR_NONE)
1342 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1347 ret = account_set_icon_path(account, temp);
1348 if(ret != ACCOUNT_ERROR_NONE)
1350 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1352 memset(temp, 0x00, sizeof(temp));
1354 ACCOUNT_SLOGD("account_set_access_token: Enter access token to be set \n");
1355 if (scanf("%s", temp) != 1) {
1356 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1357 ret = account_destroy(account);
1358 if(ret != ACCOUNT_ERROR_NONE)
1360 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1363 ret = account_disconnect();
1365 if(ret != ACCOUNT_ERROR_NONE)
1367 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1372 ret = account_set_access_token(account, temp);
1373 if(ret != ACCOUNT_ERROR_NONE)
1375 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1377 memset(temp, 0x00, sizeof(temp));
1379 ACCOUNT_SLOGD("account_set_auth_type: Enter auth type to be set \n");
1380 if (scanf("%d", &temp_int) != 1) {
1381 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1382 ret = account_destroy(account);
1383 if(ret != ACCOUNT_ERROR_NONE)
1385 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1388 ret = account_disconnect();
1390 if(ret != ACCOUNT_ERROR_NONE)
1392 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1397 ret = account_set_auth_type( account, temp_int );
1398 if(ret != ACCOUNT_ERROR_NONE)
1400 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1403 ACCOUNT_SLOGD("account_set_secret: Enter secret to be set \n");
1404 if (scanf("%d", &temp_int) != 1) {
1405 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1406 ret = account_destroy(account);
1407 if(ret != ACCOUNT_ERROR_NONE)
1409 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1412 ret = account_disconnect();
1414 if(ret != ACCOUNT_ERROR_NONE)
1416 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1421 ret = account_set_secret( account, temp_int );
1422 if(ret != ACCOUNT_ERROR_NONE)
1424 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1428 ACCOUNT_SLOGD("account_set_sync_support: Enter sync support state \n");
1429 if (scanf("%d", &temp_int) != 1) {
1430 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1431 ret = account_destroy(account);
1432 if(ret != ACCOUNT_ERROR_NONE)
1434 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1437 ret = account_disconnect();
1439 if(ret != ACCOUNT_ERROR_NONE)
1441 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1446 ret = account_set_sync_support( account, temp_int );
1447 if(ret != ACCOUNT_ERROR_NONE)
1449 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1452 memset(temp, 0x00, sizeof(temp));
1454 ACCOUNT_SLOGD("account_set_source: Enter source to be set \n");
1455 if (scanf("%s", temp) != 1) {
1456 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1457 ret = account_destroy(account);
1458 if(ret != ACCOUNT_ERROR_NONE)
1460 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1463 ret = account_disconnect();
1465 if(ret != ACCOUNT_ERROR_NONE)
1467 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1471 ret = account_set_source(account, temp);
1475 for(i=0;i<USER_TXT_CNT;i++)
1477 memset(temp, 0x00, sizeof(temp));
1479 ACCOUNT_SLOGD("account_set_user_text [%d]: Enter user text to be set \n", i);
1480 if (scanf("%s", temp) != 1) {
1481 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1482 ret = account_destroy(account);
1483 if(ret != ACCOUNT_ERROR_NONE)
1485 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1488 ret = account_disconnect();
1490 if(ret != ACCOUNT_ERROR_NONE)
1492 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1496 ret = account_set_user_text(account, i, temp);
1497 if(ret != ACCOUNT_ERROR_NONE)
1499 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1504 for(i=0;i<USER_INT_CNT;i++)
1507 ACCOUNT_SLOGD("account_set_user_int [%d]: Enter user int to be set \n", i);
1508 if (scanf("%d", &temp_int) != 1) {
1509 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1510 ret = account_destroy(account);
1511 if(ret != ACCOUNT_ERROR_NONE)
1513 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1516 ret = account_disconnect();
1518 if(ret != ACCOUNT_ERROR_NONE)
1520 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1524 ret = account_set_user_int(account, i, temp_int);
1525 if(ret != ACCOUNT_ERROR_NONE)
1527 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1533 int want_to_enter_more_cap = 1;
1534 while (want_to_enter_more_cap){
1535 ACCOUNT_SLOGD("account_set_capability: Enter capability key to set \n");
1536 if (scanf("%d", &cap_key) != 1) {
1537 ACCOUNT_SLOGD("Scanf Failed!!!\n");
1540 ACCOUNT_SLOGD("account_set_capability: Enter capability value to set \n");
1541 if (scanf("%d", &cap_value) != 1) {
1542 ACCOUNT_SLOGD("Scanf Failed!!!\n");
1545 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL, cap_value);
1546 if(ret != ACCOUNT_ERROR_NONE)
1548 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1550 ACCOUNT_SLOGD("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
1551 if (scanf("%d", &temp_int) != 1) {
1552 ACCOUNT_SLOGD("scanf Failed !!!! \n");
1553 ret = account_destroy(account);
1554 if(ret != ACCOUNT_ERROR_NONE)
1556 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1559 ret = account_disconnect();
1561 if(ret != ACCOUNT_ERROR_NONE)
1563 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1568 want_to_enter_more_cap = 1;
1570 want_to_enter_more_cap = 0;
1573 ret = account_update_to_db_by_id(account, account_id);
1575 if(ret != ACCOUNT_ERROR_NONE)
1577 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1580 ret = account_destroy(account);
1581 if(ret != ACCOUNT_ERROR_NONE)
1583 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1586 ret = account_disconnect();
1588 if(ret != ACCOUNT_ERROR_NONE)
1590 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1597 static int _account_update_test(int account_id)
1601 account_h account = NULL;
1603 ret = account_create(&account);
1605 ret = account_set_user_name(account, "updated-wy1115");
1607 if(ret != ACCOUNT_ERROR_NONE)
1609 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1612 ret = account_set_display_name(account, "updated-Wonyoung Lee");
1614 if(ret != ACCOUNT_ERROR_NONE)
1616 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1619 ret = account_set_domain_name(account, "updated-Samsung Facebook");
1620 if(ret != ACCOUNT_ERROR_NONE)
1622 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1624 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
1625 if(ret != ACCOUNT_ERROR_NONE)
1627 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1629 ret = account_set_package_name(account, "updated-com.samsung.account");
1630 if(ret != ACCOUNT_ERROR_NONE)
1632 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1634 ret = account_set_icon_path(account, "updated-icon-path");
1635 if(ret != ACCOUNT_ERROR_NONE)
1637 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1640 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
1641 if(ret != ACCOUNT_ERROR_NONE)
1643 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1646 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
1647 if(ret != ACCOUNT_ERROR_NONE)
1649 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1651 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
1652 if(ret != ACCOUNT_ERROR_NONE)
1654 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1656 ret = account_set_source(account, "updated-URUSA inc.");
1660 for(i=0;i<USER_TXT_CNT;i++)
1662 ret = account_set_user_text(account, i, "updated-user txt");
1663 if(ret != ACCOUNT_ERROR_NONE)
1665 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1670 for(i=0;i<USER_INT_CNT;i++)
1672 ret = account_set_user_int(account, i, 111);
1673 if(ret != ACCOUNT_ERROR_NONE)
1675 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1680 ret = account_set_capability(account, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED);
1681 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_ENABLED);
1682 ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_ENABLED);
1683 ret = account_set_capability(account, ACCOUNT_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_ENABLED);
1684 ret = account_set_capability(account, ACCOUNT_CAPABILITY_MOBILE_TRACKER, ACCOUNT_CAPABILITY_ENABLED);
1686 ret = account_update_to_db_by_id(account, account_id);
1689 if(ret != ACCOUNT_ERROR_NONE)
1691 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1694 ret = account_destroy(account);
1695 if(ret != ACCOUNT_ERROR_NONE)
1697 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1704 static int _account_update_test_by_username()
1708 account_h account = NULL;
1710 ret = account_create(&account);
1712 ret = account_set_user_name(account, "usernamed-wy1115");
1714 if(ret != ACCOUNT_ERROR_NONE)
1716 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1719 ret = account_set_display_name(account, "usernamed-Wonyoung Lee");
1721 if(ret != ACCOUNT_ERROR_NONE)
1723 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1726 ret = account_set_domain_name(account, "usernamed-Samsung Facebook");
1727 if(ret != ACCOUNT_ERROR_NONE)
1729 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1731 ret = account_set_email_address(account, "usernamed-urusa77@gmail.com");
1732 if(ret != ACCOUNT_ERROR_NONE)
1734 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1736 ret = account_set_package_name(account, "usernamed-com.samsung.account");
1737 if(ret != ACCOUNT_ERROR_NONE)
1739 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1741 ret = account_set_icon_path(account, "usernamed-icon-path");
1742 if(ret != ACCOUNT_ERROR_NONE)
1744 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1747 ret = account_set_access_token(account, "usernamed-ACCESSTOKEN");
1748 if(ret != ACCOUNT_ERROR_NONE)
1750 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1753 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
1754 if(ret != ACCOUNT_ERROR_NONE)
1756 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1758 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
1759 if(ret != ACCOUNT_ERROR_NONE)
1761 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1763 ret = account_set_source(account, "updated-URUSA inc.");
1767 for(i=0;i<USER_TXT_CNT;i++)
1769 ret = account_set_user_text(account, i, "usernamed-user txt");
1770 if(ret != ACCOUNT_ERROR_NONE)
1772 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1777 for(i=0;i<USER_INT_CNT;i++)
1779 ret = account_set_user_int(account, i, 111);
1780 if(ret != ACCOUNT_ERROR_NONE)
1782 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1787 ret = account_set_capability(account, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED);
1788 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_ENABLED);
1789 ret = account_set_capability(account, ACCOUNT_CAPABILITY_VOIP, ACCOUNT_CAPABILITY_ENABLED);
1790 ret = account_set_capability(account, ACCOUNT_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_ENABLED);
1791 ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_ENABLED);
1793 ret = account_update_to_db_by_user_name(account, "updated-wy1115", "updated-com.samsung.account");
1796 if(ret != ACCOUNT_ERROR_NONE)
1798 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1801 ret = account_destroy(account);
1802 if(ret != ACCOUNT_ERROR_NONE)
1804 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1811 static int _account_test_capability()
1813 GSList* list = NULL;
1814 GSList* iter = NULL;
1817 list = g_slist_append(list, strdup("test 1"));
1818 list = g_slist_append(list, strdup("test 2"));
1819 list = g_slist_append(list, strdup("test 3"));
1820 list = g_slist_append(list, strdup("test 4"));
1821 list = g_slist_append(list, strdup("test 5"));
1822 list = g_slist_append(list, strdup("test 6"));
1824 glist_len = g_slist_length( list );
1826 int capability_count = g_slist_length( list );
1828 int binding_bufsize = 2+2*(capability_count*2)+1;
1830 int binding_buf_index = 0;
1831 char* binding_buf = (char*)malloc(sizeof(char)*binding_bufsize);
1833 memset(binding_buf, 0, sizeof(char)*binding_bufsize);
1835 binding_buf[binding_buf_index++]='(';
1837 ACCOUNT_SLOGD("(%d)Binding buf = %s\n", __LINE__,binding_buf);
1841 for(i=0;i<capability_count;i++)
1843 /*snprintf(binding_buf+binding_buf_index, strlen(binding_buf)+2, "%s?,", binding_buf);*/
1844 binding_buf[binding_buf_index++]='?';
1845 if(i != capability_count -1)
1846 binding_buf[binding_buf_index++]=',';
1847 ACCOUNT_SLOGD("(%d)Binding buf = %s\n", __LINE__,binding_buf);
1850 binding_buf[binding_buf_index]=')';
1852 ACCOUNT_SLOGD("(%d)Binding buf = %s\n", __LINE__,binding_buf);
1854 ACCOUNT_SLOGD("Length %d\n", glist_len);
1856 for (iter = list; iter != NULL; iter = g_slist_next(iter))
1859 capa = (char *)iter->data;
1860 ACCOUNT_SLOGD("%s\n", (char *)iter->data);
1866 g_free(binding_buf);
1871 static int utc1_account_insert()
1875 account_h account = NULL;
1876 int account_id = -1;
1877 ret = account_connect();
1878 if(ret != ACCOUNT_ERROR_NONE)
1880 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1883 ret = account_create(&account);
1885 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
1887 ret = account_insert_to_db(account, &account_id);
1889 if(ret != ACCOUNT_ERROR_NONE)
1891 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1895 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1898 ret = account_destroy(account);
1899 if(ret != ACCOUNT_ERROR_NONE)
1901 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1905 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1907 ret = account_disconnect();
1908 if(ret != ACCOUNT_ERROR_NONE)
1910 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1915 static int utc2_account_insert()
1919 account_h account = NULL;
1920 int account_id = -1;
1921 ret = account_connect();
1922 if(ret != ACCOUNT_ERROR_NONE)
1924 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1927 ret = account_create(&account);
1929 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
1931 ret = account_set_user_name(account, NULL);
1932 if(ret != ACCOUNT_ERROR_NONE)
1934 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1938 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1940 ret = account_insert_to_db(account, &account_id);
1942 if(ret != ACCOUNT_ERROR_NONE)
1944 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1948 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1951 ret = account_destroy(account);
1952 if(ret != ACCOUNT_ERROR_NONE)
1954 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1958 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1960 ret = account_disconnect();
1961 if(ret != ACCOUNT_ERROR_NONE)
1963 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1971 static int utc3_account_insert()
1975 account_h account = NULL;
1976 int account_id = -1;
1977 ret = account_connect();
1978 if(ret != ACCOUNT_ERROR_NONE)
1980 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1983 ret = account_create(&account);
1985 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
1987 ret = account_set_user_name(account, "11111111111111111111111111111111111 \
1988 2222222222222222222222222222222222222222222222222 \
1989 3333333333333333333333333333333333333333333333333\
1990 4444444444444444444444444444444444444444444444444\
1991 5555555555555555555555555555555555555555555555555\
1992 666666666666666666666666666666666666666666666666\
1993 777777777777777777777777777777777777777777777777\
1994 888888888888888888888888888888888888888888888888\
1995 99999999999999999999999999999999999999999999999\
1996 111111111111111111111111111111111111111111111111\
1997 22222222222222222222222222222222222222222222222\
1998 333333333333333333333333333333333333333333333\
1999 444444444444444444444444444444444444444444\
2000 444444444444444444444444444444444444444444444444\
2001 555555555555555555555555555555555555555555555555 \
2002 66666666666666666666666666666666666666666666666666\
2003 777777777777777777777777777777777777777777777777779999999999999999999999999999999999999999\
2004 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\
2005 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999");
2006 if(ret != ACCOUNT_ERROR_NONE)
2008 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2012 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2014 ret = account_insert_to_db(account, &account_id);
2016 if(ret != ACCOUNT_ERROR_NONE)
2018 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2022 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2025 ret = account_destroy(account);
2026 if(ret != ACCOUNT_ERROR_NONE)
2028 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2032 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2034 ret = account_disconnect();
2035 if(ret != ACCOUNT_ERROR_NONE)
2037 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2042 static int utc4_account_insert()
2046 account_h account = NULL;
2047 int account_id = -1;
2048 ret = account_connect();
2049 if(ret != ACCOUNT_ERROR_NONE)
2051 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2054 ret = account_create(&account);
2056 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2058 ret = account_set_user_name(account, "tarun.kr");
2059 if(ret != ACCOUNT_ERROR_NONE)
2061 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2065 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2068 ret = account_set_display_name(account, NULL);
2070 if(ret != ACCOUNT_ERROR_NONE)
2072 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2076 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2079 ret = account_insert_to_db(account, &account_id);
2081 if(ret != ACCOUNT_ERROR_NONE)
2083 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2087 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2090 ret = account_destroy(account);
2091 if(ret != ACCOUNT_ERROR_NONE)
2093 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2097 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2099 ret = account_disconnect();
2100 if(ret != ACCOUNT_ERROR_NONE)
2102 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2107 static int utc5_account_insert()
2111 account_h account = NULL;
2112 int account_id = -1;
2113 ret = account_connect();
2114 if(ret != ACCOUNT_ERROR_NONE)
2116 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2119 ret = account_create(&account);
2121 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2123 ret = account_set_user_name(account, "tarun.kr");
2124 if(ret != ACCOUNT_ERROR_NONE)
2126 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2130 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2133 ret = account_set_display_name(account, "tarun kumar");
2135 if(ret != ACCOUNT_ERROR_NONE)
2137 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2141 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2144 ret = account_set_domain_name(account, NULL);
2145 if(ret != ACCOUNT_ERROR_NONE)
2147 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2151 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2153 ret = account_insert_to_db(account, &account_id);
2155 if(ret != ACCOUNT_ERROR_NONE)
2157 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2161 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2164 ret = account_destroy(account);
2165 if(ret != ACCOUNT_ERROR_NONE)
2167 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2171 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2173 ret = account_disconnect();
2174 if(ret != ACCOUNT_ERROR_NONE)
2176 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2181 static int utc6_account_insert()
2185 account_h account = NULL;
2186 int account_id = -1;
2187 ret = account_connect();
2188 if(ret != ACCOUNT_ERROR_NONE)
2190 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2193 ret = account_create(&account);
2195 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2197 ret = account_set_user_name(account, "tarun.kr");
2198 if(ret != ACCOUNT_ERROR_NONE)
2200 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2204 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2207 ret = account_set_display_name(account, "tarun kumar");
2209 if(ret != ACCOUNT_ERROR_NONE)
2211 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2215 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2218 ret = account_set_domain_name(account, "Samsung");
2219 if(ret != ACCOUNT_ERROR_NONE)
2221 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2225 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2227 ret = account_insert_to_db(account, &account_id);
2229 if(ret != ACCOUNT_ERROR_NONE)
2231 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2235 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2238 ret = account_destroy(account);
2239 if(ret != ACCOUNT_ERROR_NONE)
2241 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2245 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2247 ret = account_disconnect();
2248 if(ret != ACCOUNT_ERROR_NONE)
2250 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2255 static int utc7_account_insert()
2259 account_h account = NULL;
2260 int account_id = -1;
2261 ret = account_connect();
2262 if(ret != ACCOUNT_ERROR_NONE)
2264 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2267 ret = account_create(&account);
2269 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2271 ret = account_set_user_name(account, "tarun.kr");
2272 if(ret != ACCOUNT_ERROR_NONE)
2274 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2278 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2281 ret = account_set_display_name(account, "tarun kumar");
2283 if(ret != ACCOUNT_ERROR_NONE)
2285 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2289 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2292 ret = account_set_domain_name(account, "Samsung");
2293 if(ret != ACCOUNT_ERROR_NONE)
2295 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2299 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2302 ret = account_set_email_address(account, NULL);
2303 if(ret != ACCOUNT_ERROR_NONE)
2305 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2309 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2312 ret = account_insert_to_db(account, &account_id);
2314 if(ret != ACCOUNT_ERROR_NONE)
2316 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2320 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2323 ret = account_destroy(account);
2324 if(ret != ACCOUNT_ERROR_NONE)
2326 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2330 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2332 ret = account_disconnect();
2333 if(ret != ACCOUNT_ERROR_NONE)
2335 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2340 static int utc8_account_insert()
2344 account_h account = NULL;
2345 int account_id = -1;
2346 ret = account_connect();
2347 if(ret != ACCOUNT_ERROR_NONE)
2349 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2352 ret = account_create(&account);
2354 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2356 ret = account_set_user_name(account, "tarun.kr");
2357 if(ret != ACCOUNT_ERROR_NONE)
2359 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2363 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2366 ret = account_set_display_name(account, "tarun kumar");
2368 if(ret != ACCOUNT_ERROR_NONE)
2370 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2374 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2377 ret = account_set_domain_name(account, "Samsung");
2378 if(ret != ACCOUNT_ERROR_NONE)
2380 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2384 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2387 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2388 if(ret != ACCOUNT_ERROR_NONE)
2390 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2394 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2397 ret = account_insert_to_db(account, &account_id);
2399 if(ret != ACCOUNT_ERROR_NONE)
2401 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2405 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2408 ret = account_destroy(account);
2409 if(ret != ACCOUNT_ERROR_NONE)
2411 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2415 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2417 ret = account_disconnect();
2418 if(ret != ACCOUNT_ERROR_NONE)
2420 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2425 static int utc9_account_insert()
2429 account_h account = NULL;
2430 int account_id = -1;
2431 ret = account_connect();
2432 if(ret != ACCOUNT_ERROR_NONE)
2434 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2437 ret = account_create(&account);
2439 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2441 ret = account_set_user_name(account, "tarun.kr");
2442 if(ret != ACCOUNT_ERROR_NONE)
2444 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2448 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2451 ret = account_set_display_name(account, "tarun kumar");
2453 if(ret != ACCOUNT_ERROR_NONE)
2455 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2459 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2462 ret = account_set_domain_name(account, "Samsung");
2463 if(ret != ACCOUNT_ERROR_NONE)
2465 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2469 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2472 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2473 if(ret != ACCOUNT_ERROR_NONE)
2475 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2479 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2482 ret = account_set_package_name(account, NULL);
2483 if(ret != ACCOUNT_ERROR_NONE)
2485 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2489 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2491 ret = account_insert_to_db(account, &account_id);
2493 if(ret != ACCOUNT_ERROR_NONE)
2495 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2499 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2502 ret = account_destroy(account);
2503 if(ret != ACCOUNT_ERROR_NONE)
2505 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2509 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2511 ret = account_disconnect();
2512 if(ret != ACCOUNT_ERROR_NONE)
2514 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2519 static int utc10_account_insert()
2523 account_h account = NULL;
2524 int account_id = -1;
2525 ret = account_connect();
2526 if(ret != ACCOUNT_ERROR_NONE)
2528 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2531 ret = account_create(&account);
2533 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2535 ret = account_set_user_name(account, "tarun.kr");
2536 if(ret != ACCOUNT_ERROR_NONE)
2538 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2542 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2545 ret = account_set_display_name(account, "tarun kumar");
2547 if(ret != ACCOUNT_ERROR_NONE)
2549 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2553 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2556 ret = account_set_domain_name(account, "Samsung");
2557 if(ret != ACCOUNT_ERROR_NONE)
2559 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2563 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2566 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2567 if(ret != ACCOUNT_ERROR_NONE)
2569 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2573 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2576 ret = account_set_package_name(account, "com.samsung.accounts");
2577 if(ret != ACCOUNT_ERROR_NONE)
2579 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2583 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2585 ret = account_insert_to_db(account, &account_id);
2587 if(ret != ACCOUNT_ERROR_NONE)
2589 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2593 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2596 ret = account_destroy(account);
2597 if(ret != ACCOUNT_ERROR_NONE)
2599 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2603 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2605 ret = account_disconnect();
2606 if(ret != ACCOUNT_ERROR_NONE)
2608 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2613 static int utc11_account_insert()
2617 account_h account = NULL;
2618 int account_id = -1;
2619 ret = account_connect();
2620 if(ret != ACCOUNT_ERROR_NONE)
2622 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2625 ret = account_create(&account);
2627 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2629 ret = account_set_user_name(account, "tarun.kr");
2630 if(ret != ACCOUNT_ERROR_NONE)
2632 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2636 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2639 ret = account_set_display_name(account, "tarun kumar");
2641 if(ret != ACCOUNT_ERROR_NONE)
2643 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2647 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2650 ret = account_set_domain_name(account, "Samsung");
2651 if(ret != ACCOUNT_ERROR_NONE)
2653 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2657 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2660 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2661 if(ret != ACCOUNT_ERROR_NONE)
2663 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2667 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2670 ret = account_set_package_name(account, "com.samsung.accounts");
2671 if(ret != ACCOUNT_ERROR_NONE)
2673 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2677 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2680 ret = account_set_icon_path(account, NULL);
2682 if(ret != ACCOUNT_ERROR_NONE)
2684 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2688 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2690 ret = account_insert_to_db(account, &account_id);
2692 if(ret != ACCOUNT_ERROR_NONE)
2694 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2698 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2701 ret = account_destroy(account);
2702 if(ret != ACCOUNT_ERROR_NONE)
2704 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2708 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2710 ret = account_disconnect();
2711 if(ret != ACCOUNT_ERROR_NONE)
2713 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2718 static int utc12_account_insert()
2722 account_h account = NULL;
2723 int account_id = -1;
2724 ret = account_connect();
2725 if(ret != ACCOUNT_ERROR_NONE)
2727 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2730 ret = account_create(&account);
2732 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2734 ret = account_set_user_name(account, "tarun.kr");
2735 if(ret != ACCOUNT_ERROR_NONE)
2737 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2741 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2744 ret = account_set_display_name(account, "tarun kumar");
2746 if(ret != ACCOUNT_ERROR_NONE)
2748 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2752 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2755 ret = account_set_domain_name(account, "Samsung");
2756 if(ret != ACCOUNT_ERROR_NONE)
2758 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2762 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2765 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2766 if(ret != ACCOUNT_ERROR_NONE)
2768 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2772 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2775 ret = account_set_package_name(account, "com.samsung.accounts");
2776 if(ret != ACCOUNT_ERROR_NONE)
2778 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2782 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2785 ret = account_set_icon_path(account, "/test/test.jpg");
2787 if(ret != ACCOUNT_ERROR_NONE)
2789 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2793 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2795 ret = account_insert_to_db(account, &account_id);
2797 if(ret != ACCOUNT_ERROR_NONE)
2799 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2803 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2806 ret = account_destroy(account);
2807 if(ret != ACCOUNT_ERROR_NONE)
2809 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2813 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2815 ret = account_disconnect();
2816 if(ret != ACCOUNT_ERROR_NONE)
2818 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2823 static int utc13_account_insert()
2827 account_h account = NULL;
2828 int account_id = -1;
2829 ret = account_connect();
2830 if(ret != ACCOUNT_ERROR_NONE)
2832 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2835 ret = account_create(&account);
2837 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2839 ret = account_set_user_name(account, "tarun.kr");
2840 if(ret != ACCOUNT_ERROR_NONE)
2842 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2846 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2849 ret = account_set_display_name(account, "tarun kumar");
2851 if(ret != ACCOUNT_ERROR_NONE)
2853 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2857 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2860 ret = account_set_domain_name(account, "Samsung");
2861 if(ret != ACCOUNT_ERROR_NONE)
2863 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2867 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2870 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2871 if(ret != ACCOUNT_ERROR_NONE)
2873 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2877 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2880 ret = account_set_package_name(account, "com.samsung.accounts");
2881 if(ret != ACCOUNT_ERROR_NONE)
2883 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2887 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2890 ret = account_set_icon_path(account, "/test/test.jpg");
2892 if(ret != ACCOUNT_ERROR_NONE)
2894 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2898 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2901 ret = account_set_access_token(account, NULL);
2902 if(ret != ACCOUNT_ERROR_NONE)
2904 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2908 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2912 ret = account_insert_to_db(account, &account_id);
2914 if(ret != ACCOUNT_ERROR_NONE)
2916 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2920 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2923 ret = account_destroy(account);
2924 if(ret != ACCOUNT_ERROR_NONE)
2926 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2930 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2932 ret = account_disconnect();
2933 if(ret != ACCOUNT_ERROR_NONE)
2935 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2940 static int utc14_account_insert()
2944 account_h account = NULL;
2945 int account_id = -1;
2946 ret = account_connect();
2947 if(ret != ACCOUNT_ERROR_NONE)
2949 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2952 ret = account_create(&account);
2954 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2956 ret = account_set_user_name(account, "tarun.kr");
2957 if(ret != ACCOUNT_ERROR_NONE)
2959 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2963 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2966 ret = account_set_display_name(account, "tarun kumar");
2968 if(ret != ACCOUNT_ERROR_NONE)
2970 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2974 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2977 ret = account_set_domain_name(account, "Samsung");
2978 if(ret != ACCOUNT_ERROR_NONE)
2980 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2984 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2987 ret = account_set_email_address(account, "tarun.kr@samsung.com");
2988 if(ret != ACCOUNT_ERROR_NONE)
2990 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2994 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2997 ret = account_set_package_name(account, "com.samsung.accounts");
2998 if(ret != ACCOUNT_ERROR_NONE)
3000 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3004 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3007 ret = account_set_icon_path(account, "/test/test.jpg");
3009 if(ret != ACCOUNT_ERROR_NONE)
3011 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3015 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3018 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3019 if(ret != ACCOUNT_ERROR_NONE)
3021 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3025 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3029 ret = account_insert_to_db(account, &account_id);
3031 if(ret != ACCOUNT_ERROR_NONE)
3033 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3037 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3040 ret = account_destroy(account);
3041 if(ret != ACCOUNT_ERROR_NONE)
3043 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3047 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3049 ret = account_disconnect();
3050 if(ret != ACCOUNT_ERROR_NONE)
3052 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3057 static int utc15_account_insert()
3061 account_h account = NULL;
3062 int account_id = -1;
3063 ret = account_connect();
3064 if(ret != ACCOUNT_ERROR_NONE)
3066 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3069 ret = account_create(&account);
3071 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3073 ret = account_set_user_name(account, "tarun.kr");
3074 if(ret != ACCOUNT_ERROR_NONE)
3076 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3080 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3083 ret = account_set_display_name(account, "tarun kumar");
3085 if(ret != ACCOUNT_ERROR_NONE)
3087 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3091 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3094 ret = account_set_domain_name(account, "Samsung");
3095 if(ret != ACCOUNT_ERROR_NONE)
3097 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3101 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3104 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3105 if(ret != ACCOUNT_ERROR_NONE)
3107 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3111 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3114 ret = account_set_package_name(account, "com.samsung.accounts");
3115 if(ret != ACCOUNT_ERROR_NONE)
3117 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3121 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3124 ret = account_set_icon_path(account, "/test/test.jpg");
3126 if(ret != ACCOUNT_ERROR_NONE)
3128 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3132 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3135 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3136 if(ret != ACCOUNT_ERROR_NONE)
3138 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3142 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3145 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3146 if(ret != ACCOUNT_ERROR_NONE)
3148 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3152 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3154 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3155 if(ret != ACCOUNT_ERROR_NONE)
3157 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3161 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3163 ret = account_insert_to_db(account, &account_id);
3165 if(ret != ACCOUNT_ERROR_NONE)
3167 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3171 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3174 ret = account_destroy(account);
3175 if(ret != ACCOUNT_ERROR_NONE)
3177 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3181 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3183 ret = account_disconnect();
3184 if(ret != ACCOUNT_ERROR_NONE)
3186 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3191 static int utc16_account_insert()
3195 account_h account = NULL;
3196 int account_id = -1;
3197 ret = account_connect();
3198 if(ret != ACCOUNT_ERROR_NONE)
3200 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3203 ret = account_create(&account);
3205 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3207 ret = account_set_user_name(account, "tarun.kr");
3208 if(ret != ACCOUNT_ERROR_NONE)
3210 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3214 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3217 ret = account_set_display_name(account, "tarun kumar");
3219 if(ret != ACCOUNT_ERROR_NONE)
3221 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3225 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3228 ret = account_set_domain_name(account, "Samsung");
3229 if(ret != ACCOUNT_ERROR_NONE)
3231 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3235 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3238 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3239 if(ret != ACCOUNT_ERROR_NONE)
3241 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3245 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3248 ret = account_set_package_name(account, "com.samsung.accounts");
3249 if(ret != ACCOUNT_ERROR_NONE)
3251 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3255 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3258 ret = account_set_icon_path(account, "/test/test.jpg");
3260 if(ret != ACCOUNT_ERROR_NONE)
3262 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3266 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3269 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3270 if(ret != ACCOUNT_ERROR_NONE)
3272 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3276 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3279 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3280 if(ret != ACCOUNT_ERROR_NONE)
3282 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3286 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3288 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3289 if(ret != ACCOUNT_ERROR_NONE)
3291 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3295 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3297 ret = account_insert_to_db(account, &account_id);
3299 if(ret != ACCOUNT_ERROR_NONE)
3301 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3305 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3308 ret = account_destroy(account);
3309 if(ret != ACCOUNT_ERROR_NONE)
3311 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3315 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3317 ret = account_disconnect();
3318 if(ret != ACCOUNT_ERROR_NONE)
3320 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3325 static int utc17_account_insert()
3329 account_h account = NULL;
3330 int account_id = -1;
3331 ret = account_connect();
3332 if(ret != ACCOUNT_ERROR_NONE)
3334 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3337 ret = account_create(&account);
3339 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3341 ret = account_set_user_name(account, "tarun.kr");
3342 if(ret != ACCOUNT_ERROR_NONE)
3344 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3348 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3351 ret = account_set_display_name(account, "tarun kumar");
3353 if(ret != ACCOUNT_ERROR_NONE)
3355 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3359 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3362 ret = account_set_domain_name(account, "Samsung");
3363 if(ret != ACCOUNT_ERROR_NONE)
3365 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3369 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3372 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3373 if(ret != ACCOUNT_ERROR_NONE)
3375 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3379 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3382 ret = account_set_package_name(account, "com.samsung.accounts");
3383 if(ret != ACCOUNT_ERROR_NONE)
3385 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3389 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3392 ret = account_set_icon_path(account, "/test/test.jpg");
3394 if(ret != ACCOUNT_ERROR_NONE)
3396 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3400 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3403 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3404 if(ret != ACCOUNT_ERROR_NONE)
3406 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3410 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3413 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3414 if(ret != ACCOUNT_ERROR_NONE)
3416 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3420 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3422 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3423 if(ret != ACCOUNT_ERROR_NONE)
3425 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3429 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3432 ret = account_set_source(account, NULL);
3433 if(ret != ACCOUNT_ERROR_NONE)
3435 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3439 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3441 ret = account_insert_to_db(account, &account_id);
3443 if(ret != ACCOUNT_ERROR_NONE)
3445 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3449 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3452 ret = account_destroy(account);
3453 if(ret != ACCOUNT_ERROR_NONE)
3455 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3459 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3461 ret = account_disconnect();
3462 if(ret != ACCOUNT_ERROR_NONE)
3464 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3469 static int utc18_account_insert()
3473 account_h account = NULL;
3474 int account_id = -1;
3475 ret = account_connect();
3476 if(ret != ACCOUNT_ERROR_NONE)
3478 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3481 ret = account_create(&account);
3483 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3485 ret = account_set_user_name(account, "tarun.kr");
3486 if(ret != ACCOUNT_ERROR_NONE)
3488 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3492 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3495 ret = account_set_display_name(account, "tarun kumar");
3497 if(ret != ACCOUNT_ERROR_NONE)
3499 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3503 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3506 ret = account_set_domain_name(account, "Samsung");
3507 if(ret != ACCOUNT_ERROR_NONE)
3509 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3513 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3516 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3517 if(ret != ACCOUNT_ERROR_NONE)
3519 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3523 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3526 ret = account_set_package_name(account, "com.samsung.accounts");
3527 if(ret != ACCOUNT_ERROR_NONE)
3529 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3533 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3536 ret = account_set_icon_path(account, "/test/test.jpg");
3538 if(ret != ACCOUNT_ERROR_NONE)
3540 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3544 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3547 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3548 if(ret != ACCOUNT_ERROR_NONE)
3550 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3554 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3557 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3558 if(ret != ACCOUNT_ERROR_NONE)
3560 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3564 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3566 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3567 if(ret != ACCOUNT_ERROR_NONE)
3569 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3573 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3576 ret = account_set_source(account, "URUSA inc.");
3577 if(ret != ACCOUNT_ERROR_NONE)
3579 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3583 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3585 ret = account_insert_to_db(account, &account_id);
3587 if(ret != ACCOUNT_ERROR_NONE)
3589 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3593 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3596 ret = account_destroy(account);
3597 if(ret != ACCOUNT_ERROR_NONE)
3599 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3603 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3605 ret = account_disconnect();
3606 if(ret != ACCOUNT_ERROR_NONE)
3608 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3613 static int utc19_account_insert()
3617 account_h account = NULL;
3618 int account_id = -1;
3619 ret = account_connect();
3620 if(ret != ACCOUNT_ERROR_NONE)
3622 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3625 ret = account_create(&account);
3627 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3629 ret = account_set_user_name(account, "tarun.kr");
3630 if(ret != ACCOUNT_ERROR_NONE)
3632 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3636 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3639 ret = account_set_display_name(account, "tarun kumar");
3641 if(ret != ACCOUNT_ERROR_NONE)
3643 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3647 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3650 ret = account_set_domain_name(account, "Samsung");
3651 if(ret != ACCOUNT_ERROR_NONE)
3653 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3657 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3660 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3661 if(ret != ACCOUNT_ERROR_NONE)
3663 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3667 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3670 ret = account_set_package_name(account, "com.samsung.accounts");
3671 if(ret != ACCOUNT_ERROR_NONE)
3673 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3677 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3680 ret = account_set_icon_path(account, "/test/test.jpg");
3682 if(ret != ACCOUNT_ERROR_NONE)
3684 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3688 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3691 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3692 if(ret != ACCOUNT_ERROR_NONE)
3694 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3698 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3701 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3702 if(ret != ACCOUNT_ERROR_NONE)
3704 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3708 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3710 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3711 if(ret != ACCOUNT_ERROR_NONE)
3713 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3717 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3720 ret = account_set_source(account, "URUSA inc.");
3721 if(ret != ACCOUNT_ERROR_NONE)
3723 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3727 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3732 for(i=0; i<USER_TXT_CNT; i++)
3734 ret = account_set_user_text(account, i, NULL);
3735 if(ret != ACCOUNT_ERROR_NONE)
3737 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3741 ret = account_insert_to_db(account, &account_id);
3743 if(ret != ACCOUNT_ERROR_NONE)
3745 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3749 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3752 ret = account_destroy(account);
3753 if(ret != ACCOUNT_ERROR_NONE)
3755 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3759 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3761 ret = account_disconnect();
3762 if(ret != ACCOUNT_ERROR_NONE)
3764 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3769 static int utc20_account_insert()
3773 account_h account = NULL;
3774 int account_id = -1;
3775 ret = account_connect();
3776 if(ret != ACCOUNT_ERROR_NONE)
3778 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3781 ret = account_create(&account);
3783 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3785 ret = account_set_user_name(account, "tarun.kr");
3786 if(ret != ACCOUNT_ERROR_NONE)
3788 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3792 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3795 ret = account_set_display_name(account, "tarun kumar");
3797 if(ret != ACCOUNT_ERROR_NONE)
3799 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3803 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3806 ret = account_set_domain_name(account, "Samsung");
3807 if(ret != ACCOUNT_ERROR_NONE)
3809 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3813 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3816 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3817 if(ret != ACCOUNT_ERROR_NONE)
3819 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3823 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3826 ret = account_set_package_name(account, "com.samsung.accounts");
3827 if(ret != ACCOUNT_ERROR_NONE)
3829 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3833 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3836 ret = account_set_icon_path(account, "/test/test.jpg");
3838 if(ret != ACCOUNT_ERROR_NONE)
3840 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3844 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3847 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3848 if(ret != ACCOUNT_ERROR_NONE)
3850 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3854 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3857 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3858 if(ret != ACCOUNT_ERROR_NONE)
3860 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3864 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3866 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3867 if(ret != ACCOUNT_ERROR_NONE)
3869 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3873 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3876 ret = account_set_source(account, "URUSA inc.");
3877 if(ret != ACCOUNT_ERROR_NONE)
3879 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3883 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3888 for(i=0; i<USER_TXT_CNT; i++)
3890 ret = account_set_user_text(account, i, "user txt");
3891 if(ret != ACCOUNT_ERROR_NONE)
3893 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3897 ret = account_insert_to_db(account, &account_id);
3899 if(ret != ACCOUNT_ERROR_NONE)
3901 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3905 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3908 ret = account_destroy(account);
3909 if(ret != ACCOUNT_ERROR_NONE)
3911 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3915 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3917 ret = account_disconnect();
3918 if(ret != ACCOUNT_ERROR_NONE)
3920 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3925 static int utc21_account_insert()
3929 account_h account = NULL;
3930 int account_id = -1;
3931 ret = account_connect();
3932 if(ret != ACCOUNT_ERROR_NONE)
3934 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3937 ret = account_create(&account);
3939 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3941 ret = account_set_user_name(account, "tarun.kr");
3942 if(ret != ACCOUNT_ERROR_NONE)
3944 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3948 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3951 ret = account_set_display_name(account, "tarun kumar");
3953 if(ret != ACCOUNT_ERROR_NONE)
3955 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3959 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3962 ret = account_set_domain_name(account, "Samsung");
3963 if(ret != ACCOUNT_ERROR_NONE)
3965 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3969 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3972 ret = account_set_email_address(account, "tarun.kr@samsung.com");
3973 if(ret != ACCOUNT_ERROR_NONE)
3975 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3979 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3982 ret = account_set_package_name(account, "com.samsung.accounts");
3983 if(ret != ACCOUNT_ERROR_NONE)
3985 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3989 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3992 ret = account_set_icon_path(account, "/test/test.jpg");
3994 if(ret != ACCOUNT_ERROR_NONE)
3996 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4000 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4003 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
4004 if(ret != ACCOUNT_ERROR_NONE)
4006 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4010 ACCOUNT_SLOGD("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4013 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
4014 if(ret != ACCOUNT_ERROR_NONE)
4016 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4020 ACCOUNT_SLOGD("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4022 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
4023 if(ret != ACCOUNT_ERROR_NONE)
4025 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4029 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4032 ret = account_set_source(account, "URUSA inc.");
4033 if(ret != ACCOUNT_ERROR_NONE)
4035 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4039 ACCOUNT_SLOGD("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4044 for(i=0; i<USER_TXT_CNT; i++)
4046 ret = account_set_user_text(account, i, "user txt");
4047 if(ret != ACCOUNT_ERROR_NONE)
4049 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4053 for(i=0;i<USER_INT_CNT;i++)
4055 ret = account_set_user_int(account, i, 000);
4056 if(ret != ACCOUNT_ERROR_NONE)
4058 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4061 ret = account_insert_to_db(account, &account_id);
4063 if(ret != ACCOUNT_ERROR_NONE)
4065 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
4069 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4072 ret = account_destroy(account);
4073 if(ret != ACCOUNT_ERROR_NONE)
4075 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4079 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4081 ret = account_disconnect();
4082 if(ret != ACCOUNT_ERROR_NONE)
4084 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4089 static int utc22_account_insert()
4093 account_h account = NULL;
4094 int account_id = -1;
4095 ret = account_connect();
4096 if(ret != ACCOUNT_ERROR_NONE)
4098 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4101 ret = account_create(&account);
4103 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
4105 ret = account_set_user_name(account, "tarun.kr");
4106 if(ret != ACCOUNT_ERROR_NONE)
4108 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
4112 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4115 ret = account_set_display_name(account, "tarun kumar");
4117 if(ret != ACCOUNT_ERROR_NONE)
4119 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4123 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4126 ret = account_set_domain_name(account, "Samsung");
4127 if(ret != ACCOUNT_ERROR_NONE)
4129 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4133 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4136 ret = account_set_email_address(account, "tarun.kr@samsung.com");
4137 if(ret != ACCOUNT_ERROR_NONE)
4139 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4143 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4146 ret = account_set_package_name(account, "com.samsung.accounts");
4147 if(ret != ACCOUNT_ERROR_NONE)
4149 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4153 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4156 ret = account_set_icon_path(account, "/test/test.jpg");
4158 if(ret != ACCOUNT_ERROR_NONE)
4160 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4164 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4167 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
4168 if(ret != ACCOUNT_ERROR_NONE)
4170 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4174 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4177 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
4178 if(ret != ACCOUNT_ERROR_NONE)
4180 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4184 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4186 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
4187 if(ret != ACCOUNT_ERROR_NONE)
4189 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4193 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4196 ret = account_set_source(account, "URUSA inc.");
4197 if(ret != ACCOUNT_ERROR_NONE)
4199 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4203 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4208 for(i=0; i<USER_TXT_CNT; i++)
4210 ret = account_set_user_text(account, i, "user txt");
4211 if(ret != ACCOUNT_ERROR_NONE)
4213 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4218 for(i=0;i<USER_INT_CNT;i++)
4220 ret = account_set_user_int(account, i, 888);
4221 if(ret != ACCOUNT_ERROR_NONE)
4223 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4226 ret = account_insert_to_db(account, &account_id);
4228 if(ret != ACCOUNT_ERROR_NONE)
4230 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
4234 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4237 ret = account_destroy(account);
4238 if(ret != ACCOUNT_ERROR_NONE)
4240 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4244 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4246 ret = account_disconnect();
4247 if(ret != ACCOUNT_ERROR_NONE)
4249 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4254 static int utc23_account_insert()
4258 account_h account = NULL;
4259 int account_id = -1;
4260 ret = account_connect();
4261 if(ret != ACCOUNT_ERROR_NONE)
4263 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4266 ret = account_create(&account);
4268 ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
4270 ret = account_set_user_name(account, "tarun.kr");
4271 if(ret != ACCOUNT_ERROR_NONE)
4273 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
4277 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4280 ret = account_set_display_name(account, "tarun kumar");
4282 if(ret != ACCOUNT_ERROR_NONE)
4284 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4288 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4291 ret = account_set_domain_name(account, "Samsung");
4292 if(ret != ACCOUNT_ERROR_NONE)
4294 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4298 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4301 ret = account_set_email_address(account, "tarun.kr@samsung.com");
4302 if(ret != ACCOUNT_ERROR_NONE)
4304 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4308 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4311 ret = account_set_package_name(account, "com.samsung.accounts");
4312 if(ret != ACCOUNT_ERROR_NONE)
4314 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4318 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4321 ret = account_set_icon_path(account, "/test/test.jpg");
4323 if(ret != ACCOUNT_ERROR_NONE)
4325 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4329 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4332 ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
4333 if(ret != ACCOUNT_ERROR_NONE)
4335 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4339 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4342 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
4343 if(ret != ACCOUNT_ERROR_NONE)
4345 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4349 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4351 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
4352 if(ret != ACCOUNT_ERROR_NONE)
4354 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4358 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4361 ret = account_set_source(account, "URUSA inc.");
4362 if(ret != ACCOUNT_ERROR_NONE)
4364 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4368 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4373 for(i=0; i<USER_TXT_CNT; i++)
4375 ret = account_set_user_text(account, i, "user txt");
4376 if(ret != ACCOUNT_ERROR_NONE)
4378 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4383 for(i=0;i<USER_INT_CNT;i++)
4385 ret = account_set_user_int(account, i, 888);
4386 if(ret != ACCOUNT_ERROR_NONE)
4388 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4392 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_ENABLED);
4393 if(ret != ACCOUNT_ERROR_NONE)
4395 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4399 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4401 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_POST, ACCOUNT_CAPABILITY_ENABLED);
4402 if(ret != ACCOUNT_ERROR_NONE)
4404 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4408 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4411 ret = account_insert_to_db(account, &account_id);
4413 if(ret != ACCOUNT_ERROR_NONE)
4415 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
4419 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4422 ret = account_destroy(account);
4423 if(ret != ACCOUNT_ERROR_NONE)
4425 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4429 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4431 ret = account_disconnect();
4432 if(ret != ACCOUNT_ERROR_NONE)
4434 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4440 static int utc1_account_update()
4444 account_h account = NULL;
4445 ret = account_connect();
4446 if(ret != ACCOUNT_ERROR_NONE)
4448 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4451 ret = account_create(&account);
4453 if(ret != ACCOUNT_ERROR_NONE)
4455 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4459 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4462 ret = account_update_to_db_by_id(account, 0);
4464 if(ret != ACCOUNT_ERROR_NONE)
4466 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4470 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4472 ret = account_destroy(account);
4473 if(ret != ACCOUNT_ERROR_NONE)
4475 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4479 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4481 ret = account_disconnect();
4482 if(ret != ACCOUNT_ERROR_NONE)
4484 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4490 static int utc2_account_update()
4494 account_h account = NULL;
4495 ret = account_connect();
4496 if(ret != ACCOUNT_ERROR_NONE)
4498 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4501 ret = account_create(&account);
4503 if(ret != ACCOUNT_ERROR_NONE)
4505 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4509 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4512 ret = account_update_to_db_by_id(account, -999);
4514 if(ret != ACCOUNT_ERROR_NONE)
4516 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4520 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4523 ret = account_destroy(account);
4524 if(ret != ACCOUNT_ERROR_NONE)
4526 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4530 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4532 ret = account_disconnect();
4533 if(ret != ACCOUNT_ERROR_NONE)
4535 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4541 static int utc3_account_update()
4545 account_h account = NULL;
4546 ret = account_connect();
4547 if(ret != ACCOUNT_ERROR_NONE)
4549 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4552 ret = account_create(&account);
4554 if(ret != ACCOUNT_ERROR_NONE)
4556 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4560 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4563 ret = account_update_to_db_by_id(account, 555);
4565 if(ret != ACCOUNT_ERROR_NONE)
4567 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4571 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4574 ret = account_destroy(account);
4575 if(ret != ACCOUNT_ERROR_NONE)
4577 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4581 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4583 ret = account_disconnect();
4584 if(ret != ACCOUNT_ERROR_NONE)
4586 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4592 static int utc4_account_update()
4596 account_h account = NULL;
4597 ret = account_connect();
4598 if(ret != ACCOUNT_ERROR_NONE)
4600 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4603 ret = account_create(&account);
4605 if(ret != ACCOUNT_ERROR_NONE)
4607 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4611 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4614 account_set_user_name(account, NULL);
4616 if(ret != ACCOUNT_ERROR_NONE)
4618 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4622 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4625 ret = account_update_to_db_by_id(account, account_id);
4627 if(ret != ACCOUNT_ERROR_NONE)
4629 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4633 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4636 ret = account_destroy(account);
4637 if(ret != ACCOUNT_ERROR_NONE)
4639 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4643 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4645 ret = account_disconnect();
4646 if(ret != ACCOUNT_ERROR_NONE)
4648 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4654 static int utc5_account_update()
4658 account_h account = NULL;
4659 ret = account_connect();
4660 if(ret != ACCOUNT_ERROR_NONE)
4662 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4665 ret = account_create(&account);
4667 if(ret != ACCOUNT_ERROR_NONE)
4669 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4673 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4676 account_set_user_name(account, "updated-tarun.kr");
4678 if(ret != ACCOUNT_ERROR_NONE)
4680 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4684 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4687 ret = account_update_to_db_by_id(account, account_id);
4689 if(ret != ACCOUNT_ERROR_NONE)
4691 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4695 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4698 ret = account_destroy(account);
4699 if(ret != ACCOUNT_ERROR_NONE)
4701 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4705 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4707 ret = account_disconnect();
4708 if(ret != ACCOUNT_ERROR_NONE)
4710 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4716 static int utc6_account_update()
4720 account_h account = NULL;
4721 ret = account_connect();
4722 if(ret != ACCOUNT_ERROR_NONE)
4724 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4727 ret = account_create(&account);
4729 if(ret != ACCOUNT_ERROR_NONE)
4731 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4735 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4738 account_set_user_name(account, "updated-tarun.kr");
4740 if(ret != ACCOUNT_ERROR_NONE)
4742 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4746 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4748 ret = account_set_display_name(account, NULL);
4749 if(ret != ACCOUNT_ERROR_NONE)
4751 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4755 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4758 ret = account_update_to_db_by_id(account, account_id);
4760 if(ret != ACCOUNT_ERROR_NONE)
4762 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4766 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4769 ret = account_destroy(account);
4770 if(ret != ACCOUNT_ERROR_NONE)
4772 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4776 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4778 ret = account_disconnect();
4779 if(ret != ACCOUNT_ERROR_NONE)
4781 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4787 static int utc7_account_update()
4791 account_h account = NULL;
4792 ret = account_connect();
4793 if(ret != ACCOUNT_ERROR_NONE)
4795 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4798 ret = account_create(&account);
4800 if(ret != ACCOUNT_ERROR_NONE)
4802 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4806 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4809 account_set_user_name(account, "updated-tarun.kr");
4811 if(ret != ACCOUNT_ERROR_NONE)
4813 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4817 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4819 ret = account_set_display_name(account, "updated-tarun kumar");
4820 if(ret != ACCOUNT_ERROR_NONE)
4822 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4826 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4830 ret = account_update_to_db_by_id(account, account_id);
4832 if(ret != ACCOUNT_ERROR_NONE)
4834 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4838 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4841 ret = account_destroy(account);
4842 if(ret != ACCOUNT_ERROR_NONE)
4844 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4848 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4850 ret = account_disconnect();
4851 if(ret != ACCOUNT_ERROR_NONE)
4853 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4859 static int utc8_account_update()
4863 account_h account = NULL;
4864 ret = account_connect();
4865 if(ret != ACCOUNT_ERROR_NONE)
4867 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4870 ret = account_create(&account);
4872 if(ret != ACCOUNT_ERROR_NONE)
4874 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4878 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4881 account_set_user_name(account, "updated-tarun.kr");
4883 if(ret != ACCOUNT_ERROR_NONE)
4885 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4889 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4891 ret = account_set_display_name(account, "updated-tarun kumar");
4892 if(ret != ACCOUNT_ERROR_NONE)
4894 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4898 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4900 ret = account_set_domain_name(account, NULL);
4901 if(ret != ACCOUNT_ERROR_NONE)
4903 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4907 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4909 ret = account_set_domain_name(account, NULL);
4910 if(ret != ACCOUNT_ERROR_NONE)
4912 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4916 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4919 ret = account_update_to_db_by_id(account, account_id);
4921 if(ret != ACCOUNT_ERROR_NONE)
4923 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4927 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4930 ret = account_destroy(account);
4931 if(ret != ACCOUNT_ERROR_NONE)
4933 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4937 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4939 ret = account_disconnect();
4940 if(ret != ACCOUNT_ERROR_NONE)
4942 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4947 static int utc9_account_update()
4951 account_h account = NULL;
4952 ret = account_connect();
4953 if(ret != ACCOUNT_ERROR_NONE)
4955 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4958 ret = account_create(&account);
4960 if(ret != ACCOUNT_ERROR_NONE)
4962 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4966 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4969 account_set_user_name(account, "updated-tarun.kr");
4971 if(ret != ACCOUNT_ERROR_NONE)
4973 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4977 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4979 ret = account_set_display_name(account, "updated-tarun kumar");
4980 if(ret != ACCOUNT_ERROR_NONE)
4982 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4986 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4988 ret = account_set_domain_name(account, "updated-Samsung Facebook");
4989 if(ret != ACCOUNT_ERROR_NONE)
4991 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4995 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4998 ret = account_update_to_db_by_id(account, account_id);
5000 if(ret != ACCOUNT_ERROR_NONE)
5002 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5006 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5009 ret = account_destroy(account);
5010 if(ret != ACCOUNT_ERROR_NONE)
5012 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5016 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5018 ret = account_disconnect();
5019 if(ret != ACCOUNT_ERROR_NONE)
5021 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5027 static int utc10_account_update()
5031 account_h account = NULL;
5032 ret = account_connect();
5033 if(ret != ACCOUNT_ERROR_NONE)
5035 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5038 ret = account_create(&account);
5040 if(ret != ACCOUNT_ERROR_NONE)
5042 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5046 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5049 account_set_user_name(account, "updated-tarun.kr");
5051 if(ret != ACCOUNT_ERROR_NONE)
5053 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5057 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5059 ret = account_set_display_name(account, "updated-tarun kumar");
5060 if(ret != ACCOUNT_ERROR_NONE)
5062 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5066 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5068 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5069 if(ret != ACCOUNT_ERROR_NONE)
5071 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5075 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5077 ret = account_set_email_address(account, NULL);
5078 if(ret != ACCOUNT_ERROR_NONE)
5080 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5084 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5087 ret = account_update_to_db_by_id(account, account_id);
5089 if(ret != ACCOUNT_ERROR_NONE)
5091 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5095 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5098 ret = account_destroy(account);
5099 if(ret != ACCOUNT_ERROR_NONE)
5101 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5105 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5107 ret = account_disconnect();
5108 if(ret != ACCOUNT_ERROR_NONE)
5110 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5116 static int utc11_account_update()
5120 account_h account = NULL;
5121 ret = account_connect();
5122 if(ret != ACCOUNT_ERROR_NONE)
5124 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5127 ret = account_create(&account);
5129 if(ret != ACCOUNT_ERROR_NONE)
5131 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5135 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5138 account_set_user_name(account, "updated-tarun.kr");
5140 if(ret != ACCOUNT_ERROR_NONE)
5142 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5146 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5148 ret = account_set_display_name(account, "updated-tarun kumar");
5149 if(ret != ACCOUNT_ERROR_NONE)
5151 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5155 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5157 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5158 if(ret != ACCOUNT_ERROR_NONE)
5160 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5164 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5166 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5167 if(ret != ACCOUNT_ERROR_NONE)
5169 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5173 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5176 ret = account_update_to_db_by_id(account, account_id);
5178 if(ret != ACCOUNT_ERROR_NONE)
5180 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5184 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5187 ret = account_destroy(account);
5188 if(ret != ACCOUNT_ERROR_NONE)
5190 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5194 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5196 ret = account_disconnect();
5197 if(ret != ACCOUNT_ERROR_NONE)
5199 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5205 static int utc12_account_update()
5209 account_h account = NULL;
5210 ret = account_connect();
5211 if(ret != ACCOUNT_ERROR_NONE)
5213 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5216 ret = account_create(&account);
5218 if(ret != ACCOUNT_ERROR_NONE)
5220 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5224 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5227 account_set_user_name(account, "updated-tarun.kr");
5229 if(ret != ACCOUNT_ERROR_NONE)
5231 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5235 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5237 ret = account_set_display_name(account, "updated-tarun kumar");
5238 if(ret != ACCOUNT_ERROR_NONE)
5240 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5244 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5246 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5247 if(ret != ACCOUNT_ERROR_NONE)
5249 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5253 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5255 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5256 if(ret != ACCOUNT_ERROR_NONE)
5258 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5262 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5264 ret = account_set_package_name(account, NULL);
5265 if(ret != ACCOUNT_ERROR_NONE)
5267 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5271 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5274 ret = account_update_to_db_by_id(account, account_id);
5276 if(ret != ACCOUNT_ERROR_NONE)
5278 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5282 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5285 ret = account_destroy(account);
5286 if(ret != ACCOUNT_ERROR_NONE)
5288 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5292 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5294 ret = account_disconnect();
5295 if(ret != ACCOUNT_ERROR_NONE)
5297 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5303 static int utc13_account_update()
5307 account_h account = NULL;
5308 ret = account_connect();
5309 if(ret != ACCOUNT_ERROR_NONE)
5311 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5314 ret = account_create(&account);
5316 if(ret != ACCOUNT_ERROR_NONE)
5318 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5322 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5325 account_set_user_name(account, "updated-tarun.kr");
5327 if(ret != ACCOUNT_ERROR_NONE)
5329 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5333 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5335 ret = account_set_display_name(account, "updated-tarun kumar");
5336 if(ret != ACCOUNT_ERROR_NONE)
5338 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5342 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5344 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5345 if(ret != ACCOUNT_ERROR_NONE)
5347 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5351 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5353 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5354 if(ret != ACCOUNT_ERROR_NONE)
5356 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5360 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5362 ret = account_set_package_name(account, "updated-com.samsung.account");
5363 if(ret != ACCOUNT_ERROR_NONE)
5365 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5369 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5372 ret = account_update_to_db_by_id(account, account_id);
5374 if(ret != ACCOUNT_ERROR_NONE)
5376 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5380 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5383 ret = account_destroy(account);
5384 if(ret != ACCOUNT_ERROR_NONE)
5386 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5390 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5392 ret = account_disconnect();
5393 if(ret != ACCOUNT_ERROR_NONE)
5395 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5401 static int utc14_account_update()
5405 account_h account = NULL;
5406 ret = account_connect();
5407 if(ret != ACCOUNT_ERROR_NONE)
5409 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5412 ret = account_create(&account);
5414 if(ret != ACCOUNT_ERROR_NONE)
5416 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5420 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5423 account_set_user_name(account, "updated-tarun.kr");
5425 if(ret != ACCOUNT_ERROR_NONE)
5427 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5431 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5433 ret = account_set_display_name(account, "updated-tarun kumar");
5434 if(ret != ACCOUNT_ERROR_NONE)
5436 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5440 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5442 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5443 if(ret != ACCOUNT_ERROR_NONE)
5445 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5449 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5451 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5452 if(ret != ACCOUNT_ERROR_NONE)
5454 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5458 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5460 ret = account_set_package_name(account, "updated-com.samsung.account");
5461 if(ret != ACCOUNT_ERROR_NONE)
5463 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5467 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5469 ret = account_set_icon_path(account, NULL);
5470 if(ret != ACCOUNT_ERROR_NONE)
5472 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5476 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5479 ret = account_update_to_db_by_id(account, account_id);
5481 if(ret != ACCOUNT_ERROR_NONE)
5483 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5487 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5490 ret = account_destroy(account);
5491 if(ret != ACCOUNT_ERROR_NONE)
5493 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5497 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5499 ret = account_disconnect();
5500 if(ret != ACCOUNT_ERROR_NONE)
5502 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5508 static int utc15_account_update()
5512 account_h account = NULL;
5513 ret = account_connect();
5514 if(ret != ACCOUNT_ERROR_NONE)
5516 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5519 ret = account_create(&account);
5521 if(ret != ACCOUNT_ERROR_NONE)
5523 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5527 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5530 account_set_user_name(account, "updated-tarun.kr");
5532 if(ret != ACCOUNT_ERROR_NONE)
5534 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5538 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5540 ret = account_set_display_name(account, "updated-tarun kumar");
5541 if(ret != ACCOUNT_ERROR_NONE)
5543 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5547 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5549 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5550 if(ret != ACCOUNT_ERROR_NONE)
5552 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5556 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5558 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5559 if(ret != ACCOUNT_ERROR_NONE)
5561 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5565 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5567 ret = account_set_package_name(account, "updated-com.samsung.account");
5568 if(ret != ACCOUNT_ERROR_NONE)
5570 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5574 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5576 ret = account_set_icon_path(account, "updated-icon-path");
5577 if(ret != ACCOUNT_ERROR_NONE)
5579 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5583 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5586 ret = account_update_to_db_by_id(account, account_id);
5588 if(ret != ACCOUNT_ERROR_NONE)
5590 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5594 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5597 ret = account_destroy(account);
5598 if(ret != ACCOUNT_ERROR_NONE)
5600 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5604 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5606 ret = account_disconnect();
5607 if(ret != ACCOUNT_ERROR_NONE)
5609 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5615 static int utc16_account_update()
5619 account_h account = NULL;
5620 ret = account_connect();
5621 if(ret != ACCOUNT_ERROR_NONE)
5623 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5626 ret = account_create(&account);
5628 if(ret != ACCOUNT_ERROR_NONE)
5630 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5634 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5637 account_set_user_name(account, "updated-tarun.kr");
5639 if(ret != ACCOUNT_ERROR_NONE)
5641 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5645 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5647 ret = account_set_display_name(account, "updated-tarun kumar");
5648 if(ret != ACCOUNT_ERROR_NONE)
5650 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5654 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5656 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5657 if(ret != ACCOUNT_ERROR_NONE)
5659 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5663 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5665 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5666 if(ret != ACCOUNT_ERROR_NONE)
5668 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5672 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5674 ret = account_set_package_name(account, "updated-com.samsung.account");
5675 if(ret != ACCOUNT_ERROR_NONE)
5677 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5681 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5683 ret = account_set_icon_path(account, "updated-icon-path");
5684 if(ret != ACCOUNT_ERROR_NONE)
5686 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5690 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5692 ret = account_set_access_token(account, NULL);
5693 if(ret != ACCOUNT_ERROR_NONE)
5695 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5699 ACCOUNT_SLOGD("(%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 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5710 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5713 ret = account_destroy(account);
5714 if(ret != ACCOUNT_ERROR_NONE)
5716 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5720 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5722 ret = account_disconnect();
5723 if(ret != ACCOUNT_ERROR_NONE)
5725 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5731 static int utc17_account_update()
5735 account_h account = NULL;
5736 ret = account_connect();
5737 if(ret != ACCOUNT_ERROR_NONE)
5739 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5742 ret = account_create(&account);
5744 if(ret != ACCOUNT_ERROR_NONE)
5746 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5750 ACCOUNT_SLOGD("(%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 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5761 ACCOUNT_SLOGD("(%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 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5770 ACCOUNT_SLOGD("(%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 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5779 ACCOUNT_SLOGD("(%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 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5788 ACCOUNT_SLOGD("(%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 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5797 ACCOUNT_SLOGD("(%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 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5806 ACCOUNT_SLOGD("(%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 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5815 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5818 ret = account_update_to_db_by_id(account, account_id);
5820 if(ret != ACCOUNT_ERROR_NONE)
5822 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5826 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5829 ret = account_destroy(account);
5830 if(ret != ACCOUNT_ERROR_NONE)
5832 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5836 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5838 ret = account_disconnect();
5839 if(ret != ACCOUNT_ERROR_NONE)
5841 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5847 static int utc18_account_update()
5851 account_h account = NULL;
5852 ret = account_connect();
5853 if(ret != ACCOUNT_ERROR_NONE)
5855 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5858 ret = account_create(&account);
5860 if(ret != ACCOUNT_ERROR_NONE)
5862 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5866 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5869 account_set_user_name(account, "updated-tarun.kr");
5871 if(ret != ACCOUNT_ERROR_NONE)
5873 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5877 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5879 ret = account_set_display_name(account, "updated-tarun kumar");
5880 if(ret != ACCOUNT_ERROR_NONE)
5882 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5886 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5888 ret = account_set_domain_name(account, "updated-Samsung Facebook");
5889 if(ret != ACCOUNT_ERROR_NONE)
5891 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5895 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5897 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5898 if(ret != ACCOUNT_ERROR_NONE)
5900 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5904 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5906 ret = account_set_package_name(account, "updated-com.samsung.account");
5907 if(ret != ACCOUNT_ERROR_NONE)
5909 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5913 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5915 ret = account_set_icon_path(account, "updated-icon-path");
5916 if(ret != ACCOUNT_ERROR_NONE)
5918 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5922 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5924 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
5925 if(ret != ACCOUNT_ERROR_NONE)
5927 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5931 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5933 ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
5934 if(ret != ACCOUNT_ERROR_NONE)
5936 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5940 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5942 ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
5943 if(ret != ACCOUNT_ERROR_NONE)
5945 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5949 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5952 ret = account_update_to_db_by_id(account, account_id);
5954 if(ret != ACCOUNT_ERROR_NONE)
5956 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5960 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5963 ret = account_destroy(account);
5964 if(ret != ACCOUNT_ERROR_NONE)
5966 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5970 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5972 ret = account_disconnect();
5973 if(ret != ACCOUNT_ERROR_NONE)
5975 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5981 static int utc19_account_update()
5985 account_h account = NULL;
5986 ret = account_connect();
5987 if(ret != ACCOUNT_ERROR_NONE)
5989 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5992 ret = account_create(&account);
5994 if(ret != ACCOUNT_ERROR_NONE)
5996 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6000 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6003 account_set_user_name(account, "updated-tarun.kr");
6005 if(ret != ACCOUNT_ERROR_NONE)
6007 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6011 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6013 ret = account_set_display_name(account, "updated-tarun kumar");
6014 if(ret != ACCOUNT_ERROR_NONE)
6016 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6020 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6022 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6023 if(ret != ACCOUNT_ERROR_NONE)
6025 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6029 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6031 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6032 if(ret != ACCOUNT_ERROR_NONE)
6034 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6038 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6040 ret = account_set_package_name(account, "updated-com.samsung.account");
6041 if(ret != ACCOUNT_ERROR_NONE)
6043 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6047 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6049 ret = account_set_icon_path(account, "updated-icon-path");
6050 if(ret != ACCOUNT_ERROR_NONE)
6052 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6056 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6058 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6059 if(ret != ACCOUNT_ERROR_NONE)
6061 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6065 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6067 ret = account_set_source(account, NULL);
6068 if(ret != ACCOUNT_ERROR_NONE)
6070 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6074 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6077 ret = account_update_to_db_by_id(account, account_id);
6079 if(ret != ACCOUNT_ERROR_NONE)
6081 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6085 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6088 ret = account_destroy(account);
6089 if(ret != ACCOUNT_ERROR_NONE)
6091 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6095 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6097 ret = account_disconnect();
6098 if(ret != ACCOUNT_ERROR_NONE)
6100 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6106 static int utc20_account_update()
6110 account_h account = NULL;
6111 ret = account_connect();
6112 if(ret != ACCOUNT_ERROR_NONE)
6114 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6117 ret = account_create(&account);
6119 if(ret != ACCOUNT_ERROR_NONE)
6121 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6125 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6128 account_set_user_name(account, "updated-tarun.kr");
6130 if(ret != ACCOUNT_ERROR_NONE)
6132 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6136 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6138 ret = account_set_display_name(account, "updated-tarun kumar");
6139 if(ret != ACCOUNT_ERROR_NONE)
6141 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6145 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6147 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6148 if(ret != ACCOUNT_ERROR_NONE)
6150 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6154 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6156 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6157 if(ret != ACCOUNT_ERROR_NONE)
6159 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6163 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6165 ret = account_set_package_name(account, "updated-com.samsung.account");
6166 if(ret != ACCOUNT_ERROR_NONE)
6168 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6172 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6174 ret = account_set_icon_path(account, "updated-icon-path");
6175 if(ret != ACCOUNT_ERROR_NONE)
6177 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6181 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6183 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6184 if(ret != ACCOUNT_ERROR_NONE)
6186 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6190 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6192 ret = account_set_source(account, "updated-URUSA inc.");
6193 if(ret != ACCOUNT_ERROR_NONE)
6195 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6199 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6202 ret = account_update_to_db_by_id(account, account_id);
6204 if(ret != ACCOUNT_ERROR_NONE)
6206 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6210 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6213 ret = account_destroy(account);
6214 if(ret != ACCOUNT_ERROR_NONE)
6216 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6220 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6222 ret = account_disconnect();
6223 if(ret != ACCOUNT_ERROR_NONE)
6225 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6231 static int utc21_account_update()
6235 account_h account = NULL;
6236 ret = account_connect();
6237 if(ret != ACCOUNT_ERROR_NONE)
6239 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6242 ret = account_create(&account);
6244 if(ret != ACCOUNT_ERROR_NONE)
6246 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6250 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6253 account_set_user_name(account, "updated-tarun.kr");
6255 if(ret != ACCOUNT_ERROR_NONE)
6257 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6261 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6263 ret = account_set_display_name(account, "updated-tarun kumar");
6264 if(ret != ACCOUNT_ERROR_NONE)
6266 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6270 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6272 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6273 if(ret != ACCOUNT_ERROR_NONE)
6275 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6279 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6281 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6282 if(ret != ACCOUNT_ERROR_NONE)
6284 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6288 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6290 ret = account_set_package_name(account, "updated-com.samsung.account");
6291 if(ret != ACCOUNT_ERROR_NONE)
6293 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6297 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6299 ret = account_set_icon_path(account, "updated-icon-path");
6300 if(ret != ACCOUNT_ERROR_NONE)
6302 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6306 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6308 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6309 if(ret != ACCOUNT_ERROR_NONE)
6311 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6315 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6317 ret = account_set_source(account, "updated-URUSA inc.");
6318 if(ret != ACCOUNT_ERROR_NONE)
6320 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6324 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6328 for(i=0;i<USER_TXT_CNT;i++)
6330 ret = account_set_user_text(account, i, NULL);
6331 if(ret != ACCOUNT_ERROR_NONE)
6333 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6338 ret = account_update_to_db_by_id(account, account_id);
6340 if(ret != ACCOUNT_ERROR_NONE)
6342 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6346 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6349 ret = account_destroy(account);
6350 if(ret != ACCOUNT_ERROR_NONE)
6352 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6356 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6358 ret = account_disconnect();
6359 if(ret != ACCOUNT_ERROR_NONE)
6361 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6367 static int utc22_account_update()
6371 account_h account = NULL;
6372 ret = account_connect();
6373 if(ret != ACCOUNT_ERROR_NONE)
6375 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6378 ret = account_create(&account);
6380 if(ret != ACCOUNT_ERROR_NONE)
6382 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6386 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6389 account_set_user_name(account, "updated-tarun.kr");
6391 if(ret != ACCOUNT_ERROR_NONE)
6393 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6397 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6399 ret = account_set_display_name(account, "updated-tarun kumar");
6400 if(ret != ACCOUNT_ERROR_NONE)
6402 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6406 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6408 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6409 if(ret != ACCOUNT_ERROR_NONE)
6411 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6415 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6417 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6418 if(ret != ACCOUNT_ERROR_NONE)
6420 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6424 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6426 ret = account_set_package_name(account, "updated-com.samsung.account");
6427 if(ret != ACCOUNT_ERROR_NONE)
6429 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6433 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6435 ret = account_set_icon_path(account, "updated-icon-path");
6436 if(ret != ACCOUNT_ERROR_NONE)
6438 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6442 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6444 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6445 if(ret != ACCOUNT_ERROR_NONE)
6447 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6451 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6453 ret = account_set_source(account, "updated-URUSA inc.");
6454 if(ret != ACCOUNT_ERROR_NONE)
6456 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6460 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6463 for(i=0;i<USER_TXT_CNT;i++)
6465 ret = account_set_user_text(account, i, "updated-user txt");
6466 if(ret != ACCOUNT_ERROR_NONE)
6468 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6473 ret = account_update_to_db_by_id(account, account_id);
6475 if(ret != ACCOUNT_ERROR_NONE)
6477 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6481 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6484 ret = account_destroy(account);
6485 if(ret != ACCOUNT_ERROR_NONE)
6487 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6491 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6493 ret = account_disconnect();
6494 if(ret != ACCOUNT_ERROR_NONE)
6496 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6502 static int utc23_account_update()
6506 account_h account = NULL;
6507 ret = account_connect();
6508 if(ret != ACCOUNT_ERROR_NONE)
6510 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6513 ret = account_create(&account);
6515 if(ret != ACCOUNT_ERROR_NONE)
6517 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6521 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6524 account_set_user_name(account, "updated-tarun.kr");
6526 if(ret != ACCOUNT_ERROR_NONE)
6528 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6532 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6534 ret = account_set_display_name(account, "updated-tarun kumar");
6535 if(ret != ACCOUNT_ERROR_NONE)
6537 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6541 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6543 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6544 if(ret != ACCOUNT_ERROR_NONE)
6546 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6550 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6552 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6553 if(ret != ACCOUNT_ERROR_NONE)
6555 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6559 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6561 ret = account_set_package_name(account, "updated-com.samsung.account");
6562 if(ret != ACCOUNT_ERROR_NONE)
6564 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6568 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6570 ret = account_set_icon_path(account, "updated-icon-path");
6571 if(ret != ACCOUNT_ERROR_NONE)
6573 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6577 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6579 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6580 if(ret != ACCOUNT_ERROR_NONE)
6582 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6586 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6588 ret = account_set_source(account, "updated-URUSA inc.");
6589 if(ret != ACCOUNT_ERROR_NONE)
6591 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6595 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6598 for(i=0;i<USER_TXT_CNT;i++)
6600 ret = account_set_user_text(account, i, "updated-user txt");
6601 if(ret != ACCOUNT_ERROR_NONE)
6603 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6607 for(i=0;i<USER_INT_CNT;i++)
6609 ret = account_set_user_int(account, i, -111);
6610 if(ret != ACCOUNT_ERROR_NONE)
6612 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6616 ret = account_update_to_db_by_id(account, account_id);
6618 if(ret != ACCOUNT_ERROR_NONE)
6620 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6624 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6627 ret = account_destroy(account);
6628 if(ret != ACCOUNT_ERROR_NONE)
6630 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6634 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6636 ret = account_disconnect();
6637 if(ret != ACCOUNT_ERROR_NONE)
6639 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6645 static int utc24_account_update()
6649 account_h account = NULL;
6650 ret = account_connect();
6651 if(ret != ACCOUNT_ERROR_NONE)
6653 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6656 ret = account_create(&account);
6658 if(ret != ACCOUNT_ERROR_NONE)
6660 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6664 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6667 account_set_user_name(account, "updated-tarun.kr");
6669 if(ret != ACCOUNT_ERROR_NONE)
6671 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6675 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6677 ret = account_set_display_name(account, "updated-tarun kumar");
6678 if(ret != ACCOUNT_ERROR_NONE)
6680 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6684 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6686 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6687 if(ret != ACCOUNT_ERROR_NONE)
6689 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6693 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6695 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6696 if(ret != ACCOUNT_ERROR_NONE)
6698 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6702 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6704 ret = account_set_package_name(account, "updated-com.samsung.account");
6705 if(ret != ACCOUNT_ERROR_NONE)
6707 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6711 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6713 ret = account_set_icon_path(account, "updated-icon-path");
6714 if(ret != ACCOUNT_ERROR_NONE)
6716 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6720 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6722 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6723 if(ret != ACCOUNT_ERROR_NONE)
6725 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6729 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6731 ret = account_set_source(account, "updated-URUSA inc.");
6732 if(ret != ACCOUNT_ERROR_NONE)
6734 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6738 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6741 for(i=0;i<USER_TXT_CNT;i++)
6743 ret = account_set_user_text(account, i, "updated-user txt");
6744 if(ret != ACCOUNT_ERROR_NONE)
6746 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6750 for(i=0;i<USER_INT_CNT;i++)
6752 ret = account_set_user_int(account, i, 0);
6753 if(ret != ACCOUNT_ERROR_NONE)
6755 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6759 ret = account_update_to_db_by_id(account, account_id);
6761 if(ret != ACCOUNT_ERROR_NONE)
6763 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6767 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6770 ret = account_destroy(account);
6771 if(ret != ACCOUNT_ERROR_NONE)
6773 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6777 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6779 ret = account_disconnect();
6780 if(ret != ACCOUNT_ERROR_NONE)
6782 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6788 static int utc25_account_update()
6792 account_h account = NULL;
6793 ret = account_connect();
6794 if(ret != ACCOUNT_ERROR_NONE)
6796 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6799 ret = account_create(&account);
6801 if(ret != ACCOUNT_ERROR_NONE)
6803 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6807 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6810 account_set_user_name(account, "updated-tarun.kr");
6812 if(ret != ACCOUNT_ERROR_NONE)
6814 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6818 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6820 ret = account_set_display_name(account, "updated-tarun kumar");
6821 if(ret != ACCOUNT_ERROR_NONE)
6823 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6827 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6829 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6830 if(ret != ACCOUNT_ERROR_NONE)
6832 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6836 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6838 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6839 if(ret != ACCOUNT_ERROR_NONE)
6841 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6845 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6847 ret = account_set_package_name(account, "updated-com.samsung.account");
6848 if(ret != ACCOUNT_ERROR_NONE)
6850 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6854 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6856 ret = account_set_icon_path(account, "updated-icon-path");
6857 if(ret != ACCOUNT_ERROR_NONE)
6859 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6863 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6865 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6866 if(ret != ACCOUNT_ERROR_NONE)
6868 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6872 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6874 ret = account_set_source(account, "updated-URUSA inc.");
6875 if(ret != ACCOUNT_ERROR_NONE)
6877 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6881 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6884 for(i=0;i<USER_TXT_CNT;i++)
6886 ret = account_set_user_text(account, i, "updated-user txt");
6887 if(ret != ACCOUNT_ERROR_NONE)
6889 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6893 for(i=0;i<USER_INT_CNT;i++)
6895 ret = account_set_user_int(account, i, 111);
6896 if(ret != ACCOUNT_ERROR_NONE)
6898 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6902 ret = account_update_to_db_by_id(account, account_id);
6904 if(ret != ACCOUNT_ERROR_NONE)
6906 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6910 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6913 ret = account_destroy(account);
6914 if(ret != ACCOUNT_ERROR_NONE)
6916 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6920 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6922 ret = account_disconnect();
6923 if(ret != ACCOUNT_ERROR_NONE)
6925 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6931 static int utc26_account_update()
6935 account_h account = NULL;
6936 ret = account_connect();
6937 if(ret != ACCOUNT_ERROR_NONE)
6939 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6942 ret = account_create(&account);
6944 if(ret != ACCOUNT_ERROR_NONE)
6946 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6950 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6953 account_set_user_name(account, "updated-tarun.kr");
6955 if(ret != ACCOUNT_ERROR_NONE)
6957 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6961 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6963 ret = account_set_display_name(account, "updated-tarun kumar");
6964 if(ret != ACCOUNT_ERROR_NONE)
6966 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6970 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6972 ret = account_set_domain_name(account, "updated-Samsung Facebook");
6973 if(ret != ACCOUNT_ERROR_NONE)
6975 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6979 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6981 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6982 if(ret != ACCOUNT_ERROR_NONE)
6984 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6988 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6990 ret = account_set_package_name(account, "updated-com.samsung.account");
6991 if(ret != ACCOUNT_ERROR_NONE)
6993 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6997 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6999 ret = account_set_icon_path(account, "updated-icon-path");
7000 if(ret != ACCOUNT_ERROR_NONE)
7002 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7006 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7008 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
7009 if(ret != ACCOUNT_ERROR_NONE)
7011 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7015 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7017 ret = account_set_source(account, "updated-URUSA inc.");
7018 if(ret != ACCOUNT_ERROR_NONE)
7020 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7024 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7027 for(i=0;i<USER_TXT_CNT;i++)
7029 ret = account_set_user_text(account, i, "updated-user txt");
7030 if(ret != ACCOUNT_ERROR_NONE)
7032 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
7036 for(i=0;i<USER_INT_CNT;i++)
7038 ret = account_set_user_int(account, i, 111);
7039 if(ret != ACCOUNT_ERROR_NONE)
7041 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
7045 ret = account_update_to_db_by_id(account, account_id);
7047 if(ret != ACCOUNT_ERROR_NONE)
7049 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7053 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7056 ret = account_destroy(account);
7057 if(ret != ACCOUNT_ERROR_NONE)
7059 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7063 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7065 ret = account_disconnect();
7066 if(ret != ACCOUNT_ERROR_NONE)
7068 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7074 static int utc27_account_update()
7078 account_h account = NULL;
7079 ret = account_connect();
7080 if(ret != ACCOUNT_ERROR_NONE)
7082 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7085 ret = account_create(&account);
7087 if(ret != ACCOUNT_ERROR_NONE)
7089 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7093 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7096 account_set_user_name(account, "updated-tarun.kr");
7098 if(ret != ACCOUNT_ERROR_NONE)
7100 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7104 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7106 ret = account_set_display_name(account, "updated-tarun kumar");
7107 if(ret != ACCOUNT_ERROR_NONE)
7109 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7113 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7115 ret = account_set_domain_name(account, "updated-Samsung Facebook");
7116 if(ret != ACCOUNT_ERROR_NONE)
7118 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7122 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7124 ret = account_set_email_address(account, "updated-urusa77@gmail.com");
7125 if(ret != ACCOUNT_ERROR_NONE)
7127 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7131 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7133 ret = account_set_package_name(account, "updated-com.samsung.account");
7134 if(ret != ACCOUNT_ERROR_NONE)
7136 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7140 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7142 ret = account_set_icon_path(account, "updated-icon-path");
7143 if(ret != ACCOUNT_ERROR_NONE)
7145 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7149 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7151 ret = account_set_access_token(account, "updated-ACCESSTOKEN");
7152 if(ret != ACCOUNT_ERROR_NONE)
7154 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7158 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7160 ret = account_set_source(account, "updated-URUSA inc.");
7161 if(ret != ACCOUNT_ERROR_NONE)
7163 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7167 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7170 for(i=0;i<USER_TXT_CNT;i++)
7172 ret = account_set_user_text(account, i, "updated-user txt");
7173 if(ret != ACCOUNT_ERROR_NONE)
7175 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
7179 for(i=0;i<USER_INT_CNT;i++)
7181 ret = account_set_user_int(account, i, 111);
7182 if(ret != ACCOUNT_ERROR_NONE)
7184 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
7187 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_ENABLED);
7188 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_CALENDAR, ACCOUNT_CAPABILITY_ENABLED);
7189 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED);
7190 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_ENABLED);
7191 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_EMAIL, ACCOUNT_CAPABILITY_ENABLED);
7192 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_POST, ACCOUNT_CAPABILITY_ENABLED);
7193 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_VOIP, ACCOUNT_CAPABILITY_ENABLED);
7194 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_ENABLED);
7195 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_MOBILE_TRACKER, ACCOUNT_CAPABILITY_ENABLED);
7197 ret = account_update_to_db_by_id(account, account_id);
7199 if(ret != ACCOUNT_ERROR_NONE)
7201 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7205 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7208 ret = account_destroy(account);
7209 if(ret != ACCOUNT_ERROR_NONE)
7211 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7215 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7217 ret = account_disconnect();
7218 if(ret != ACCOUNT_ERROR_NONE)
7220 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7226 bool _utc1_account_get_callback(account_h handle, void* user_data)
7228 ACCOUNT_SLOGD("_account_get_callback handle = %s , user_data = %s \n", (char *)handle, (char *)user_data);
7230 char *test_text = NULL;
7232 account_get_user_name(handle, &test_text);
7233 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7235 _account_free_text(test_text);
7237 account_get_display_name(handle, &test_text);
7238 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7240 _account_free_text(test_text);
7242 account_get_email_address(handle, &test_text);
7243 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7245 _account_free_text(test_text);
7247 account_get_icon_path(handle, &test_text);
7248 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7250 _account_free_text(test_text);
7252 account_get_source(handle, &test_text);
7253 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7255 _account_free_text(test_text);
7257 account_get_package_name(handle, &test_text);
7258 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7260 _account_free_text(test_text);
7262 account_get_domain_name(handle, &test_text);
7263 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7265 _account_free_text(test_text);
7267 account_get_access_token(handle, &test_text);
7268 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7269 _account_free_text(test_text);
7271 int i=0, test_int=0;
7273 account_auth_type_e auth_type;
7274 account_get_auth_type(handle, &auth_type);
7275 ACCOUNT_SLOGD("account_get_auth_type : %d\n", auth_type);
7277 account_secrecy_state_e secret;
7278 account_get_secret(handle, &secret);
7279 ACCOUNT_SLOGD("account_get_secret : %d\n", secret);
7281 account_sync_state_e sync_support;
7282 account_get_sync_support(handle, &sync_support);
7283 ACCOUNT_SLOGD("account_get_sync_support : %d\n", sync_support);
7285 for(i=0;i<USER_INT_CNT;i++)
7287 account_get_user_int(handle, i, &test_int);
7288 ACCOUNT_SLOGD("_account_get_callback : %d\n", test_int);
7291 account_get_capability_all(handle, _capability_get_callback, NULL);
7297 static int utc1_get_account_by_id()
7301 account_h account = NULL;
7302 ret = account_connect();
7303 if(ret != ACCOUNT_ERROR_NONE)
7305 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7308 ret = account_create(&account);
7310 if(ret != ACCOUNT_ERROR_NONE)
7312 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7316 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7319 ret = account_query_account_by_account_id(account_id, &account);
7321 if(ret != ACCOUNT_ERROR_NONE)
7323 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7327 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7330 _account_get_account_info(account);
7332 ret = account_destroy(account);
7333 if(ret != ACCOUNT_ERROR_NONE)
7335 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7339 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7341 ret = account_disconnect();
7342 if(ret != ACCOUNT_ERROR_NONE)
7344 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7350 static int utc2_get_account_by_id()
7354 account_h account = NULL;
7355 ret = account_connect();
7356 if(ret != ACCOUNT_ERROR_NONE)
7358 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7361 ret = account_create(&account);
7363 if(ret != ACCOUNT_ERROR_NONE)
7365 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7369 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7372 ret = account_query_account_by_account_id(account_id, &account);
7374 _account_get_account_info(account);
7376 if(ret != ACCOUNT_ERROR_NONE)
7378 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7382 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7385 ret = account_destroy(account);
7386 if(ret != ACCOUNT_ERROR_NONE)
7388 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7392 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7394 ret = account_disconnect();
7395 if(ret != ACCOUNT_ERROR_NONE)
7397 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7403 static int utc1_get_account_by_user_name()
7407 account_h account = NULL;
7408 ret = account_connect();
7409 if(ret != ACCOUNT_ERROR_NONE)
7411 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7414 ret = account_query_account_by_user_name(_account_get_callback, "usernamed-wy1115", NULL);
7416 if(ret != ACCOUNT_ERROR_NONE)
7418 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7422 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7425 ret = account_disconnect();
7426 if(ret != ACCOUNT_ERROR_NONE)
7428 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7434 static int utc2_get_account_by_user_name()
7438 account_h account = NULL;
7439 ret = account_connect();
7440 if(ret != ACCOUNT_ERROR_NONE)
7442 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7445 char *user_data = "test user_data";
7447 ret = account_query_account_by_user_name(_account_get_callback, "usernamed-wy1115", (void *)user_data);
7449 if(ret != ACCOUNT_ERROR_NONE)
7451 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7455 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7458 ret = account_disconnect();
7459 if(ret != ACCOUNT_ERROR_NONE)
7461 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7467 static int utc1_get_account_by_capability()
7471 account_h account = NULL;
7472 ret = account_connect();
7473 if(ret != ACCOUNT_ERROR_NONE)
7475 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7478 ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED, NULL);
7480 if(ret != ACCOUNT_ERROR_NONE)
7482 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7486 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7489 ret = account_disconnect();
7490 if(ret != ACCOUNT_ERROR_NONE)
7492 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7498 static int utc2_get_account_by_capability()
7502 account_h account = NULL;
7503 ret = account_connect();
7504 if(ret != ACCOUNT_ERROR_NONE)
7506 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7509 ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_DISABLED, NULL);
7511 if(ret != ACCOUNT_ERROR_NONE)
7513 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7517 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7520 ret = account_disconnect();
7521 if(ret != ACCOUNT_ERROR_NONE)
7523 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7529 static int utc3_get_account_by_capability()
7533 account_h account = NULL;
7534 ret = account_connect();
7535 if(ret != ACCOUNT_ERROR_NONE)
7537 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7540 ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, -1, NULL);
7542 if(ret != ACCOUNT_ERROR_NONE)
7544 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7548 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7551 ret = account_disconnect();
7552 if(ret != ACCOUNT_ERROR_NONE)
7554 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7560 static int utc4_get_account_by_capability()
7564 account_h account = NULL;
7565 ret = account_connect();
7566 if(ret != ACCOUNT_ERROR_NONE)
7568 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7571 ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_DISABLED, NULL);
7573 if(ret != ACCOUNT_ERROR_NONE)
7575 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7579 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7582 ret = account_disconnect();
7583 if(ret != ACCOUNT_ERROR_NONE)
7585 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7591 static int utc5_get_account_by_capability()
7595 account_h account = NULL;
7596 ret = account_connect();
7597 if(ret != ACCOUNT_ERROR_NONE)
7599 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7602 ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, -1, NULL);
7604 if(ret != ACCOUNT_ERROR_NONE)
7606 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7610 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7613 ret = account_disconnect();
7614 if(ret != ACCOUNT_ERROR_NONE)
7616 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7622 static int utc1_get_all_accounts()
7626 ret = account_connect();
7627 if(ret != ACCOUNT_ERROR_NONE)
7629 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7632 ret = account_foreach_account_from_db(_account_get_callback, NULL);
7634 if(ret != ACCOUNT_ERROR_NONE)
7636 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7640 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7643 ret = account_disconnect();
7644 if(ret != ACCOUNT_ERROR_NONE)
7646 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7652 static int utc2_get_all_accounts()
7656 ret = account_connect();
7657 if(ret != ACCOUNT_ERROR_NONE)
7659 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7662 char *user_data = "test user_data";
7664 ret = account_foreach_account_from_db(_account_get_callback, (void *)user_data);
7666 if(ret != ACCOUNT_ERROR_NONE)
7668 ACCOUNT_SLOGD("(%d)-[Account] ret = %d \n", __LINE__, ret);
7672 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d \n", __LINE__, ret);
7675 ret = account_disconnect();
7676 if(ret != ACCOUNT_ERROR_NONE)
7678 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7684 bool _utc_capability_get_callback(const char* capability_type, account_capability_state_e capability_value, void* user_data)
7686 char* test_type = (char*)capability_type;
7687 int test_value = capability_value;
7689 ACCOUNT_SLOGD("_capability_get_callback test_type = : %s\n", test_type);
7690 ACCOUNT_SLOGD("_capability_get_callback test_value = : %d\n", test_value);
7695 static int utc1_account_get_capability_by_account_id()
7698 ret = account_connect();
7699 if(ret != ACCOUNT_ERROR_NONE)
7701 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7704 ret = account_query_capability_by_account_id(_utc_capability_get_callback, account_id, NULL);
7706 if(ret != ACCOUNT_ERROR_NONE)
7708 ACCOUNT_SLOGD("(%d)-[Account] ret = %d,\n", __LINE__, ret);
7712 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7714 ret = account_disconnect();
7715 if(ret != ACCOUNT_ERROR_NONE)
7717 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7722 static int utc2_account_get_capability_by_account_id()
7726 char *user_data = "test user_data";
7727 ret = account_connect();
7728 if(ret != ACCOUNT_ERROR_NONE)
7730 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7733 ret = account_query_capability_by_account_id(_utc_capability_get_callback, account_id, (void *)user_data);
7735 if(ret != ACCOUNT_ERROR_NONE)
7737 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7741 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7743 ret = account_disconnect();
7744 if(ret != ACCOUNT_ERROR_NONE)
7746 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7751 static int utc_account_delete_by_id()
7755 ret = account_connect();
7756 if(ret != ACCOUNT_ERROR_NONE)
7758 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7761 ret = account_delete_from_db_by_id(account_id);
7762 if(ret != ACCOUNT_ERROR_NONE)
7764 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7768 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7770 ret = account_disconnect();
7771 if(ret != ACCOUNT_ERROR_NONE)
7773 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7778 static int utc_account_delete_by_user_name()
7781 ret = account_connect();
7782 if(ret != ACCOUNT_ERROR_NONE)
7784 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7787 ret = account_delete_from_db_by_user_name("usernamed-wy1115", "usernamed-com.samsung.account");
7788 if(ret != ACCOUNT_ERROR_NONE)
7790 ACCOUNT_SLOGD("(%d)-[Account] ret = %d \n", __LINE__, ret);
7794 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d \n", __LINE__, ret);
7796 ret = account_disconnect();
7797 if(ret != ACCOUNT_ERROR_NONE)
7799 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7804 static int utc_account_delete_by_package_name()
7807 ret = account_connect();
7808 if(ret != ACCOUNT_ERROR_NONE)
7810 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7813 ret = account_delete_from_db_by_package_name("usernamed-com.samsung.account");
7814 if(ret != ACCOUNT_ERROR_NONE)
7816 ACCOUNT_SLOGD("(%d)-[Account] ret = %d\n", __LINE__, ret);
7820 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d\n", __LINE__, ret);
7822 ret = account_disconnect();
7823 if(ret != ACCOUNT_ERROR_NONE)
7825 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7830 static int utc_account_update_sync_status_by_id()
7834 ret = account_connect();
7835 if(ret != ACCOUNT_ERROR_NONE)
7837 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7840 ret = account_update_sync_status_by_id(account_id, ACCOUNT_SYNC_STATUS_IDLE);
7841 if(ret != ACCOUNT_ERROR_NONE)
7843 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7846 ret = account_disconnect();
7847 if(ret != ACCOUNT_ERROR_NONE)
7849 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7854 static int utc_account_get_application_capability_support()
7859 ret = account_connect();
7860 if(ret != ACCOUNT_ERROR_NONE)
7862 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7865 ret = account_get_application_capability_support("com.samsung.facebook", ACCOUNT_SUPPORTS_CAPABILITY_CONTACT, &test);
7866 if(ret != ACCOUNT_ERROR_NONE)
7868 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7871 ret = account_disconnect();
7872 if(ret != ACCOUNT_ERROR_NONE)
7874 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7879 static int utc_account_get_and_update()
7882 account_h account = NULL;
7884 ret = account_connect();
7885 ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7887 ret = account_create(&account);
7888 ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7890 ret = account_query_account_by_account_id( 2, &account);
7891 ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7893 ret = account_set_access_token(account, "ACCESSSSSSSSSSSSSSSSSSSFASFASDGDSFFASDFASFDSDGAASDFASDGDFDFGAFASDFASFASDFASASGSGASDFASFSADDSGASGASGGASDFASDFASGSAASDFAAAG");
7894 ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7896 ret = account_update_to_db_by_id( account, 2);
7897 ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7899 ret = account_destroy(account);
7900 ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7902 ret = account_disconnect();
7903 ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7908 int main(int argc, char** argv)
7911 utc_notify_account_insert_update_delete();
7913 int account_id = -1;
7918 memset(temp, 0x00, sizeof(temp));
7920 ACCOUNT_SLOGD("\n\n**************************** Account Unit Test case Execution Suite ************************************ \n\n");
7921 ACCOUNT_SLOGD("1. Press 1 for account insert test \n");
7922 ACCOUNT_SLOGD("2. Press 2 for account update test \n");
7923 ACCOUNT_SLOGD("3. Press 3 for account delete test \n");
7924 ACCOUNT_SLOGD("4. Press 4 for query account test \n");
7925 if (scanf("%d", &user_resp) != 1) {
7926 ACCOUNT_SLOGD("Scanf Failed!!!\n");
7930 if (user_resp == 1) {
7931 ACCOUNT_SLOGD("In Account Insert Test Mode \n");
7932 account_id = _account_insert_test_new();
7935 ACCOUNT_SLOGD("(%d)-[Account] account insert test Success!! account id = %d\n", __LINE__, account_id);
7937 utc_account_get_and_update();
7938 } else if (user_resp == 2) {
7939 ACCOUNT_SLOGD("In Account Update Test Mode \n");
7940 ACCOUNT_SLOGD("1. Press 1 to upadte account by id test \n");
7941 ACCOUNT_SLOGD("2. Press 2 for update account by user name test \n");
7942 if (scanf("%d", &user_resp) != 1) {
7943 ACCOUNT_SLOGD("Scanf Failed!!!\n");
7946 if (user_resp == 1) {
7947 ACCOUNT_SLOGD("Enter Account Id to be Updated \n");
7948 if (scanf("%d", &account_id) != 1){
7949 ACCOUNT_SLOGD("Scanf Failed!!!\n");
7952 if (_account_update_test_new(account_id) == ACCOUNT_ERROR_NONE)
7953 ACCOUNT_SLOGD("Account update Success \n");
7955 ACCOUNT_SLOGD("Account update Failed \n");
7956 } else if (user_resp == 2) {
7957 ACCOUNT_SLOGD("Enter Account user name to be Updated \n");
7958 memset(temp, 0x00, sizeof(temp));
7959 if (scanf("%s", temp) != 1) {
7960 ACCOUNT_SLOGD("Scanf Failed!!!\n");
7964 memset(temp2, 0x00, sizeof(temp2));
7965 ACCOUNT_SLOGD("Enter Account package name to be Updated \n");
7966 if (scanf("%s", temp2) != 1) {
7967 ACCOUNT_SLOGD("Scanf Failed!!!\n");
7970 if (_account_update_test_new_by_user_name(temp, temp2) == ACCOUNT_ERROR_NONE)
7971 ACCOUNT_SLOGD("Account update Success \n");
7973 ACCOUNT_SLOGD("Account update Failed \n");
7975 ACCOUNT_SLOGD("Wrong info entered \n");
7978 } else if (user_resp == 3) {
7979 ACCOUNT_SLOGD("In Account Delete Test Mode \n");
7980 ACCOUNT_SLOGD("1. Press 1 to delete account by id test \n");
7981 ACCOUNT_SLOGD("2. Press 2 to delete account by user name test \n");
7982 ACCOUNT_SLOGD("3. Press 3 to delete account by package name test \n");
7983 if (scanf("%d", &user_resp) != 1) {
7984 ACCOUNT_SLOGD("Scanf Failed!!!\n");
7987 if (user_resp == 1) {
7988 ACCOUNT_SLOGD("Enter Account Id to be Deleted \n");
7989 if (scanf("%d", &account_id) != 1) {
7990 ACCOUNT_SLOGD("Scanf Failed!!!\n");
7993 int ret = account_connect();
7994 if(ret != ACCOUNT_ERROR_NONE)
7996 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7998 if (account_delete_from_db_by_id(account_id) == ACCOUNT_ERROR_NONE)
7999 ACCOUNT_SLOGD("Account delete Success \n");
8001 ACCOUNT_SLOGD("Account delete Failed \n");
8003 ret = account_disconnect();
8004 if(ret != ACCOUNT_ERROR_NONE)
8006 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8008 } else if (user_resp == 2) {
8009 ACCOUNT_SLOGD("Enter Account user name to be Deleted \n");
8010 memset(temp, 0x00, sizeof(temp));
8011 if (scanf("%s", temp) != 1) {
8012 ACCOUNT_SLOGD("Scanf Failed!!!\n");
8016 memset(temp2, 0x00, sizeof(temp2));
8017 ACCOUNT_SLOGD("Enter Account package name to be Deleted \n");
8018 if (scanf("%s", temp2) != 1) {
8019 ACCOUNT_SLOGD("Scanf Failed!!!\n");
8022 int ret = account_connect();
8023 if(ret != ACCOUNT_ERROR_NONE)
8025 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8027 if (account_delete_from_db_by_user_name(temp, temp2) == ACCOUNT_ERROR_NONE)
8028 ACCOUNT_SLOGD("Account delete Success \n");
8030 ACCOUNT_SLOGD("Account delete Failed \n");
8031 ret = account_disconnect();
8032 if(ret != ACCOUNT_ERROR_NONE)
8034 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8036 } else if (user_resp == 3) {
8037 ACCOUNT_SLOGD("Enter Account package name to be Deleted \n");
8038 memset(temp, 0x00, sizeof(temp));
8039 if (scanf("%s", temp) != 1) {
8040 ACCOUNT_SLOGD("Scanf Failed!!!\n");
8043 int ret = account_connect();
8044 if(ret != ACCOUNT_ERROR_NONE)
8046 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8048 if (account_delete_from_db_by_package_name(temp) == ACCOUNT_ERROR_NONE )
8049 ACCOUNT_SLOGD("Account delete Success \n");
8051 ACCOUNT_SLOGD("Account delete Failed \n");
8052 ret = account_disconnect();
8053 if(ret != ACCOUNT_ERROR_NONE)
8055 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8059 ACCOUNT_SLOGD("Wrong info entered \n");
8063 } else if (user_resp == 4) {
8064 ACCOUNT_SLOGD("In Account Query Test Mode \n");
8065 ACCOUNT_SLOGD("1. Press 1 to Query account by id test \n");
8066 ACCOUNT_SLOGD("2. Press 2 to Query account by user name test \n");
8067 ACCOUNT_SLOGD("3. Press 3 to Query account by package name test \n");
8068 ACCOUNT_SLOGD("4. Press 4 to Query account by capability test \n");
8069 if (scanf("%d", &user_resp) != 1) {
8070 ACCOUNT_SLOGD("Scanf Failed!!!\n");
8073 if (user_resp == 1) {
8074 ACCOUNT_SLOGD("Enter Account Id to be Queried \n");
8075 if (scanf("%d", &account_id) != 1) {
8076 ACCOUNT_SLOGD("Scanf Failed!!!\n");
8079 account_h account = NULL;
8081 account_create(&account);
8082 if (account_query_account_by_account_id(account_id, &account) == ACCOUNT_ERROR_NONE)
8083 ACCOUNT_SLOGD("Account Queried Successfully \n");
8085 ACCOUNT_SLOGD("Account Queried failed \n");
8086 account_destroy(account);
8087 account_disconnect();
8088 } else if (user_resp == 2) {
8089 ACCOUNT_SLOGD("Enter Account user name to be Queried \n");
8090 if (scanf("%s", temp) != 1) {
8091 ACCOUNT_SLOGD("Scanf Failed!!!\n");
8094 int ret = account_connect();
8095 if(ret != ACCOUNT_ERROR_NONE)
8097 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8099 if (account_query_account_by_user_name(_account_get_callback, temp, NULL) == ACCOUNT_ERROR_NONE)
8100 ACCOUNT_SLOGD("Account Queried Successfully \n");
8102 ACCOUNT_SLOGD("Account Queried failed \n");
8104 ret = account_disconnect();
8105 if(ret != ACCOUNT_ERROR_NONE)
8107 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8109 } else if (user_resp == 3) {
8110 ACCOUNT_SLOGD("Enter Account package name to be Queried \n");
8111 if (scanf("%s", temp) != 1) {
8112 ACCOUNT_SLOGD("Scanf Failed!!!\n");
8115 int ret = account_connect();
8116 if(ret != ACCOUNT_ERROR_NONE)
8118 ACCOUNT_SLOGD("(%d)-[Account] ret = %d\n", __LINE__, ret);
8120 if (account_query_account_by_package_name(_account_get_callback, temp, NULL) == ACCOUNT_ERROR_NONE)
8121 ACCOUNT_SLOGD("Account Queried Successfully \n");
8123 ACCOUNT_SLOGD("Account Queried failed \n");
8124 ret = account_disconnect();
8125 if(ret != ACCOUNT_ERROR_NONE)
8127 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8129 } else if (user_resp == 4) {
8130 ACCOUNT_SLOGD("Enter Account capability key to be Queried \n");
8131 if (scanf("%d", &cap_key) != 1) {
8132 ACCOUNT_SLOGD("Scanf Failed!!!\n");
8135 ACCOUNT_SLOGD("Enter Account capability key's value to be Queried \n");
8136 if (scanf("%d", &cap_value) != 1) {
8137 ACCOUNT_SLOGD("Scanf Failed!!!\n");
8140 int ret = account_connect();
8141 if(ret != ACCOUNT_ERROR_NONE)
8143 ACCOUNT_SLOGD("(%d)-[Account] ret = %d\n", __LINE__, ret);
8145 if (account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, cap_value, NULL) == ACCOUNT_ERROR_NONE)
8146 ACCOUNT_SLOGD("Account Queried Successfully \n");
8148 ACCOUNT_SLOGD("Account Queried failed \n");
8149 ret = account_disconnect();
8150 if(ret != ACCOUNT_ERROR_NONE)
8152 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8155 ACCOUNT_SLOGD("Wrong info entered \n");
8160 ACCOUNT_SLOGD("Wrong info entered \n");
8167 utc1_account_insert();
8168 utc2_account_insert();
8169 utc3_account_insert();
8170 utc4_account_insert();
8171 utc5_account_insert();
8172 utc6_account_insert();
8173 utc7_account_insert();
8174 utc8_account_insert();
8175 utc9_account_insert();
8176 utc10_account_insert();
8177 utc11_account_insert();
8178 utc12_account_insert();
8179 utc13_account_insert();
8180 utc14_account_insert();
8181 utc15_account_insert();
8182 utc16_account_insert();
8183 utc17_account_insert();
8184 utc18_account_insert();
8185 utc19_account_insert();
8186 utc20_account_insert();
8187 utc21_account_insert();
8188 utc22_account_insert();
8189 utc23_account_insert();
8194 utc1_account_update();
8195 utc2_account_update();
8196 utc3_account_update();
8197 utc4_account_update();
8198 utc5_account_update();
8199 utc6_account_update();
8200 utc7_account_update();
8201 utc8_account_update();
8202 utc9_account_update();
8203 utc10_account_update();
8204 utc11_account_update();
8205 utc12_account_update();
8206 utc13_account_update();
8207 utc14_account_update();
8208 utc15_account_update();
8209 utc16_account_update();
8210 utc17_account_update();
8211 utc18_account_update();
8212 utc19_account_update();
8213 utc20_account_update();
8214 utc21_account_update();
8215 utc22_account_update();
8216 utc23_account_update();
8217 utc24_account_update();
8218 utc25_account_update();
8219 utc26_account_update();
8220 utc27_account_update();
8223 //utc get account by id
8225 utc1_get_account_by_id();
8226 utc2_get_account_by_id();
8229 //utc get account by user name
8231 utc1_get_account_by_user_name();
8232 utc2_get_account_by_user_name();
8235 //utc get account by capability
8237 utc1_get_account_by_capability();
8238 utc2_get_account_by_capability();
8239 utc3_get_account_by_capability();
8240 utc4_get_account_by_capability();
8241 utc5_get_account_by_capability();
8244 //utc get all accounts
8246 utc1_get_all_accounts();
8247 utc2_get_all_accounts();
8250 //utc get capability by account id
8252 utc1_account_get_capability_by_account_id();
8253 utc2_account_get_capability_by_account_id();
8256 //utc update sync status by id
8258 utc_account_update_sync_status_by_id();
8261 //utc get application capability support
8263 utc_account_get_application_capability_support();
8267 utc_account_delete_by_id();
8268 utc_account_delete_by_user_name();
8269 utc_account_delete_by_package_name();