tizen 2.3.1 release
[framework/account/libaccounts-svc.git] / src / utc-account.c
1 /*
2  *  utc-account
3  *
4  * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Wonyoung Lee <wy1115.lee@samsung.com>, Sungchan Kim <sungchan81.kim@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  *
20  */
21
22 #include <stdio.h>
23 #include "account.h"
24 #include "account-private.h"
25 #include <string.h>
26 //#include <dbus/dbus.h>
27
28 int account_id = 0;
29
30 static void _account_free_text(char *text)
31 {
32         if (text) {
33                 free(text);
34                 text = NULL;
35         }
36 }
37
38 bool _capability_get_callback(const char* capability_type, account_capability_state_e capability_value, void* user_data)
39 {
40         char* test_type = (char*)capability_type;
41         int test_value = capability_value;
42
43         ACCOUNT_SLOGD("_capability_get_callback test_type = : %s\n", test_type);
44         ACCOUNT_SLOGD("_capability_get_callback test_value = : %d\n", test_value);
45         return TRUE;
46 }
47
48 int _account_get_account_info(account_h handle)
49 {
50         ACCOUNT_SLOGD("_account_get_callback\n");
51
52         char *test_text = NULL;
53
54         account_get_user_name(handle, &test_text);
55         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
56
57         _account_free_text(test_text);
58
59         account_get_display_name(handle, &test_text);
60         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
61
62         _account_free_text(test_text);
63
64         account_get_email_address(handle, &test_text);
65         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
66
67         _account_free_text(test_text);
68
69         account_get_icon_path(handle, &test_text);
70         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
71
72         _account_free_text(test_text);
73
74         account_get_source(handle, &test_text);
75         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
76
77         _account_free_text(test_text);
78
79         account_get_package_name(handle, &test_text);
80         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
81
82         _account_free_text(test_text);
83
84         account_get_domain_name(handle, &test_text);
85         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
86
87         _account_free_text(test_text);
88
89         account_get_access_token(handle, &test_text);
90         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
91
92
93         int i;
94
95         for(i=0;i<USER_TXT_CNT;i++)
96         {
97                 _account_free_text(test_text);
98
99                 account_get_user_text(handle, i, &test_text);
100                 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
101         }
102
103         int test_int  = -1;
104
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);
108
109         account_secrecy_state_e secret;
110         account_get_secret(handle, &secret);
111         ACCOUNT_SLOGD("account_get_secret : %d\n", secret);
112
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);
116
117         for(i=0;i<USER_INT_CNT;i++)
118         {
119                 test_int  = -1;
120                 account_get_user_int(handle, i, &test_int);
121                 ACCOUNT_SLOGD("_account_get_callback : %d\n", test_int);
122         }
123
124         account_get_capability_all(handle, _capability_get_callback, NULL);
125
126         return 0;
127 }
128
129
130 bool _account_get_callback(account_h handle, void* user_data)
131 {
132         ACCOUNT_SLOGD("_account_get_callback\n");
133
134         char *test_text = NULL;
135
136         account_get_user_name(handle, &test_text);
137         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
138
139         _account_free_text(test_text);
140
141         account_get_display_name(handle, &test_text);
142         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
143
144         _account_free_text(test_text);
145
146         account_get_email_address(handle, &test_text);
147         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
148
149         _account_free_text(test_text);
150
151         account_get_icon_path(handle, &test_text);
152         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
153
154         _account_free_text(test_text);
155
156         account_get_source(handle, &test_text);
157         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
158
159         _account_free_text(test_text);
160
161         account_get_package_name(handle, &test_text);
162         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
163
164         _account_free_text(test_text);
165
166         account_get_domain_name(handle, &test_text);
167         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
168
169         _account_free_text(test_text);
170
171         account_get_access_token(handle, &test_text);
172         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
173
174         int i;
175
176         for(i=0;i<USER_TXT_CNT;i++)
177         {
178                 _account_free_text(test_text);
179
180                 account_get_user_text(handle, i, &test_text);
181                 ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
182         }
183
184         int test_int  = -1;
185
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);
189
190         account_secrecy_state_e secret;
191         account_get_secret(handle, &secret);
192         ACCOUNT_SLOGD("account_get_secret : %d\n", secret);
193
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);
197
198         for(i=0;i<USER_INT_CNT;i++)
199         {
200                 test_int  = -1;
201                 account_get_user_int(handle, i, &test_int);
202                 ACCOUNT_SLOGD("_account_get_callback : %d\n", test_int);
203         }
204
205         account_get_capability_all(handle, _capability_get_callback, NULL);
206
207         return TRUE;
208 }
209
210 static int _account_insert_test_new(void)
211 {
212         int ret = -1;
213
214         account_h account = NULL;
215         int temp_int = -1;
216
217         ret = account_connect();
218
219         if(ret != ACCOUNT_ERROR_NONE)
220         {
221                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
222         }
223
224         char temp[128];
225         memset(temp, 0x00, sizeof(temp));
226
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)
233                 {
234                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
235                 }
236
237                 ret = account_disconnect();
238
239                 if(ret != ACCOUNT_ERROR_NONE)
240                 {
241                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
242                 }
243                 return ret;
244         }
245
246         ret = account_set_user_name(account, temp);
247
248         if(ret != ACCOUNT_ERROR_NONE)
249         {
250                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
251         }
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)
258                 {
259                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
260                 }
261
262                 ret = account_disconnect();
263
264                 if(ret != ACCOUNT_ERROR_NONE)
265                 {
266                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
267                 }
268                 return ret;
269         }
270
271         ret = account_set_display_name(account, temp);
272
273         if(ret != ACCOUNT_ERROR_NONE)
274         {
275                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
276         }
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)
283                 {
284                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
285                 }
286
287                 ret = account_disconnect();
288
289                 if(ret != ACCOUNT_ERROR_NONE)
290                 {
291                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
292                 }
293                 return ret;
294         }
295
296         ret = account_set_domain_name(account, temp);
297         if(ret != ACCOUNT_ERROR_NONE)
298         {
299                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
300         }
301
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)
308                 {
309                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
310                 }
311
312                 ret = account_disconnect();
313
314                 if(ret != ACCOUNT_ERROR_NONE)
315                 {
316                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
317                 }
318                 return ret;
319         }
320         ret = account_set_email_address(account, temp);
321         if(ret != ACCOUNT_ERROR_NONE)
322         {
323                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
324         }
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)
331                 {
332                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
333                 }
334
335                 ret = account_disconnect();
336
337                 if(ret != ACCOUNT_ERROR_NONE)
338                 {
339                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
340                 }
341                 return ret;
342         }
343
344         ret = account_set_package_name(account, temp);
345         if(ret != ACCOUNT_ERROR_NONE)
346         {
347                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
348         }
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)
355                 {
356                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
357                 }
358
359                 ret = account_disconnect();
360
361                 if(ret != ACCOUNT_ERROR_NONE)
362                 {
363                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
364                 }
365                 return ret;
366         }
367
368         ret = account_set_icon_path(account, temp);
369         if(ret != ACCOUNT_ERROR_NONE)
370         {
371                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
372         }
373         memset(temp, 0x00, sizeof(temp));
374
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)
380                 {
381                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
382                 }
383
384                 ret = account_disconnect();
385
386                 if(ret != ACCOUNT_ERROR_NONE)
387                 {
388                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
389                 }
390                 return ret;
391         }
392
393         ret = account_set_access_token(account, temp);
394         if(ret != ACCOUNT_ERROR_NONE)
395         {
396                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
397         }
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)
404                 {
405                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
406                 }
407
408                 ret = account_disconnect();
409
410                 if(ret != ACCOUNT_ERROR_NONE)
411                 {
412                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
413                 }
414                 return ret;
415         }
416
417         ret = account_set_auth_type( account, temp_int );
418         if(ret != ACCOUNT_ERROR_NONE)
419         {
420                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
421         }
422         temp_int = -1;
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)
428                 {
429                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
430                 }
431
432                 ret = account_disconnect();
433
434                 if(ret != ACCOUNT_ERROR_NONE)
435                 {
436                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
437                 }
438                 return ret;
439         }
440
441         ret = account_set_secret( account, temp_int );
442         if(ret != ACCOUNT_ERROR_NONE)
443         {
444                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
445         }
446         temp_int = -1;
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)
452                 {
453                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
454                 }
455
456                 ret = account_disconnect();
457
458                 if(ret != ACCOUNT_ERROR_NONE)
459                 {
460                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
461                 }
462                 return ret;
463         }
464
465         ret = account_set_sync_support( account, temp_int );
466         if(ret != ACCOUNT_ERROR_NONE)
467         {
468                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
469         }
470
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)
477                 {
478                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
479                 }
480
481                 ret = account_disconnect();
482
483                 if(ret != ACCOUNT_ERROR_NONE)
484                 {
485                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
486                 }
487                 return ret;
488         }
489         ret = account_set_source(account, temp);
490
491         int i;
492
493         for(i=0;i<USER_TXT_CNT;i++)
494         {
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)
501                         {
502                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
503                         }
504
505                         ret = account_disconnect();
506
507                         if(ret != ACCOUNT_ERROR_NONE)
508                         {
509                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
510                         }
511                         return ret;
512                 }
513                 ret = account_set_user_text(account, i, temp);
514                 if(ret != ACCOUNT_ERROR_NONE)
515                 {
516                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
517                 }
518
519         }
520
521         for(i=0;i<USER_INT_CNT;i++)
522         {
523                 temp_int = -1;
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)
529                         {
530                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
531                         }
532
533                         ret = account_disconnect();
534
535                         if(ret != ACCOUNT_ERROR_NONE)
536                         {
537                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
538                         }
539                         return ret;
540                 }
541                 ret = account_set_user_int(account, i, temp_int);
542                 if(ret != ACCOUNT_ERROR_NONE)
543                 {
544                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
545                 }
546         }
547
548         int cap_key = -1;
549         int cap_value = -1;
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");
555                                 exit(0);
556                 }
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");
560                                 exit(0);
561                         }
562                 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL, cap_value);
563                 if(ret != ACCOUNT_ERROR_NONE)
564                 {
565                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
566                 }
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)
572                         {
573                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
574                         }
575
576                         ret = account_disconnect();
577
578                         if(ret != ACCOUNT_ERROR_NONE)
579                         {
580                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
581                         }
582                         return ret;
583                 }
584                 if (temp_int == 1)
585                         want_to_enter_more_cap = 1;
586                 else
587                         want_to_enter_more_cap = 0;
588         }
589         int account_id = -1;
590         ret = account_insert_to_db(account, &account_id);
591         if(ret != ACCOUNT_ERROR_NONE)
592         {
593                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
594                 ret = account_destroy(account);
595                 if(ret != ACCOUNT_ERROR_NONE)
596                 {
597                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
598                 }
599                 ret = account_disconnect();
600
601                 if(ret != ACCOUNT_ERROR_NONE)
602                 {
603                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
604                 }
605                 return -1;
606         }
607
608         ret = account_destroy(account);
609         if(ret != ACCOUNT_ERROR_NONE)
610         {
611                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
612         }
613
614         ret = account_disconnect();
615
616         if(ret != ACCOUNT_ERROR_NONE)
617         {
618                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
619         }
620         return account_id;
621 }
622
623 #if 0
624 static int _account_insert_test(void)
625 {
626         int ret = -1;
627
628         account_h account = NULL;
629
630         ACCOUNT_SLOGD("account_connect returns %d\n", ret);
631
632         ret = account_create(&account);
633
634         ACCOUNT_SLOGD("account = %p\n", account);
635
636         ret = account_set_user_name(account, "wy1115.lee");
637
638         if(ret != ACCOUNT_ERROR_NONE)
639         {
640                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
641         }
642
643         ret = account_set_display_name(account, "Wonyoung Lee");
644
645         if(ret != ACCOUNT_ERROR_NONE)
646         {
647                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
648         }
649
650         ret = account_set_domain_name(account, "Samsung electronics");
651         if(ret != ACCOUNT_ERROR_NONE)
652         {
653                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
654         }
655         ret = account_set_email_address(account, "urusa77@gmail.com");
656         if(ret != ACCOUNT_ERROR_NONE)
657         {
658                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
659         }
660         ret = account_set_package_name(account, "com.samsung.account");
661         if(ret != ACCOUNT_ERROR_NONE)
662         {
663                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
664         }
665         ret = account_set_icon_path(account, "icon-path");
666         if(ret != ACCOUNT_ERROR_NONE)
667         {
668                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
669         }
670
671         ret = account_set_access_token(account, "ACCESSTOKEN");
672         if(ret != ACCOUNT_ERROR_NONE)
673         {
674                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
675         }
676
677         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
678         if(ret != ACCOUNT_ERROR_NONE)
679         {
680                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
681         }
682         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
683         if(ret != ACCOUNT_ERROR_NONE)
684         {
685                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
686         }
687         ret = account_set_source(account, "URUSA inc.");
688
689         int i;
690
691         for(i=0;i<USER_TXT_CNT;i++)
692         {
693                 ret = account_set_user_text(account, i, "user txt");
694                 if(ret != ACCOUNT_ERROR_NONE)
695                 {
696                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
697                 }
698
699         }
700
701         for(i=0;i<USER_INT_CNT;i++)
702         {
703                 ret = account_set_user_int(account, i, 888);
704                 if(ret != ACCOUNT_ERROR_NONE)
705                 {
706                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
707                 }
708         }
709
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);
720
721         int account_id = -1;
722         ret = account_insert_to_db(account, &account_id);
723         if(ret != ACCOUNT_ERROR_NONE)
724         {
725                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
726                 return -1;
727         }
728
729         ret = account_destroy(account);
730         if(ret != ACCOUNT_ERROR_NONE)
731         {
732                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
733         }
734
735         account=NULL;
736
737         ACCOUNT_SLOGD("account_connect returns %d\n", ret);
738
739         ret = account_create(&account);
740
741         account_query_account_by_account_id(account_id, &account);
742         _account_get_account_info(account);
743
744         account_query_capability_by_account_id(_capability_get_callback, account_id, NULL);
745
746         ret = account_destroy(account);
747         if(ret != ACCOUNT_ERROR_NONE)
748         {
749                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
750         }
751
752
753         account=NULL;
754
755         ACCOUNT_SLOGD("account_connect returns %d\n", ret);
756
757         ret = account_create(&account);
758
759         account_query_account_by_user_name(_account_get_callback, "usernamed-wy1115", NULL);
760
761         ret = account_destroy(account);
762         if(ret != ACCOUNT_ERROR_NONE)
763         {
764                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
765         }
766
767         return account_id;
768 }
769 #endif
770
771 static int _account_update_test_new_by_user_name(char *user_name, char *package_name)
772 {
773         int ret = -1;
774
775         account_h account = NULL;
776         int temp_int = -1;
777
778         char temp[128];
779         memset(temp, 0x00, sizeof(temp));
780         ret = account_connect();
781
782         if(ret != ACCOUNT_ERROR_NONE)
783         {
784                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
785         }
786
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)
793                 {
794                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
795                 }
796
797                 ret = account_disconnect();
798
799                 if(ret != ACCOUNT_ERROR_NONE)
800                 {
801                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
802                 }
803                 return ret;
804         }
805
806         ret = account_set_user_name(account, temp);
807
808         if(ret != ACCOUNT_ERROR_NONE)
809         {
810                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
811         }
812         memset(temp, 0x00, sizeof(temp));
813
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)
819                 {
820                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
821                 }
822
823                 ret = account_disconnect();
824
825                 if(ret != ACCOUNT_ERROR_NONE)
826                 {
827                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
828                 }
829                 return ret;
830         }
831
832         ret = account_set_display_name(account, temp);
833
834         if(ret != ACCOUNT_ERROR_NONE)
835         {
836                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
837         }
838         memset(temp, 0x00, sizeof(temp));
839
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)
845                 {
846                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
847                 }
848
849                 ret = account_disconnect();
850
851                 if(ret != ACCOUNT_ERROR_NONE)
852                 {
853                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
854                 }
855                 return ret;
856         }
857
858         ret = account_set_domain_name(account, temp);
859         if(ret != ACCOUNT_ERROR_NONE)
860         {
861                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
862         }
863
864         memset(temp, 0x00, sizeof(temp));
865
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)
871                 {
872                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
873                 }
874
875                 ret = account_disconnect();
876
877                 if(ret != ACCOUNT_ERROR_NONE)
878                 {
879                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
880                 }
881                 return ret;
882         }
883         ret = account_set_email_address(account, temp);
884         if(ret != ACCOUNT_ERROR_NONE)
885         {
886                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
887         }
888         memset(temp, 0x00, sizeof(temp));
889
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)
895                 {
896                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
897                 }
898
899                 ret = account_disconnect();
900
901                 if(ret != ACCOUNT_ERROR_NONE)
902                 {
903                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
904                 }
905                 return ret;
906         }
907
908         ret = account_set_package_name(account, temp);
909         if(ret != ACCOUNT_ERROR_NONE)
910         {
911                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
912         }
913         memset(temp, 0x00, sizeof(temp));
914
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)
920                 {
921                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
922                 }
923
924                 ret = account_disconnect();
925
926                 if(ret != ACCOUNT_ERROR_NONE)
927                 {
928                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
929                 }
930                 return ret;
931         }
932
933         ret = account_set_icon_path(account, temp);
934         if(ret != ACCOUNT_ERROR_NONE)
935         {
936                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
937         }
938         memset(temp, 0x00, sizeof(temp));
939
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)
945                 {
946                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
947                 }
948
949                 ret = account_disconnect();
950
951                 if(ret != ACCOUNT_ERROR_NONE)
952                 {
953                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
954                 }
955                 return ret;
956         }
957
958         ret = account_set_access_token(account, temp);
959         if(ret != ACCOUNT_ERROR_NONE)
960         {
961                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
962         }
963         memset(temp, 0x00, sizeof(temp));
964
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)
970                 {
971                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
972                 }
973
974                 ret = account_disconnect();
975
976                 if(ret != ACCOUNT_ERROR_NONE)
977                 {
978                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
979                 }
980                 return ret;
981         }
982
983         ret = account_set_auth_type( account, temp_int );
984         if(ret != ACCOUNT_ERROR_NONE)
985         {
986                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
987         }
988         temp_int = -1;
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)
994                 {
995                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
996                 }
997
998                 ret = account_disconnect();
999
1000                 if(ret != ACCOUNT_ERROR_NONE)
1001                 {
1002                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1003                 }
1004                 return ret;
1005         }
1006
1007         ret = account_set_secret( account, temp_int );
1008         if(ret != ACCOUNT_ERROR_NONE)
1009         {
1010                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1011         }
1012
1013         temp_int = -1;
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)
1019                 {
1020                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1021                 }
1022
1023                 ret = account_disconnect();
1024
1025                 if(ret != ACCOUNT_ERROR_NONE)
1026                 {
1027                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1028                 }
1029                 return ret;
1030         }
1031
1032         ret = account_set_sync_support( account, temp_int );
1033         if(ret != ACCOUNT_ERROR_NONE)
1034         {
1035                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1036         }
1037
1038         memset(temp, 0x00, sizeof(temp));
1039
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)
1045                 {
1046                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1047                 }
1048
1049                 ret = account_disconnect();
1050
1051                 if(ret != ACCOUNT_ERROR_NONE)
1052                 {
1053                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1054                 }
1055                 return ret;
1056         }
1057         ret = account_set_source(account, temp);
1058
1059         int i;
1060
1061         for(i=0;i<USER_TXT_CNT;i++)
1062         {
1063                 memset(temp, 0x00, sizeof(temp));
1064
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)
1070                         {
1071                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1072                         }
1073
1074                         ret = account_disconnect();
1075
1076                         if(ret != ACCOUNT_ERROR_NONE)
1077                         {
1078                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1079                         }
1080                         return ret;
1081                 }
1082                 ret = account_set_user_text(account, i, temp);
1083                 if(ret != ACCOUNT_ERROR_NONE)
1084                 {
1085                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1086                 }
1087
1088         }
1089
1090         for(i=0;i<USER_INT_CNT;i++)
1091         {
1092                 temp_int = -1;
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)
1098                         {
1099                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1100                         }
1101
1102                         ret = account_disconnect();
1103
1104                         if(ret != ACCOUNT_ERROR_NONE)
1105                         {
1106                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1107                         }
1108                         return ret;
1109                 }
1110                 ret = account_set_user_int(account, i, temp_int);
1111                 if(ret != ACCOUNT_ERROR_NONE)
1112                 {
1113                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1114                 }
1115         }
1116
1117         int cap_key = -1;
1118         int cap_value = -1;
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");
1124                         exit(0);
1125                 }
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");
1129                         exit(0);
1130                 }
1131                 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL, cap_value);
1132                 if(ret != ACCOUNT_ERROR_NONE)
1133                 {
1134                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1135                 }
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)
1141                         {
1142                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1143                         }
1144
1145                         ret = account_disconnect();
1146
1147                         if(ret != ACCOUNT_ERROR_NONE)
1148                         {
1149                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1150                         }
1151                         return ret;
1152                 }
1153                 if (temp_int == 1)
1154                         want_to_enter_more_cap = 1;
1155                 else
1156                         want_to_enter_more_cap = 0;
1157         }
1158
1159
1160         ret = account_update_to_db_by_user_name(account, user_name, package_name);
1161
1162
1163         if(ret != ACCOUNT_ERROR_NONE)
1164         {
1165                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1166         }
1167
1168         ret = account_destroy(account);
1169         if(ret != ACCOUNT_ERROR_NONE)
1170         {
1171                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1172         }
1173         ret = account_disconnect();
1174
1175         if(ret != ACCOUNT_ERROR_NONE)
1176         {
1177                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1178         }
1179
1180         return ret;
1181
1182 }
1183
1184
1185 static int _account_update_test_new(int account_id)
1186 {
1187
1188         int ret = -1;
1189
1190         account_h account = NULL;
1191         int temp_int = -1;
1192
1193         char temp[128];
1194         memset(temp, 0x00, sizeof(temp));
1195         ret = account_connect();
1196
1197         if(ret != ACCOUNT_ERROR_NONE)
1198         {
1199                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1200         }
1201
1202
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)
1209                 {
1210                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1211                 }
1212
1213                 ret = account_disconnect();
1214
1215                 if(ret != ACCOUNT_ERROR_NONE)
1216                 {
1217                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1218                 }
1219                 return ret;
1220         }
1221
1222         ret = account_set_user_name(account, temp);
1223
1224         if(ret != ACCOUNT_ERROR_NONE)
1225         {
1226                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1227         }
1228         memset(temp, 0x00, sizeof(temp));
1229
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)
1235                 {
1236                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1237                 }
1238
1239                 ret = account_disconnect();
1240
1241                 if(ret != ACCOUNT_ERROR_NONE)
1242                 {
1243                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1244                 }
1245                 return ret;
1246         }
1247
1248         ret = account_set_display_name(account, temp);
1249
1250         if(ret != ACCOUNT_ERROR_NONE)
1251         {
1252                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1253         }
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)
1260                 {
1261                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1262                 }
1263
1264                 ret = account_disconnect();
1265
1266                 if(ret != ACCOUNT_ERROR_NONE)
1267                 {
1268                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1269                 }
1270                 return ret;
1271         }
1272
1273         ret = account_set_domain_name(account, temp);
1274         if(ret != ACCOUNT_ERROR_NONE)
1275         {
1276                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1277         }
1278
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)
1285                 {
1286                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1287                 }
1288
1289                 ret = account_disconnect();
1290
1291                 if(ret != ACCOUNT_ERROR_NONE)
1292                 {
1293                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1294                 }
1295                 return ret;
1296         }
1297         ret = account_set_email_address(account, temp);
1298         if(ret != ACCOUNT_ERROR_NONE)
1299         {
1300                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1301         }
1302         memset(temp, 0x00, sizeof(temp));
1303
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)
1309                 {
1310                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1311                 }
1312
1313                 ret = account_disconnect();
1314
1315                 if(ret != ACCOUNT_ERROR_NONE)
1316                 {
1317                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1318                 }
1319                 return ret;
1320         }
1321
1322         ret = account_set_package_name(account, temp);
1323         if(ret != ACCOUNT_ERROR_NONE)
1324         {
1325                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1326         }
1327         memset(temp, 0x00, sizeof(temp));
1328
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)
1334                 {
1335                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1336                 }
1337
1338                 ret = account_disconnect();
1339
1340                 if(ret != ACCOUNT_ERROR_NONE)
1341                 {
1342                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1343                 }
1344                 return ret;
1345         }
1346
1347         ret = account_set_icon_path(account, temp);
1348         if(ret != ACCOUNT_ERROR_NONE)
1349         {
1350                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1351         }
1352         memset(temp, 0x00, sizeof(temp));
1353
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)
1359                 {
1360                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1361                 }
1362
1363                 ret = account_disconnect();
1364
1365                 if(ret != ACCOUNT_ERROR_NONE)
1366                 {
1367                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1368                 }
1369                 return ret;
1370         }
1371
1372         ret = account_set_access_token(account, temp);
1373         if(ret != ACCOUNT_ERROR_NONE)
1374         {
1375                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1376         }
1377         memset(temp, 0x00, sizeof(temp));
1378
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)
1384                 {
1385                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1386                 }
1387
1388                 ret = account_disconnect();
1389
1390                 if(ret != ACCOUNT_ERROR_NONE)
1391                 {
1392                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1393                 }
1394                 return ret;
1395         }
1396
1397         ret = account_set_auth_type( account, temp_int );
1398         if(ret != ACCOUNT_ERROR_NONE)
1399         {
1400                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1401         }
1402         temp_int = -1;
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)
1408                 {
1409                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1410                 }
1411
1412                 ret = account_disconnect();
1413
1414                 if(ret != ACCOUNT_ERROR_NONE)
1415                 {
1416                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1417                 }
1418                 return ret;
1419         }
1420
1421         ret = account_set_secret( account, temp_int );
1422         if(ret != ACCOUNT_ERROR_NONE)
1423         {
1424                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1425         }
1426
1427         temp_int = -1;
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)
1433                 {
1434                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1435                 }
1436
1437                 ret = account_disconnect();
1438
1439                 if(ret != ACCOUNT_ERROR_NONE)
1440                 {
1441                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1442                 }
1443                 return ret;
1444         }
1445
1446         ret = account_set_sync_support( account, temp_int );
1447         if(ret != ACCOUNT_ERROR_NONE)
1448         {
1449                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1450         }
1451
1452         memset(temp, 0x00, sizeof(temp));
1453
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)
1459                 {
1460                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1461                 }
1462
1463                 ret = account_disconnect();
1464
1465                 if(ret != ACCOUNT_ERROR_NONE)
1466                 {
1467                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1468                 }
1469                 return ret;
1470         }
1471         ret = account_set_source(account, temp);
1472
1473         int i;
1474
1475         for(i=0;i<USER_TXT_CNT;i++)
1476         {
1477                 memset(temp, 0x00, sizeof(temp));
1478
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)
1484                         {
1485                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1486                         }
1487
1488                         ret = account_disconnect();
1489
1490                         if(ret != ACCOUNT_ERROR_NONE)
1491                         {
1492                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1493                         }
1494                         return ret;
1495                 }
1496                 ret = account_set_user_text(account, i, temp);
1497                 if(ret != ACCOUNT_ERROR_NONE)
1498                 {
1499                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1500                 }
1501
1502         }
1503
1504         for(i=0;i<USER_INT_CNT;i++)
1505         {
1506                 temp_int = -1;
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)
1512                         {
1513                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1514                         }
1515
1516                         ret = account_disconnect();
1517
1518                         if(ret != ACCOUNT_ERROR_NONE)
1519                         {
1520                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1521                         }
1522                         return ret;
1523                 }
1524                 ret = account_set_user_int(account, i, temp_int);
1525                 if(ret != ACCOUNT_ERROR_NONE)
1526                 {
1527                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1528                 }
1529         }
1530
1531         int cap_key = -1;
1532         int cap_value = -1;
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");
1538                         exit(0);
1539                 }
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");
1543                         exit(0);
1544                 }
1545                 ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL, cap_value);
1546                 if(ret != ACCOUNT_ERROR_NONE)
1547                 {
1548                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1549                 }
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)
1555                         {
1556                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1557                         }
1558
1559                         ret = account_disconnect();
1560
1561                         if(ret != ACCOUNT_ERROR_NONE)
1562                         {
1563                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1564                         }
1565                         return ret;
1566                 }
1567                 if (temp_int == 1)
1568                         want_to_enter_more_cap = 1;
1569                 else
1570                         want_to_enter_more_cap = 0;
1571         }
1572
1573         ret = account_update_to_db_by_id(account, account_id);
1574
1575         if(ret != ACCOUNT_ERROR_NONE)
1576         {
1577                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1578         }
1579
1580         ret = account_destroy(account);
1581         if(ret != ACCOUNT_ERROR_NONE)
1582         {
1583                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1584         }
1585
1586         ret = account_disconnect();
1587
1588         if(ret != ACCOUNT_ERROR_NONE)
1589         {
1590                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1591         }
1592
1593         return ret;
1594 }
1595
1596 #if 0
1597 static int _account_update_test(int account_id)
1598 {
1599         int ret = - 1;
1600
1601         account_h account = NULL;
1602
1603         ret = account_create(&account);
1604
1605         ret = account_set_user_name(account, "updated-wy1115");
1606
1607         if(ret != ACCOUNT_ERROR_NONE)
1608         {
1609                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1610         }
1611
1612         ret = account_set_display_name(account, "updated-Wonyoung Lee");
1613
1614         if(ret != ACCOUNT_ERROR_NONE)
1615         {
1616                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1617         }
1618
1619         ret = account_set_domain_name(account, "updated-Samsung Facebook");
1620         if(ret != ACCOUNT_ERROR_NONE)
1621         {
1622                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1623         }
1624         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
1625         if(ret != ACCOUNT_ERROR_NONE)
1626         {
1627                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1628         }
1629         ret = account_set_package_name(account, "updated-com.samsung.account");
1630         if(ret != ACCOUNT_ERROR_NONE)
1631         {
1632                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1633         }
1634         ret = account_set_icon_path(account, "updated-icon-path");
1635         if(ret != ACCOUNT_ERROR_NONE)
1636         {
1637                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1638         }
1639
1640         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
1641         if(ret != ACCOUNT_ERROR_NONE)
1642         {
1643                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1644         }
1645
1646         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
1647         if(ret != ACCOUNT_ERROR_NONE)
1648         {
1649                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1650         }
1651         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
1652         if(ret != ACCOUNT_ERROR_NONE)
1653         {
1654                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1655         }
1656         ret = account_set_source(account, "updated-URUSA inc.");
1657
1658         int i;
1659
1660         for(i=0;i<USER_TXT_CNT;i++)
1661         {
1662                 ret = account_set_user_text(account, i, "updated-user txt");
1663                 if(ret != ACCOUNT_ERROR_NONE)
1664                 {
1665                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1666                 }
1667
1668         }
1669
1670         for(i=0;i<USER_INT_CNT;i++)
1671         {
1672                 ret = account_set_user_int(account, i, 111);
1673                 if(ret != ACCOUNT_ERROR_NONE)
1674                 {
1675                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1676                 }
1677         }
1678
1679
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);
1685
1686         ret = account_update_to_db_by_id(account, account_id);
1687
1688
1689         if(ret != ACCOUNT_ERROR_NONE)
1690         {
1691                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1692         }
1693
1694         ret = account_destroy(account);
1695         if(ret != ACCOUNT_ERROR_NONE)
1696         {
1697                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1698         }
1699
1700         return ret;
1701
1702 }
1703
1704 static int _account_update_test_by_username()
1705 {
1706         int ret = - 1;
1707
1708         account_h account = NULL;
1709
1710         ret = account_create(&account);
1711
1712         ret = account_set_user_name(account, "usernamed-wy1115");
1713
1714         if(ret != ACCOUNT_ERROR_NONE)
1715         {
1716                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1717         }
1718
1719         ret = account_set_display_name(account, "usernamed-Wonyoung Lee");
1720
1721         if(ret != ACCOUNT_ERROR_NONE)
1722         {
1723                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1724         }
1725
1726         ret = account_set_domain_name(account, "usernamed-Samsung Facebook");
1727         if(ret != ACCOUNT_ERROR_NONE)
1728         {
1729                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1730         }
1731         ret = account_set_email_address(account, "usernamed-urusa77@gmail.com");
1732         if(ret != ACCOUNT_ERROR_NONE)
1733         {
1734                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1735         }
1736         ret = account_set_package_name(account, "usernamed-com.samsung.account");
1737         if(ret != ACCOUNT_ERROR_NONE)
1738         {
1739                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1740         }
1741         ret = account_set_icon_path(account, "usernamed-icon-path");
1742         if(ret != ACCOUNT_ERROR_NONE)
1743         {
1744                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1745         }
1746
1747         ret = account_set_access_token(account, "usernamed-ACCESSTOKEN");
1748         if(ret != ACCOUNT_ERROR_NONE)
1749         {
1750                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1751         }
1752
1753         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
1754         if(ret != ACCOUNT_ERROR_NONE)
1755         {
1756                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1757         }
1758         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
1759         if(ret != ACCOUNT_ERROR_NONE)
1760         {
1761                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1762         }
1763         ret = account_set_source(account, "updated-URUSA inc.");
1764
1765         int i;
1766
1767         for(i=0;i<USER_TXT_CNT;i++)
1768         {
1769                 ret = account_set_user_text(account, i, "usernamed-user txt");
1770                 if(ret != ACCOUNT_ERROR_NONE)
1771                 {
1772                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1773                 }
1774
1775         }
1776
1777         for(i=0;i<USER_INT_CNT;i++)
1778         {
1779                 ret = account_set_user_int(account, i, 111);
1780                 if(ret != ACCOUNT_ERROR_NONE)
1781                 {
1782                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
1783                 }
1784         }
1785
1786
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);
1792
1793         ret = account_update_to_db_by_user_name(account, "updated-wy1115", "updated-com.samsung.account");
1794
1795
1796         if(ret != ACCOUNT_ERROR_NONE)
1797         {
1798                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1799         }
1800
1801         ret = account_destroy(account);
1802         if(ret != ACCOUNT_ERROR_NONE)
1803         {
1804                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1805         }
1806
1807         return ret;
1808
1809 }
1810
1811 static int _account_test_capability()
1812 {
1813         GSList* list = NULL;
1814         GSList* iter = NULL;
1815         int glist_len = 0;
1816
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"));
1823
1824         glist_len =  g_slist_length( list );
1825
1826         int capability_count = g_slist_length( list );
1827
1828         int binding_bufsize = 2+2*(capability_count*2)+1;
1829
1830         int binding_buf_index = 0;
1831         char* binding_buf = (char*)malloc(sizeof(char)*binding_bufsize);
1832
1833         memset(binding_buf, 0, sizeof(char)*binding_bufsize);
1834
1835         binding_buf[binding_buf_index++]='(';
1836
1837         ACCOUNT_SLOGD("(%d)Binding buf = %s\n", __LINE__,binding_buf);
1838
1839         int i;
1840
1841         for(i=0;i<capability_count;i++)
1842         {
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);
1848         }
1849
1850         binding_buf[binding_buf_index]=')';
1851
1852         ACCOUNT_SLOGD("(%d)Binding buf = %s\n", __LINE__,binding_buf);
1853
1854         ACCOUNT_SLOGD("Length %d\n", glist_len);
1855
1856         for (iter = list; iter != NULL; iter = g_slist_next(iter))
1857         {
1858                 char* capa;
1859                 capa = (char *)iter->data;
1860                 ACCOUNT_SLOGD("%s\n", (char *)iter->data);
1861                 g_free(capa);
1862         }
1863
1864
1865         g_slist_free(list);
1866         g_free(binding_buf);
1867         return 0;
1868 }
1869 #endif
1870
1871 static int utc1_account_insert()
1872 {
1873
1874         int ret = -1;
1875         account_h account = NULL;
1876         int account_id = -1;
1877         ret = account_connect();
1878         if(ret != ACCOUNT_ERROR_NONE)
1879         {
1880                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1881         }
1882
1883         ret = account_create(&account);
1884
1885         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
1886
1887         ret = account_insert_to_db(account, &account_id);
1888
1889         if(ret != ACCOUNT_ERROR_NONE)
1890         {
1891                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1892         }
1893         else
1894         {
1895                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1896         }
1897
1898         ret = account_destroy(account);
1899         if(ret != ACCOUNT_ERROR_NONE)
1900         {
1901                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1902         }
1903         else
1904         {
1905                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1906         }
1907         ret = account_disconnect();
1908         if(ret != ACCOUNT_ERROR_NONE)
1909         {
1910                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1911         }
1912         return account_id;
1913 }
1914
1915 static int utc2_account_insert()
1916 {
1917
1918         int ret = -1;
1919         account_h account = NULL;
1920         int account_id = -1;
1921         ret = account_connect();
1922         if(ret != ACCOUNT_ERROR_NONE)
1923         {
1924                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1925         }
1926
1927         ret = account_create(&account);
1928
1929         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
1930
1931         ret = account_set_user_name(account, NULL);
1932         if(ret != ACCOUNT_ERROR_NONE)
1933         {
1934                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1935         }
1936         else
1937         {
1938                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1939         }
1940         ret = account_insert_to_db(account, &account_id);
1941
1942         if(ret != ACCOUNT_ERROR_NONE)
1943         {
1944                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
1945         }
1946         else
1947         {
1948                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1949         }
1950
1951         ret = account_destroy(account);
1952         if(ret != ACCOUNT_ERROR_NONE)
1953         {
1954                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
1955         }
1956         else
1957         {
1958                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
1959         }
1960         ret = account_disconnect();
1961         if(ret != ACCOUNT_ERROR_NONE)
1962         {
1963                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1964         }
1965         return account_id;
1966 }
1967
1968
1969
1970
1971 static int utc3_account_insert()
1972 {
1973
1974         int ret = -1;
1975         account_h account = NULL;
1976         int account_id = -1;
1977         ret = account_connect();
1978         if(ret != ACCOUNT_ERROR_NONE)
1979         {
1980                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
1981         }
1982
1983         ret = account_create(&account);
1984
1985         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
1986
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)
2007         {
2008                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2009         }
2010         else
2011         {
2012                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2013         }
2014         ret = account_insert_to_db(account, &account_id);
2015
2016         if(ret != ACCOUNT_ERROR_NONE)
2017         {
2018                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2019         }
2020         else
2021         {
2022                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2023         }
2024
2025         ret = account_destroy(account);
2026         if(ret != ACCOUNT_ERROR_NONE)
2027         {
2028                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2029         }
2030         else
2031         {
2032                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2033         }
2034         ret = account_disconnect();
2035         if(ret != ACCOUNT_ERROR_NONE)
2036         {
2037                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2038         }
2039         return account_id;
2040 }
2041
2042 static int utc4_account_insert()
2043 {
2044
2045         int ret = -1;
2046         account_h account = NULL;
2047         int account_id = -1;
2048         ret = account_connect();
2049         if(ret != ACCOUNT_ERROR_NONE)
2050         {
2051                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2052         }
2053
2054         ret = account_create(&account);
2055
2056         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2057
2058         ret = account_set_user_name(account, "tarun.kr");
2059         if(ret != ACCOUNT_ERROR_NONE)
2060         {
2061                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2062         }
2063         else
2064         {
2065                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2066         }
2067
2068         ret = account_set_display_name(account, NULL);
2069
2070         if(ret != ACCOUNT_ERROR_NONE)
2071         {
2072                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2073         }
2074         else
2075         {
2076                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2077         }
2078
2079         ret = account_insert_to_db(account, &account_id);
2080
2081         if(ret != ACCOUNT_ERROR_NONE)
2082         {
2083                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2084         }
2085         else
2086         {
2087                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2088         }
2089
2090         ret = account_destroy(account);
2091         if(ret != ACCOUNT_ERROR_NONE)
2092         {
2093                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2094         }
2095         else
2096         {
2097                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2098         }
2099         ret = account_disconnect();
2100         if(ret != ACCOUNT_ERROR_NONE)
2101         {
2102                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2103         }
2104         return account_id;
2105 }
2106
2107 static int utc5_account_insert()
2108 {
2109
2110         int ret = -1;
2111         account_h account = NULL;
2112         int account_id = -1;
2113         ret = account_connect();
2114         if(ret != ACCOUNT_ERROR_NONE)
2115         {
2116                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2117         }
2118
2119         ret = account_create(&account);
2120
2121         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2122
2123         ret = account_set_user_name(account, "tarun.kr");
2124         if(ret != ACCOUNT_ERROR_NONE)
2125         {
2126                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2127         }
2128         else
2129         {
2130                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2131         }
2132
2133         ret = account_set_display_name(account, "tarun kumar");
2134
2135         if(ret != ACCOUNT_ERROR_NONE)
2136         {
2137                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2138         }
2139         else
2140         {
2141                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2142         }
2143
2144         ret = account_set_domain_name(account, NULL);
2145         if(ret != ACCOUNT_ERROR_NONE)
2146         {
2147                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2148         }
2149         else
2150         {
2151                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2152         }
2153         ret = account_insert_to_db(account, &account_id);
2154
2155         if(ret != ACCOUNT_ERROR_NONE)
2156         {
2157                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2158         }
2159         else
2160         {
2161                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2162         }
2163
2164         ret = account_destroy(account);
2165         if(ret != ACCOUNT_ERROR_NONE)
2166         {
2167                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2168         }
2169         else
2170         {
2171                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2172         }
2173         ret = account_disconnect();
2174         if(ret != ACCOUNT_ERROR_NONE)
2175         {
2176                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2177         }
2178         return account_id;
2179 }
2180
2181 static int utc6_account_insert()
2182 {
2183
2184         int ret = -1;
2185         account_h account = NULL;
2186         int account_id = -1;
2187         ret = account_connect();
2188         if(ret != ACCOUNT_ERROR_NONE)
2189         {
2190                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2191         }
2192
2193         ret = account_create(&account);
2194
2195         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2196
2197         ret = account_set_user_name(account, "tarun.kr");
2198         if(ret != ACCOUNT_ERROR_NONE)
2199         {
2200                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2201         }
2202         else
2203         {
2204                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2205         }
2206
2207         ret = account_set_display_name(account, "tarun kumar");
2208
2209         if(ret != ACCOUNT_ERROR_NONE)
2210         {
2211                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2212         }
2213         else
2214         {
2215                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2216         }
2217
2218         ret = account_set_domain_name(account, "Samsung");
2219         if(ret != ACCOUNT_ERROR_NONE)
2220         {
2221                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2222         }
2223         else
2224         {
2225                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2226         }
2227         ret = account_insert_to_db(account, &account_id);
2228
2229         if(ret != ACCOUNT_ERROR_NONE)
2230         {
2231                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2232         }
2233         else
2234         {
2235                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2236         }
2237
2238         ret = account_destroy(account);
2239         if(ret != ACCOUNT_ERROR_NONE)
2240         {
2241                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2242         }
2243         else
2244         {
2245                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2246         }
2247         ret = account_disconnect();
2248         if(ret != ACCOUNT_ERROR_NONE)
2249         {
2250                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2251         }
2252         return account_id;
2253 }
2254
2255 static int utc7_account_insert()
2256 {
2257
2258         int ret = -1;
2259         account_h account = NULL;
2260         int account_id = -1;
2261         ret = account_connect();
2262         if(ret != ACCOUNT_ERROR_NONE)
2263         {
2264                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2265         }
2266
2267         ret = account_create(&account);
2268
2269         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2270
2271         ret = account_set_user_name(account, "tarun.kr");
2272         if(ret != ACCOUNT_ERROR_NONE)
2273         {
2274                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2275         }
2276         else
2277         {
2278                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2279         }
2280
2281         ret = account_set_display_name(account, "tarun kumar");
2282
2283         if(ret != ACCOUNT_ERROR_NONE)
2284         {
2285                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2286         }
2287         else
2288         {
2289                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2290         }
2291
2292         ret = account_set_domain_name(account, "Samsung");
2293         if(ret != ACCOUNT_ERROR_NONE)
2294         {
2295                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2296         }
2297         else
2298         {
2299                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2300         }
2301
2302         ret = account_set_email_address(account, NULL);
2303         if(ret != ACCOUNT_ERROR_NONE)
2304         {
2305                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2306         }
2307         else
2308         {
2309                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2310         }
2311
2312         ret = account_insert_to_db(account, &account_id);
2313
2314         if(ret != ACCOUNT_ERROR_NONE)
2315         {
2316                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2317         }
2318         else
2319         {
2320                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2321         }
2322
2323         ret = account_destroy(account);
2324         if(ret != ACCOUNT_ERROR_NONE)
2325         {
2326                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2327         }
2328         else
2329         {
2330                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2331         }
2332         ret = account_disconnect();
2333         if(ret != ACCOUNT_ERROR_NONE)
2334         {
2335                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2336         }
2337         return account_id;
2338 }
2339
2340 static int utc8_account_insert()
2341 {
2342
2343         int ret = -1;
2344         account_h account = NULL;
2345         int account_id = -1;
2346         ret = account_connect();
2347         if(ret != ACCOUNT_ERROR_NONE)
2348         {
2349                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2350         }
2351
2352         ret = account_create(&account);
2353
2354         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2355
2356         ret = account_set_user_name(account, "tarun.kr");
2357         if(ret != ACCOUNT_ERROR_NONE)
2358         {
2359                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2360         }
2361         else
2362         {
2363                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2364         }
2365
2366         ret = account_set_display_name(account, "tarun kumar");
2367
2368         if(ret != ACCOUNT_ERROR_NONE)
2369         {
2370                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2371         }
2372         else
2373         {
2374                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2375         }
2376
2377         ret = account_set_domain_name(account, "Samsung");
2378         if(ret != ACCOUNT_ERROR_NONE)
2379         {
2380                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2381         }
2382         else
2383         {
2384                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2385         }
2386
2387         ret = account_set_email_address(account, "tarun.kr@samsung.com");
2388         if(ret != ACCOUNT_ERROR_NONE)
2389         {
2390                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2391         }
2392         else
2393         {
2394                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2395         }
2396
2397         ret = account_insert_to_db(account, &account_id);
2398
2399         if(ret != ACCOUNT_ERROR_NONE)
2400         {
2401                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2402         }
2403         else
2404         {
2405                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2406         }
2407
2408         ret = account_destroy(account);
2409         if(ret != ACCOUNT_ERROR_NONE)
2410         {
2411                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2412         }
2413         else
2414         {
2415                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2416         }
2417         ret = account_disconnect();
2418         if(ret != ACCOUNT_ERROR_NONE)
2419         {
2420                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2421         }
2422         return account_id;
2423 }
2424
2425 static int utc9_account_insert()
2426 {
2427
2428         int ret = -1;
2429         account_h account = NULL;
2430         int account_id = -1;
2431         ret = account_connect();
2432         if(ret != ACCOUNT_ERROR_NONE)
2433         {
2434                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2435         }
2436
2437         ret = account_create(&account);
2438
2439         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2440
2441         ret = account_set_user_name(account, "tarun.kr");
2442         if(ret != ACCOUNT_ERROR_NONE)
2443         {
2444                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2445         }
2446         else
2447         {
2448                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2449         }
2450
2451         ret = account_set_display_name(account, "tarun kumar");
2452
2453         if(ret != ACCOUNT_ERROR_NONE)
2454         {
2455                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2456         }
2457         else
2458         {
2459                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2460         }
2461
2462         ret = account_set_domain_name(account, "Samsung");
2463         if(ret != ACCOUNT_ERROR_NONE)
2464         {
2465                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2466         }
2467         else
2468         {
2469                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2470         }
2471
2472         ret = account_set_email_address(account, "tarun.kr@samsung.com");
2473         if(ret != ACCOUNT_ERROR_NONE)
2474         {
2475                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2476         }
2477         else
2478         {
2479                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2480         }
2481
2482         ret = account_set_package_name(account, NULL);
2483         if(ret != ACCOUNT_ERROR_NONE)
2484         {
2485                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2486         }
2487         else
2488         {
2489                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2490         }
2491         ret = account_insert_to_db(account, &account_id);
2492
2493         if(ret != ACCOUNT_ERROR_NONE)
2494         {
2495                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2496         }
2497         else
2498         {
2499                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2500         }
2501
2502         ret = account_destroy(account);
2503         if(ret != ACCOUNT_ERROR_NONE)
2504         {
2505                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2506         }
2507         else
2508         {
2509                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2510         }
2511         ret = account_disconnect();
2512         if(ret != ACCOUNT_ERROR_NONE)
2513         {
2514                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2515         }
2516         return account_id;
2517 }
2518
2519 static int utc10_account_insert()
2520 {
2521
2522         int ret = -1;
2523         account_h account = NULL;
2524         int account_id = -1;
2525         ret = account_connect();
2526         if(ret != ACCOUNT_ERROR_NONE)
2527         {
2528                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2529         }
2530
2531         ret = account_create(&account);
2532
2533         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2534
2535         ret = account_set_user_name(account, "tarun.kr");
2536         if(ret != ACCOUNT_ERROR_NONE)
2537         {
2538                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2539         }
2540         else
2541         {
2542                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2543         }
2544
2545         ret = account_set_display_name(account, "tarun kumar");
2546
2547         if(ret != ACCOUNT_ERROR_NONE)
2548         {
2549                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2550         }
2551         else
2552         {
2553                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2554         }
2555
2556         ret = account_set_domain_name(account, "Samsung");
2557         if(ret != ACCOUNT_ERROR_NONE)
2558         {
2559                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2560         }
2561         else
2562         {
2563                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2564         }
2565
2566         ret = account_set_email_address(account, "tarun.kr@samsung.com");
2567         if(ret != ACCOUNT_ERROR_NONE)
2568         {
2569                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2570         }
2571         else
2572         {
2573                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2574         }
2575
2576         ret = account_set_package_name(account, "com.samsung.accounts");
2577         if(ret != ACCOUNT_ERROR_NONE)
2578         {
2579                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2580         }
2581         else
2582         {
2583                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2584         }
2585         ret = account_insert_to_db(account, &account_id);
2586
2587         if(ret != ACCOUNT_ERROR_NONE)
2588         {
2589                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2590         }
2591         else
2592         {
2593                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2594         }
2595
2596         ret = account_destroy(account);
2597         if(ret != ACCOUNT_ERROR_NONE)
2598         {
2599                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2600         }
2601         else
2602         {
2603                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2604         }
2605         ret = account_disconnect();
2606         if(ret != ACCOUNT_ERROR_NONE)
2607         {
2608                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2609         }
2610         return account_id;
2611 }
2612
2613 static int utc11_account_insert()
2614 {
2615
2616         int ret = -1;
2617         account_h account = NULL;
2618         int account_id = -1;
2619         ret = account_connect();
2620         if(ret != ACCOUNT_ERROR_NONE)
2621         {
2622                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2623         }
2624
2625         ret = account_create(&account);
2626
2627         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2628
2629         ret = account_set_user_name(account, "tarun.kr");
2630         if(ret != ACCOUNT_ERROR_NONE)
2631         {
2632                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2633         }
2634         else
2635         {
2636                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2637         }
2638
2639         ret = account_set_display_name(account, "tarun kumar");
2640
2641         if(ret != ACCOUNT_ERROR_NONE)
2642         {
2643                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2644         }
2645         else
2646         {
2647                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2648         }
2649
2650         ret = account_set_domain_name(account, "Samsung");
2651         if(ret != ACCOUNT_ERROR_NONE)
2652         {
2653                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2654         }
2655         else
2656         {
2657                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2658         }
2659
2660         ret = account_set_email_address(account, "tarun.kr@samsung.com");
2661         if(ret != ACCOUNT_ERROR_NONE)
2662         {
2663                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2664         }
2665         else
2666         {
2667                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2668         }
2669
2670         ret = account_set_package_name(account, "com.samsung.accounts");
2671         if(ret != ACCOUNT_ERROR_NONE)
2672         {
2673                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2674         }
2675         else
2676         {
2677                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2678         }
2679
2680         ret = account_set_icon_path(account, NULL);
2681
2682         if(ret != ACCOUNT_ERROR_NONE)
2683         {
2684                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2685         }
2686         else
2687         {
2688                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2689         }
2690         ret = account_insert_to_db(account, &account_id);
2691
2692         if(ret != ACCOUNT_ERROR_NONE)
2693         {
2694                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2695         }
2696         else
2697         {
2698                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2699         }
2700
2701         ret = account_destroy(account);
2702         if(ret != ACCOUNT_ERROR_NONE)
2703         {
2704                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2705         }
2706         else
2707         {
2708                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2709         }
2710         ret = account_disconnect();
2711         if(ret != ACCOUNT_ERROR_NONE)
2712         {
2713                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2714         }
2715         return account_id;
2716 }
2717
2718 static int utc12_account_insert()
2719 {
2720
2721         int ret = -1;
2722         account_h account = NULL;
2723         int account_id = -1;
2724         ret = account_connect();
2725         if(ret != ACCOUNT_ERROR_NONE)
2726         {
2727                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2728         }
2729
2730         ret = account_create(&account);
2731
2732         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2733
2734         ret = account_set_user_name(account, "tarun.kr");
2735         if(ret != ACCOUNT_ERROR_NONE)
2736         {
2737                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2738         }
2739         else
2740         {
2741                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2742         }
2743
2744         ret = account_set_display_name(account, "tarun kumar");
2745
2746         if(ret != ACCOUNT_ERROR_NONE)
2747         {
2748                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2749         }
2750         else
2751         {
2752                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2753         }
2754
2755         ret = account_set_domain_name(account, "Samsung");
2756         if(ret != ACCOUNT_ERROR_NONE)
2757         {
2758                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2759         }
2760         else
2761         {
2762                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2763         }
2764
2765         ret = account_set_email_address(account, "tarun.kr@samsung.com");
2766         if(ret != ACCOUNT_ERROR_NONE)
2767         {
2768                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2769         }
2770         else
2771         {
2772                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2773         }
2774
2775         ret = account_set_package_name(account, "com.samsung.accounts");
2776         if(ret != ACCOUNT_ERROR_NONE)
2777         {
2778                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2779         }
2780         else
2781         {
2782                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2783         }
2784
2785         ret = account_set_icon_path(account, "/test/test.jpg");
2786
2787         if(ret != ACCOUNT_ERROR_NONE)
2788         {
2789                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2790         }
2791         else
2792         {
2793                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2794         }
2795         ret = account_insert_to_db(account, &account_id);
2796
2797         if(ret != ACCOUNT_ERROR_NONE)
2798         {
2799                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2800         }
2801         else
2802         {
2803                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2804         }
2805
2806         ret = account_destroy(account);
2807         if(ret != ACCOUNT_ERROR_NONE)
2808         {
2809                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2810         }
2811         else
2812         {
2813                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2814         }
2815         ret = account_disconnect();
2816         if(ret != ACCOUNT_ERROR_NONE)
2817         {
2818                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2819         }
2820         return account_id;
2821 }
2822
2823 static int utc13_account_insert()
2824 {
2825
2826         int ret = -1;
2827         account_h account = NULL;
2828         int account_id = -1;
2829         ret = account_connect();
2830         if(ret != ACCOUNT_ERROR_NONE)
2831         {
2832                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2833         }
2834
2835         ret = account_create(&account);
2836
2837         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2838
2839         ret = account_set_user_name(account, "tarun.kr");
2840         if(ret != ACCOUNT_ERROR_NONE)
2841         {
2842                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2843         }
2844         else
2845         {
2846                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2847         }
2848
2849         ret = account_set_display_name(account, "tarun kumar");
2850
2851         if(ret != ACCOUNT_ERROR_NONE)
2852         {
2853                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2854         }
2855         else
2856         {
2857                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2858         }
2859
2860         ret = account_set_domain_name(account, "Samsung");
2861         if(ret != ACCOUNT_ERROR_NONE)
2862         {
2863                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2864         }
2865         else
2866         {
2867                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2868         }
2869
2870         ret = account_set_email_address(account, "tarun.kr@samsung.com");
2871         if(ret != ACCOUNT_ERROR_NONE)
2872         {
2873                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2874         }
2875         else
2876         {
2877                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2878         }
2879
2880         ret = account_set_package_name(account, "com.samsung.accounts");
2881         if(ret != ACCOUNT_ERROR_NONE)
2882         {
2883                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2884         }
2885         else
2886         {
2887                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2888         }
2889
2890         ret = account_set_icon_path(account, "/test/test.jpg");
2891
2892         if(ret != ACCOUNT_ERROR_NONE)
2893         {
2894                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2895         }
2896         else
2897         {
2898                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2899         }
2900
2901         ret = account_set_access_token(account, NULL);
2902         if(ret != ACCOUNT_ERROR_NONE)
2903         {
2904                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2905         }
2906         else
2907         {
2908                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2909         }
2910
2911
2912         ret = account_insert_to_db(account, &account_id);
2913
2914         if(ret != ACCOUNT_ERROR_NONE)
2915         {
2916                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2917         }
2918         else
2919         {
2920                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2921         }
2922
2923         ret = account_destroy(account);
2924         if(ret != ACCOUNT_ERROR_NONE)
2925         {
2926                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2927         }
2928         else
2929         {
2930                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2931         }
2932         ret = account_disconnect();
2933         if(ret != ACCOUNT_ERROR_NONE)
2934         {
2935                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2936         }
2937         return account_id;
2938 }
2939
2940 static int utc14_account_insert()
2941 {
2942
2943         int ret = -1;
2944         account_h account = NULL;
2945         int account_id = -1;
2946         ret = account_connect();
2947         if(ret != ACCOUNT_ERROR_NONE)
2948         {
2949                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
2950         }
2951
2952         ret = account_create(&account);
2953
2954         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
2955
2956         ret = account_set_user_name(account, "tarun.kr");
2957         if(ret != ACCOUNT_ERROR_NONE)
2958         {
2959                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
2960         }
2961         else
2962         {
2963                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2964         }
2965
2966         ret = account_set_display_name(account, "tarun kumar");
2967
2968         if(ret != ACCOUNT_ERROR_NONE)
2969         {
2970                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2971         }
2972         else
2973         {
2974                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2975         }
2976
2977         ret = account_set_domain_name(account, "Samsung");
2978         if(ret != ACCOUNT_ERROR_NONE)
2979         {
2980                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2981         }
2982         else
2983         {
2984                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2985         }
2986
2987         ret = account_set_email_address(account, "tarun.kr@samsung.com");
2988         if(ret != ACCOUNT_ERROR_NONE)
2989         {
2990                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
2991         }
2992         else
2993         {
2994                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
2995         }
2996
2997         ret = account_set_package_name(account, "com.samsung.accounts");
2998         if(ret != ACCOUNT_ERROR_NONE)
2999         {
3000                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3001         }
3002         else
3003         {
3004                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3005         }
3006
3007         ret = account_set_icon_path(account, "/test/test.jpg");
3008
3009         if(ret != ACCOUNT_ERROR_NONE)
3010         {
3011                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3012         }
3013         else
3014         {
3015                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3016         }
3017
3018         ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3019         if(ret != ACCOUNT_ERROR_NONE)
3020         {
3021                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3022         }
3023         else
3024         {
3025                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3026         }
3027
3028
3029         ret = account_insert_to_db(account, &account_id);
3030
3031         if(ret != ACCOUNT_ERROR_NONE)
3032         {
3033                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3034         }
3035         else
3036         {
3037                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3038         }
3039
3040         ret = account_destroy(account);
3041         if(ret != ACCOUNT_ERROR_NONE)
3042         {
3043                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3044         }
3045         else
3046         {
3047                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3048         }
3049         ret = account_disconnect();
3050         if(ret != ACCOUNT_ERROR_NONE)
3051         {
3052                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3053         }
3054         return account_id;
3055 }
3056
3057 static int utc15_account_insert()
3058 {
3059
3060         int ret = -1;
3061         account_h account = NULL;
3062         int account_id = -1;
3063         ret = account_connect();
3064         if(ret != ACCOUNT_ERROR_NONE)
3065         {
3066                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3067         }
3068
3069         ret = account_create(&account);
3070
3071         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3072
3073         ret = account_set_user_name(account, "tarun.kr");
3074         if(ret != ACCOUNT_ERROR_NONE)
3075         {
3076                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3077         }
3078         else
3079         {
3080                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3081         }
3082
3083         ret = account_set_display_name(account, "tarun kumar");
3084
3085         if(ret != ACCOUNT_ERROR_NONE)
3086         {
3087                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3088         }
3089         else
3090         {
3091                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3092         }
3093
3094         ret = account_set_domain_name(account, "Samsung");
3095         if(ret != ACCOUNT_ERROR_NONE)
3096         {
3097                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3098         }
3099         else
3100         {
3101                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3102         }
3103
3104         ret = account_set_email_address(account, "tarun.kr@samsung.com");
3105         if(ret != ACCOUNT_ERROR_NONE)
3106         {
3107                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3108         }
3109         else
3110         {
3111                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3112         }
3113
3114         ret = account_set_package_name(account, "com.samsung.accounts");
3115         if(ret != ACCOUNT_ERROR_NONE)
3116         {
3117                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3118         }
3119         else
3120         {
3121                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3122         }
3123
3124         ret = account_set_icon_path(account, "/test/test.jpg");
3125
3126         if(ret != ACCOUNT_ERROR_NONE)
3127         {
3128                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3129         }
3130         else
3131         {
3132                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3133         }
3134
3135         ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3136         if(ret != ACCOUNT_ERROR_NONE)
3137         {
3138                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3139         }
3140         else
3141         {
3142                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3143         }
3144
3145         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3146         if(ret != ACCOUNT_ERROR_NONE)
3147         {
3148                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3149         }
3150         else
3151         {
3152                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3153         }
3154         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3155         if(ret != ACCOUNT_ERROR_NONE)
3156         {
3157                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3158         }
3159         else
3160         {
3161                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3162         }
3163         ret = account_insert_to_db(account, &account_id);
3164
3165         if(ret != ACCOUNT_ERROR_NONE)
3166         {
3167                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3168         }
3169         else
3170         {
3171                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3172         }
3173
3174         ret = account_destroy(account);
3175         if(ret != ACCOUNT_ERROR_NONE)
3176         {
3177                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3178         }
3179         else
3180         {
3181                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3182         }
3183         ret = account_disconnect();
3184         if(ret != ACCOUNT_ERROR_NONE)
3185         {
3186                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3187         }
3188         return account_id;
3189 }
3190
3191 static int utc16_account_insert()
3192 {
3193
3194         int ret = -1;
3195         account_h account = NULL;
3196         int account_id = -1;
3197         ret = account_connect();
3198         if(ret != ACCOUNT_ERROR_NONE)
3199         {
3200                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3201         }
3202
3203         ret = account_create(&account);
3204
3205         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3206
3207         ret = account_set_user_name(account, "tarun.kr");
3208         if(ret != ACCOUNT_ERROR_NONE)
3209         {
3210                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3211         }
3212         else
3213         {
3214                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3215         }
3216
3217         ret = account_set_display_name(account, "tarun kumar");
3218
3219         if(ret != ACCOUNT_ERROR_NONE)
3220         {
3221                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3222         }
3223         else
3224         {
3225                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3226         }
3227
3228         ret = account_set_domain_name(account, "Samsung");
3229         if(ret != ACCOUNT_ERROR_NONE)
3230         {
3231                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3232         }
3233         else
3234         {
3235                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3236         }
3237
3238         ret = account_set_email_address(account, "tarun.kr@samsung.com");
3239         if(ret != ACCOUNT_ERROR_NONE)
3240         {
3241                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3242         }
3243         else
3244         {
3245                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3246         }
3247
3248         ret = account_set_package_name(account, "com.samsung.accounts");
3249         if(ret != ACCOUNT_ERROR_NONE)
3250         {
3251                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3252         }
3253         else
3254         {
3255                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3256         }
3257
3258         ret = account_set_icon_path(account, "/test/test.jpg");
3259
3260         if(ret != ACCOUNT_ERROR_NONE)
3261         {
3262                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3263         }
3264         else
3265         {
3266                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3267         }
3268
3269         ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3270         if(ret != ACCOUNT_ERROR_NONE)
3271         {
3272                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3273         }
3274         else
3275         {
3276                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3277         }
3278
3279         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3280         if(ret != ACCOUNT_ERROR_NONE)
3281         {
3282                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3283         }
3284         else
3285         {
3286                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3287         }
3288         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3289         if(ret != ACCOUNT_ERROR_NONE)
3290         {
3291                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3292         }
3293         else
3294         {
3295                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3296         }
3297         ret = account_insert_to_db(account, &account_id);
3298
3299         if(ret != ACCOUNT_ERROR_NONE)
3300         {
3301                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3302         }
3303         else
3304         {
3305                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3306         }
3307
3308         ret = account_destroy(account);
3309         if(ret != ACCOUNT_ERROR_NONE)
3310         {
3311                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3312         }
3313         else
3314         {
3315                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3316         }
3317         ret = account_disconnect();
3318         if(ret != ACCOUNT_ERROR_NONE)
3319         {
3320                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3321         }
3322         return account_id;
3323 }
3324
3325 static int utc17_account_insert()
3326 {
3327
3328         int ret = -1;
3329         account_h account = NULL;
3330         int account_id = -1;
3331         ret = account_connect();
3332         if(ret != ACCOUNT_ERROR_NONE)
3333         {
3334                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3335         }
3336
3337         ret = account_create(&account);
3338
3339         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3340
3341         ret = account_set_user_name(account, "tarun.kr");
3342         if(ret != ACCOUNT_ERROR_NONE)
3343         {
3344                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3345         }
3346         else
3347         {
3348                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3349         }
3350
3351         ret = account_set_display_name(account, "tarun kumar");
3352
3353         if(ret != ACCOUNT_ERROR_NONE)
3354         {
3355                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3356         }
3357         else
3358         {
3359                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3360         }
3361
3362         ret = account_set_domain_name(account, "Samsung");
3363         if(ret != ACCOUNT_ERROR_NONE)
3364         {
3365                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3366         }
3367         else
3368         {
3369                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3370         }
3371
3372         ret = account_set_email_address(account, "tarun.kr@samsung.com");
3373         if(ret != ACCOUNT_ERROR_NONE)
3374         {
3375                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3376         }
3377         else
3378         {
3379                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3380         }
3381
3382         ret = account_set_package_name(account, "com.samsung.accounts");
3383         if(ret != ACCOUNT_ERROR_NONE)
3384         {
3385                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3386         }
3387         else
3388         {
3389                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3390         }
3391
3392         ret = account_set_icon_path(account, "/test/test.jpg");
3393
3394         if(ret != ACCOUNT_ERROR_NONE)
3395         {
3396                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3397         }
3398         else
3399         {
3400                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3401         }
3402
3403         ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3404         if(ret != ACCOUNT_ERROR_NONE)
3405         {
3406                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3407         }
3408         else
3409         {
3410                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3411         }
3412
3413         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3414         if(ret != ACCOUNT_ERROR_NONE)
3415         {
3416                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3417         }
3418         else
3419         {
3420                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3421         }
3422         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3423         if(ret != ACCOUNT_ERROR_NONE)
3424         {
3425                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3426         }
3427         else
3428         {
3429                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3430         }
3431
3432         ret = account_set_source(account, NULL);
3433         if(ret != ACCOUNT_ERROR_NONE)
3434         {
3435                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3436         }
3437         else
3438         {
3439                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3440         }
3441         ret = account_insert_to_db(account, &account_id);
3442
3443         if(ret != ACCOUNT_ERROR_NONE)
3444         {
3445                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3446         }
3447         else
3448         {
3449                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3450         }
3451
3452         ret = account_destroy(account);
3453         if(ret != ACCOUNT_ERROR_NONE)
3454         {
3455                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3456         }
3457         else
3458         {
3459                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3460         }
3461         ret = account_disconnect();
3462         if(ret != ACCOUNT_ERROR_NONE)
3463         {
3464                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3465         }
3466         return account_id;
3467 }
3468
3469 static int utc18_account_insert()
3470 {
3471
3472         int ret = -1;
3473         account_h account = NULL;
3474         int account_id = -1;
3475         ret = account_connect();
3476         if(ret != ACCOUNT_ERROR_NONE)
3477         {
3478                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3479         }
3480
3481         ret = account_create(&account);
3482
3483         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3484
3485         ret = account_set_user_name(account, "tarun.kr");
3486         if(ret != ACCOUNT_ERROR_NONE)
3487         {
3488                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3489         }
3490         else
3491         {
3492                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3493         }
3494
3495         ret = account_set_display_name(account, "tarun kumar");
3496
3497         if(ret != ACCOUNT_ERROR_NONE)
3498         {
3499                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3500         }
3501         else
3502         {
3503                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3504         }
3505
3506         ret = account_set_domain_name(account, "Samsung");
3507         if(ret != ACCOUNT_ERROR_NONE)
3508         {
3509                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3510         }
3511         else
3512         {
3513                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3514         }
3515
3516         ret = account_set_email_address(account, "tarun.kr@samsung.com");
3517         if(ret != ACCOUNT_ERROR_NONE)
3518         {
3519                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3520         }
3521         else
3522         {
3523                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3524         }
3525
3526         ret = account_set_package_name(account, "com.samsung.accounts");
3527         if(ret != ACCOUNT_ERROR_NONE)
3528         {
3529                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3530         }
3531         else
3532         {
3533                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3534         }
3535
3536         ret = account_set_icon_path(account, "/test/test.jpg");
3537
3538         if(ret != ACCOUNT_ERROR_NONE)
3539         {
3540                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3541         }
3542         else
3543         {
3544                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3545         }
3546
3547         ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3548         if(ret != ACCOUNT_ERROR_NONE)
3549         {
3550                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3551         }
3552         else
3553         {
3554                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3555         }
3556
3557         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3558         if(ret != ACCOUNT_ERROR_NONE)
3559         {
3560                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3561         }
3562         else
3563         {
3564                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3565         }
3566         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3567         if(ret != ACCOUNT_ERROR_NONE)
3568         {
3569                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3570         }
3571         else
3572         {
3573                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3574         }
3575
3576         ret = account_set_source(account, "URUSA inc.");
3577         if(ret != ACCOUNT_ERROR_NONE)
3578         {
3579                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3580         }
3581         else
3582         {
3583                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3584         }
3585         ret = account_insert_to_db(account, &account_id);
3586
3587         if(ret != ACCOUNT_ERROR_NONE)
3588         {
3589                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3590         }
3591         else
3592         {
3593                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3594         }
3595
3596         ret = account_destroy(account);
3597         if(ret != ACCOUNT_ERROR_NONE)
3598         {
3599                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3600         }
3601         else
3602         {
3603                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3604         }
3605         ret = account_disconnect();
3606         if(ret != ACCOUNT_ERROR_NONE)
3607         {
3608                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3609         }
3610         return account_id;
3611 }
3612
3613 static int utc19_account_insert()
3614 {
3615
3616         int ret = -1;
3617         account_h account = NULL;
3618         int account_id = -1;
3619         ret = account_connect();
3620         if(ret != ACCOUNT_ERROR_NONE)
3621         {
3622                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3623         }
3624
3625         ret = account_create(&account);
3626
3627         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3628
3629         ret = account_set_user_name(account, "tarun.kr");
3630         if(ret != ACCOUNT_ERROR_NONE)
3631         {
3632                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3633         }
3634         else
3635         {
3636                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3637         }
3638
3639         ret = account_set_display_name(account, "tarun kumar");
3640
3641         if(ret != ACCOUNT_ERROR_NONE)
3642         {
3643                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3644         }
3645         else
3646         {
3647                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3648         }
3649
3650         ret = account_set_domain_name(account, "Samsung");
3651         if(ret != ACCOUNT_ERROR_NONE)
3652         {
3653                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3654         }
3655         else
3656         {
3657                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3658         }
3659
3660         ret = account_set_email_address(account, "tarun.kr@samsung.com");
3661         if(ret != ACCOUNT_ERROR_NONE)
3662         {
3663                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3664         }
3665         else
3666         {
3667                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3668         }
3669
3670         ret = account_set_package_name(account, "com.samsung.accounts");
3671         if(ret != ACCOUNT_ERROR_NONE)
3672         {
3673                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3674         }
3675         else
3676         {
3677                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3678         }
3679
3680         ret = account_set_icon_path(account, "/test/test.jpg");
3681
3682         if(ret != ACCOUNT_ERROR_NONE)
3683         {
3684                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3685         }
3686         else
3687         {
3688                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3689         }
3690
3691         ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3692         if(ret != ACCOUNT_ERROR_NONE)
3693         {
3694                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3695         }
3696         else
3697         {
3698                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3699         }
3700
3701         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3702         if(ret != ACCOUNT_ERROR_NONE)
3703         {
3704                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3705         }
3706         else
3707         {
3708                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3709         }
3710         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3711         if(ret != ACCOUNT_ERROR_NONE)
3712         {
3713                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3714         }
3715         else
3716         {
3717                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3718         }
3719
3720         ret = account_set_source(account, "URUSA inc.");
3721         if(ret != ACCOUNT_ERROR_NONE)
3722         {
3723                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3724         }
3725         else
3726         {
3727                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3728         }
3729
3730         int i;
3731
3732         for(i=0; i<USER_TXT_CNT; i++)
3733         {
3734                 ret = account_set_user_text(account, i, NULL);
3735                 if(ret != ACCOUNT_ERROR_NONE)
3736                 {
3737                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3738                 }
3739
3740         }
3741         ret = account_insert_to_db(account, &account_id);
3742
3743         if(ret != ACCOUNT_ERROR_NONE)
3744         {
3745                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3746         }
3747         else
3748         {
3749                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3750         }
3751
3752         ret = account_destroy(account);
3753         if(ret != ACCOUNT_ERROR_NONE)
3754         {
3755                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3756         }
3757         else
3758         {
3759                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3760         }
3761         ret = account_disconnect();
3762         if(ret != ACCOUNT_ERROR_NONE)
3763         {
3764                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3765         }
3766         return account_id;
3767 }
3768
3769 static int utc20_account_insert()
3770 {
3771
3772         int ret = -1;
3773         account_h account = NULL;
3774         int account_id = -1;
3775         ret = account_connect();
3776         if(ret != ACCOUNT_ERROR_NONE)
3777         {
3778                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3779         }
3780
3781         ret = account_create(&account);
3782
3783         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3784
3785         ret = account_set_user_name(account, "tarun.kr");
3786         if(ret != ACCOUNT_ERROR_NONE)
3787         {
3788                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3789         }
3790         else
3791         {
3792                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3793         }
3794
3795         ret = account_set_display_name(account, "tarun kumar");
3796
3797         if(ret != ACCOUNT_ERROR_NONE)
3798         {
3799                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3800         }
3801         else
3802         {
3803                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3804         }
3805
3806         ret = account_set_domain_name(account, "Samsung");
3807         if(ret != ACCOUNT_ERROR_NONE)
3808         {
3809                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3810         }
3811         else
3812         {
3813                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3814         }
3815
3816         ret = account_set_email_address(account, "tarun.kr@samsung.com");
3817         if(ret != ACCOUNT_ERROR_NONE)
3818         {
3819                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3820         }
3821         else
3822         {
3823                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3824         }
3825
3826         ret = account_set_package_name(account, "com.samsung.accounts");
3827         if(ret != ACCOUNT_ERROR_NONE)
3828         {
3829                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3830         }
3831         else
3832         {
3833                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3834         }
3835
3836         ret = account_set_icon_path(account, "/test/test.jpg");
3837
3838         if(ret != ACCOUNT_ERROR_NONE)
3839         {
3840                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3841         }
3842         else
3843         {
3844                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3845         }
3846
3847         ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
3848         if(ret != ACCOUNT_ERROR_NONE)
3849         {
3850                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3851         }
3852         else
3853         {
3854                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3855         }
3856
3857         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
3858         if(ret != ACCOUNT_ERROR_NONE)
3859         {
3860                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3861         }
3862         else
3863         {
3864                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3865         }
3866         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
3867         if(ret != ACCOUNT_ERROR_NONE)
3868         {
3869                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3870         }
3871         else
3872         {
3873                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3874         }
3875
3876         ret = account_set_source(account, "URUSA inc.");
3877         if(ret != ACCOUNT_ERROR_NONE)
3878         {
3879                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3880         }
3881         else
3882         {
3883                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3884         }
3885
3886         int i;
3887
3888         for(i=0; i<USER_TXT_CNT; i++)
3889         {
3890                 ret = account_set_user_text(account, i, "user txt");
3891                 if(ret != ACCOUNT_ERROR_NONE)
3892                 {
3893                         ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
3894                 }
3895
3896         }
3897         ret = account_insert_to_db(account, &account_id);
3898
3899         if(ret != ACCOUNT_ERROR_NONE)
3900         {
3901                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3902         }
3903         else
3904         {
3905                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3906         }
3907
3908         ret = account_destroy(account);
3909         if(ret != ACCOUNT_ERROR_NONE)
3910         {
3911                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3912         }
3913         else
3914         {
3915                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3916         }
3917         ret = account_disconnect();
3918         if(ret != ACCOUNT_ERROR_NONE)
3919         {
3920                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3921         }
3922         return account_id;
3923 }
3924
3925 static int utc21_account_insert()
3926 {
3927
3928         int ret = -1;
3929         account_h account = NULL;
3930         int account_id = -1;
3931         ret = account_connect();
3932         if(ret != ACCOUNT_ERROR_NONE)
3933         {
3934                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
3935         }
3936
3937         ret = account_create(&account);
3938
3939         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
3940
3941         ret = account_set_user_name(account, "tarun.kr");
3942         if(ret != ACCOUNT_ERROR_NONE)
3943         {
3944                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
3945         }
3946         else
3947         {
3948                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3949         }
3950
3951         ret = account_set_display_name(account, "tarun kumar");
3952
3953         if(ret != ACCOUNT_ERROR_NONE)
3954         {
3955                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3956         }
3957         else
3958         {
3959                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3960         }
3961
3962         ret = account_set_domain_name(account, "Samsung");
3963         if(ret != ACCOUNT_ERROR_NONE)
3964         {
3965                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3966         }
3967         else
3968         {
3969                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3970         }
3971
3972         ret = account_set_email_address(account, "tarun.kr@samsung.com");
3973         if(ret != ACCOUNT_ERROR_NONE)
3974         {
3975                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3976         }
3977         else
3978         {
3979                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3980         }
3981
3982         ret = account_set_package_name(account, "com.samsung.accounts");
3983         if(ret != ACCOUNT_ERROR_NONE)
3984         {
3985                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3986         }
3987         else
3988         {
3989                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
3990         }
3991
3992         ret = account_set_icon_path(account, "/test/test.jpg");
3993
3994         if(ret != ACCOUNT_ERROR_NONE)
3995         {
3996                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
3997         }
3998         else
3999         {
4000                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4001         }
4002
4003         ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
4004         if(ret != ACCOUNT_ERROR_NONE)
4005         {
4006                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4007         }
4008         else
4009         {
4010                 ACCOUNT_SLOGD("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4011         }
4012
4013         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
4014         if(ret != ACCOUNT_ERROR_NONE)
4015         {
4016                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4017         }
4018         else
4019         {
4020                 ACCOUNT_SLOGD("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4021         }
4022         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
4023         if(ret != ACCOUNT_ERROR_NONE)
4024         {
4025                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4026         }
4027         else
4028         {
4029                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4030         }
4031
4032         ret = account_set_source(account, "URUSA inc.");
4033         if(ret != ACCOUNT_ERROR_NONE)
4034         {
4035                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4036         }
4037         else
4038         {
4039                 ACCOUNT_SLOGD("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4040         }
4041
4042         int i;
4043
4044         for(i=0; i<USER_TXT_CNT; i++)
4045         {
4046                 ret = account_set_user_text(account, i, "user txt");
4047                 if(ret != ACCOUNT_ERROR_NONE)
4048                 {
4049                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4050                 }
4051
4052         }
4053         for(i=0;i<USER_INT_CNT;i++)
4054         {
4055                 ret = account_set_user_int(account, i, 000);
4056                 if(ret != ACCOUNT_ERROR_NONE)
4057                 {
4058                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4059                 }
4060         }
4061         ret = account_insert_to_db(account, &account_id);
4062
4063         if(ret != ACCOUNT_ERROR_NONE)
4064         {
4065                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
4066         }
4067         else
4068         {
4069                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4070         }
4071
4072         ret = account_destroy(account);
4073         if(ret != ACCOUNT_ERROR_NONE)
4074         {
4075                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4076         }
4077         else
4078         {
4079                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4080         }
4081         ret = account_disconnect();
4082         if(ret != ACCOUNT_ERROR_NONE)
4083         {
4084                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4085         }
4086         return account_id;
4087 }
4088
4089 static int utc22_account_insert()
4090 {
4091
4092         int ret = -1;
4093         account_h account = NULL;
4094         int account_id = -1;
4095         ret = account_connect();
4096         if(ret != ACCOUNT_ERROR_NONE)
4097         {
4098                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4099         }
4100
4101         ret = account_create(&account);
4102
4103         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
4104
4105         ret = account_set_user_name(account, "tarun.kr");
4106         if(ret != ACCOUNT_ERROR_NONE)
4107         {
4108                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
4109         }
4110         else
4111         {
4112                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4113         }
4114
4115         ret = account_set_display_name(account, "tarun kumar");
4116
4117         if(ret != ACCOUNT_ERROR_NONE)
4118         {
4119                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4120         }
4121         else
4122         {
4123                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4124         }
4125
4126         ret = account_set_domain_name(account, "Samsung");
4127         if(ret != ACCOUNT_ERROR_NONE)
4128         {
4129                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4130         }
4131         else
4132         {
4133                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4134         }
4135
4136         ret = account_set_email_address(account, "tarun.kr@samsung.com");
4137         if(ret != ACCOUNT_ERROR_NONE)
4138         {
4139                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4140         }
4141         else
4142         {
4143                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4144         }
4145
4146         ret = account_set_package_name(account, "com.samsung.accounts");
4147         if(ret != ACCOUNT_ERROR_NONE)
4148         {
4149                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4150         }
4151         else
4152         {
4153                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4154         }
4155
4156         ret = account_set_icon_path(account, "/test/test.jpg");
4157
4158         if(ret != ACCOUNT_ERROR_NONE)
4159         {
4160                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4161         }
4162         else
4163         {
4164                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4165         }
4166
4167         ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
4168         if(ret != ACCOUNT_ERROR_NONE)
4169         {
4170                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4171         }
4172         else
4173         {
4174                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4175         }
4176
4177         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
4178         if(ret != ACCOUNT_ERROR_NONE)
4179         {
4180                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4181         }
4182         else
4183         {
4184                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4185         }
4186         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
4187         if(ret != ACCOUNT_ERROR_NONE)
4188         {
4189                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4190         }
4191         else
4192         {
4193                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4194         }
4195
4196         ret = account_set_source(account, "URUSA inc.");
4197         if(ret != ACCOUNT_ERROR_NONE)
4198         {
4199                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4200         }
4201         else
4202         {
4203                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4204         }
4205
4206         int i;
4207
4208         for(i=0; i<USER_TXT_CNT; i++)
4209         {
4210                 ret = account_set_user_text(account, i, "user txt");
4211                 if(ret != ACCOUNT_ERROR_NONE)
4212                 {
4213                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4214                 }
4215
4216         }
4217
4218         for(i=0;i<USER_INT_CNT;i++)
4219         {
4220                 ret = account_set_user_int(account, i, 888);
4221                 if(ret != ACCOUNT_ERROR_NONE)
4222                 {
4223                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4224                 }
4225         }
4226         ret = account_insert_to_db(account, &account_id);
4227
4228         if(ret != ACCOUNT_ERROR_NONE)
4229         {
4230                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
4231         }
4232         else
4233         {
4234                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4235         }
4236
4237         ret = account_destroy(account);
4238         if(ret != ACCOUNT_ERROR_NONE)
4239         {
4240                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4241         }
4242         else
4243         {
4244                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4245         }
4246         ret = account_disconnect();
4247         if(ret != ACCOUNT_ERROR_NONE)
4248         {
4249                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4250         }
4251         return account_id;
4252 }
4253
4254 static int utc23_account_insert()
4255 {
4256
4257         int ret = -1;
4258         account_h account = NULL;
4259         int account_id = -1;
4260         ret = account_connect();
4261         if(ret != ACCOUNT_ERROR_NONE)
4262         {
4263                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4264         }
4265
4266         ret = account_create(&account);
4267
4268         ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
4269
4270         ret = account_set_user_name(account, "tarun.kr");
4271         if(ret != ACCOUNT_ERROR_NONE)
4272         {
4273                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
4274         }
4275         else
4276         {
4277                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4278         }
4279
4280         ret = account_set_display_name(account, "tarun kumar");
4281
4282         if(ret != ACCOUNT_ERROR_NONE)
4283         {
4284                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4285         }
4286         else
4287         {
4288                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4289         }
4290
4291         ret = account_set_domain_name(account, "Samsung");
4292         if(ret != ACCOUNT_ERROR_NONE)
4293         {
4294                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4295         }
4296         else
4297         {
4298                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4299         }
4300
4301         ret = account_set_email_address(account, "tarun.kr@samsung.com");
4302         if(ret != ACCOUNT_ERROR_NONE)
4303         {
4304                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4305         }
4306         else
4307         {
4308                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4309         }
4310
4311         ret = account_set_package_name(account, "com.samsung.accounts");
4312         if(ret != ACCOUNT_ERROR_NONE)
4313         {
4314                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4315         }
4316         else
4317         {
4318                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4319         }
4320
4321         ret = account_set_icon_path(account, "/test/test.jpg");
4322
4323         if(ret != ACCOUNT_ERROR_NONE)
4324         {
4325                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4326         }
4327         else
4328         {
4329                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4330         }
4331
4332         ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
4333         if(ret != ACCOUNT_ERROR_NONE)
4334         {
4335                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4336         }
4337         else
4338         {
4339                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4340         }
4341
4342         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
4343         if(ret != ACCOUNT_ERROR_NONE)
4344         {
4345                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4346         }
4347         else
4348         {
4349                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4350         }
4351         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
4352         if(ret != ACCOUNT_ERROR_NONE)
4353         {
4354                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4355         }
4356         else
4357         {
4358                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4359         }
4360
4361         ret = account_set_source(account, "URUSA inc.");
4362         if(ret != ACCOUNT_ERROR_NONE)
4363         {
4364                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4365         }
4366         else
4367         {
4368                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4369         }
4370
4371         int i;
4372
4373         for(i=0; i<USER_TXT_CNT; i++)
4374         {
4375                 ret = account_set_user_text(account, i, "user txt");
4376                 if(ret != ACCOUNT_ERROR_NONE)
4377                 {
4378                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4379                 }
4380
4381         }
4382
4383         for(i=0;i<USER_INT_CNT;i++)
4384         {
4385                 ret = account_set_user_int(account, i, 888);
4386                 if(ret != ACCOUNT_ERROR_NONE)
4387                 {
4388                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
4389                 }
4390         }
4391
4392         ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_ENABLED);
4393         if(ret != ACCOUNT_ERROR_NONE)
4394         {
4395                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4396         }
4397         else
4398         {
4399                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4400         }
4401         ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_POST, ACCOUNT_CAPABILITY_ENABLED);
4402         if(ret != ACCOUNT_ERROR_NONE)
4403         {
4404                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4405         }
4406         else
4407         {
4408                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4409         }
4410
4411         ret = account_insert_to_db(account, &account_id);
4412
4413         if(ret != ACCOUNT_ERROR_NONE)
4414         {
4415                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
4416         }
4417         else
4418         {
4419                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4420         }
4421
4422         ret = account_destroy(account);
4423         if(ret != ACCOUNT_ERROR_NONE)
4424         {
4425                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4426         }
4427         else
4428         {
4429                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4430         }
4431         ret = account_disconnect();
4432         if(ret != ACCOUNT_ERROR_NONE)
4433         {
4434                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4435         }
4436
4437         return account_id;
4438 }
4439
4440 static int utc1_account_update()
4441 {
4442         int ret = - 1;
4443
4444         account_h account = NULL;
4445         ret = account_connect();
4446         if(ret != ACCOUNT_ERROR_NONE)
4447         {
4448                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4449         }
4450
4451         ret = account_create(&account);
4452
4453         if(ret != ACCOUNT_ERROR_NONE)
4454         {
4455                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4456         }
4457         else
4458         {
4459                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4460         }
4461
4462         ret = account_update_to_db_by_id(account, 0);
4463
4464         if(ret != ACCOUNT_ERROR_NONE)
4465         {
4466                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4467         }
4468         else
4469         {
4470                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4471         }
4472         ret = account_destroy(account);
4473         if(ret != ACCOUNT_ERROR_NONE)
4474         {
4475                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4476         }
4477         else
4478         {
4479                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4480         }
4481         ret = account_disconnect();
4482         if(ret != ACCOUNT_ERROR_NONE)
4483         {
4484                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4485         }
4486
4487         return 1;
4488 }
4489
4490 static int utc2_account_update()
4491 {
4492         int ret = - 1;
4493
4494         account_h account = NULL;
4495         ret = account_connect();
4496         if(ret != ACCOUNT_ERROR_NONE)
4497         {
4498                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4499         }
4500
4501         ret = account_create(&account);
4502
4503         if(ret != ACCOUNT_ERROR_NONE)
4504         {
4505                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4506         }
4507         else
4508         {
4509                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4510         }
4511
4512         ret = account_update_to_db_by_id(account, -999);
4513
4514         if(ret != ACCOUNT_ERROR_NONE)
4515         {
4516                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4517         }
4518         else
4519         {
4520                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4521         }
4522
4523         ret = account_destroy(account);
4524         if(ret != ACCOUNT_ERROR_NONE)
4525         {
4526                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4527         }
4528         else
4529         {
4530                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4531         }
4532         ret = account_disconnect();
4533         if(ret != ACCOUNT_ERROR_NONE)
4534         {
4535                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4536         }
4537
4538         return 1;
4539 }
4540
4541 static int utc3_account_update()
4542 {
4543         int ret = - 1;
4544
4545         account_h account = NULL;
4546         ret = account_connect();
4547         if(ret != ACCOUNT_ERROR_NONE)
4548         {
4549                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4550         }
4551
4552         ret = account_create(&account);
4553
4554         if(ret != ACCOUNT_ERROR_NONE)
4555         {
4556                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4557         }
4558         else
4559         {
4560                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4561         }
4562
4563         ret = account_update_to_db_by_id(account, 555);
4564
4565         if(ret != ACCOUNT_ERROR_NONE)
4566         {
4567                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4568         }
4569         else
4570         {
4571                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4572         }
4573
4574         ret = account_destroy(account);
4575         if(ret != ACCOUNT_ERROR_NONE)
4576         {
4577                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4578         }
4579         else
4580         {
4581                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4582         }
4583         ret = account_disconnect();
4584         if(ret != ACCOUNT_ERROR_NONE)
4585         {
4586                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4587         }
4588
4589         return 1;
4590 }
4591
4592 static int utc4_account_update()
4593 {
4594         int ret = - 1;
4595
4596         account_h account = NULL;
4597         ret = account_connect();
4598         if(ret != ACCOUNT_ERROR_NONE)
4599         {
4600                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4601         }
4602
4603         ret = account_create(&account);
4604
4605         if(ret != ACCOUNT_ERROR_NONE)
4606         {
4607                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4608         }
4609         else
4610         {
4611                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4612         }
4613
4614         account_set_user_name(account, NULL);
4615
4616         if(ret != ACCOUNT_ERROR_NONE)
4617         {
4618                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4619         }
4620         else
4621         {
4622                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4623         }
4624
4625         ret = account_update_to_db_by_id(account, account_id);
4626
4627         if(ret != ACCOUNT_ERROR_NONE)
4628         {
4629                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4630         }
4631         else
4632         {
4633                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4634         }
4635
4636         ret = account_destroy(account);
4637         if(ret != ACCOUNT_ERROR_NONE)
4638         {
4639                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4640         }
4641         else
4642         {
4643                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4644         }
4645         ret = account_disconnect();
4646         if(ret != ACCOUNT_ERROR_NONE)
4647         {
4648                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4649         }
4650
4651         return 1;
4652 }
4653
4654 static int utc5_account_update()
4655 {
4656         int ret = - 1;
4657
4658         account_h account = NULL;
4659         ret = account_connect();
4660         if(ret != ACCOUNT_ERROR_NONE)
4661         {
4662                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4663         }
4664
4665         ret = account_create(&account);
4666
4667         if(ret != ACCOUNT_ERROR_NONE)
4668         {
4669                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4670         }
4671         else
4672         {
4673                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4674         }
4675
4676         account_set_user_name(account, "updated-tarun.kr");
4677
4678         if(ret != ACCOUNT_ERROR_NONE)
4679         {
4680                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4681         }
4682         else
4683         {
4684                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4685         }
4686
4687         ret = account_update_to_db_by_id(account, account_id);
4688
4689         if(ret != ACCOUNT_ERROR_NONE)
4690         {
4691                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4692         }
4693         else
4694         {
4695                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4696         }
4697
4698         ret = account_destroy(account);
4699         if(ret != ACCOUNT_ERROR_NONE)
4700         {
4701                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4702         }
4703         else
4704         {
4705                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4706         }
4707         ret = account_disconnect();
4708         if(ret != ACCOUNT_ERROR_NONE)
4709         {
4710                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4711         }
4712
4713         return 1;
4714 }
4715
4716 static int utc6_account_update()
4717 {
4718         int ret = - 1;
4719
4720         account_h account = NULL;
4721         ret = account_connect();
4722         if(ret != ACCOUNT_ERROR_NONE)
4723         {
4724                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4725         }
4726
4727         ret = account_create(&account);
4728
4729         if(ret != ACCOUNT_ERROR_NONE)
4730         {
4731                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4732         }
4733         else
4734         {
4735                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4736         }
4737
4738         account_set_user_name(account, "updated-tarun.kr");
4739
4740         if(ret != ACCOUNT_ERROR_NONE)
4741         {
4742                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4743         }
4744         else
4745         {
4746                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4747         }
4748         ret = account_set_display_name(account, NULL);
4749         if(ret != ACCOUNT_ERROR_NONE)
4750         {
4751                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4752         }
4753         else
4754         {
4755                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4756         }
4757
4758         ret = account_update_to_db_by_id(account, account_id);
4759
4760         if(ret != ACCOUNT_ERROR_NONE)
4761         {
4762                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4763         }
4764         else
4765         {
4766                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4767         }
4768
4769         ret = account_destroy(account);
4770         if(ret != ACCOUNT_ERROR_NONE)
4771         {
4772                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4773         }
4774         else
4775         {
4776                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4777         }
4778         ret = account_disconnect();
4779         if(ret != ACCOUNT_ERROR_NONE)
4780         {
4781                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4782         }
4783
4784         return 1;
4785 }
4786
4787 static int utc7_account_update()
4788 {
4789         int ret = - 1;
4790
4791         account_h account = NULL;
4792         ret = account_connect();
4793         if(ret != ACCOUNT_ERROR_NONE)
4794         {
4795                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4796         }
4797
4798         ret = account_create(&account);
4799
4800         if(ret != ACCOUNT_ERROR_NONE)
4801         {
4802                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4803         }
4804         else
4805         {
4806                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4807         }
4808
4809         account_set_user_name(account, "updated-tarun.kr");
4810
4811         if(ret != ACCOUNT_ERROR_NONE)
4812         {
4813                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4814         }
4815         else
4816         {
4817                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4818         }
4819         ret = account_set_display_name(account, "updated-tarun kumar");
4820         if(ret != ACCOUNT_ERROR_NONE)
4821         {
4822                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4823         }
4824         else
4825         {
4826                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4827         }
4828
4829
4830         ret = account_update_to_db_by_id(account, account_id);
4831
4832         if(ret != ACCOUNT_ERROR_NONE)
4833         {
4834                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4835         }
4836         else
4837         {
4838                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4839         }
4840
4841         ret = account_destroy(account);
4842         if(ret != ACCOUNT_ERROR_NONE)
4843         {
4844                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4845         }
4846         else
4847         {
4848                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4849         }
4850         ret = account_disconnect();
4851         if(ret != ACCOUNT_ERROR_NONE)
4852         {
4853                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4854         }
4855
4856         return 1;
4857 }
4858
4859 static int utc8_account_update()
4860 {
4861         int ret = - 1;
4862
4863         account_h account = NULL;
4864         ret = account_connect();
4865         if(ret != ACCOUNT_ERROR_NONE)
4866         {
4867                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4868         }
4869
4870         ret = account_create(&account);
4871
4872         if(ret != ACCOUNT_ERROR_NONE)
4873         {
4874                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4875         }
4876         else
4877         {
4878                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4879         }
4880
4881         account_set_user_name(account, "updated-tarun.kr");
4882
4883         if(ret != ACCOUNT_ERROR_NONE)
4884         {
4885                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4886         }
4887         else
4888         {
4889                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4890         }
4891         ret = account_set_display_name(account, "updated-tarun kumar");
4892         if(ret != ACCOUNT_ERROR_NONE)
4893         {
4894                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4895         }
4896         else
4897         {
4898                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4899         }
4900         ret = account_set_domain_name(account, NULL);
4901         if(ret != ACCOUNT_ERROR_NONE)
4902         {
4903                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4904         }
4905         else
4906         {
4907                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4908         }
4909         ret = account_set_domain_name(account, NULL);
4910         if(ret != ACCOUNT_ERROR_NONE)
4911         {
4912                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4913         }
4914         else
4915         {
4916                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4917         }
4918
4919         ret = account_update_to_db_by_id(account, account_id);
4920
4921         if(ret != ACCOUNT_ERROR_NONE)
4922         {
4923                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4924         }
4925         else
4926         {
4927                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4928         }
4929
4930         ret = account_destroy(account);
4931         if(ret != ACCOUNT_ERROR_NONE)
4932         {
4933                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4934         }
4935         else
4936         {
4937                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4938         }
4939         ret = account_disconnect();
4940         if(ret != ACCOUNT_ERROR_NONE)
4941         {
4942                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4943         }
4944
4945         return 1;
4946 }
4947 static int utc9_account_update()
4948 {
4949         int ret = - 1;
4950
4951         account_h account = NULL;
4952         ret = account_connect();
4953         if(ret != ACCOUNT_ERROR_NONE)
4954         {
4955                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
4956         }
4957
4958         ret = account_create(&account);
4959
4960         if(ret != ACCOUNT_ERROR_NONE)
4961         {
4962                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4963         }
4964         else
4965         {
4966                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4967         }
4968
4969         account_set_user_name(account, "updated-tarun.kr");
4970
4971         if(ret != ACCOUNT_ERROR_NONE)
4972         {
4973                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4974         }
4975         else
4976         {
4977                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4978         }
4979         ret = account_set_display_name(account, "updated-tarun kumar");
4980         if(ret != ACCOUNT_ERROR_NONE)
4981         {
4982                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4983         }
4984         else
4985         {
4986                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4987         }
4988         ret = account_set_domain_name(account, "updated-Samsung Facebook");
4989         if(ret != ACCOUNT_ERROR_NONE)
4990         {
4991                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
4992         }
4993         else
4994         {
4995                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
4996         }
4997
4998         ret = account_update_to_db_by_id(account, account_id);
4999
5000         if(ret != ACCOUNT_ERROR_NONE)
5001         {
5002                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5003         }
5004         else
5005         {
5006                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5007         }
5008
5009         ret = account_destroy(account);
5010         if(ret != ACCOUNT_ERROR_NONE)
5011         {
5012                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5013         }
5014         else
5015         {
5016                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5017         }
5018         ret = account_disconnect();
5019         if(ret != ACCOUNT_ERROR_NONE)
5020         {
5021                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5022         }
5023
5024         return 1;
5025 }
5026
5027 static int utc10_account_update()
5028 {
5029         int ret = - 1;
5030
5031         account_h account = NULL;
5032         ret = account_connect();
5033         if(ret != ACCOUNT_ERROR_NONE)
5034         {
5035                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5036         }
5037
5038         ret = account_create(&account);
5039
5040         if(ret != ACCOUNT_ERROR_NONE)
5041         {
5042                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5043         }
5044         else
5045         {
5046                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5047         }
5048
5049         account_set_user_name(account, "updated-tarun.kr");
5050
5051         if(ret != ACCOUNT_ERROR_NONE)
5052         {
5053                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5054         }
5055         else
5056         {
5057                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5058         }
5059         ret = account_set_display_name(account, "updated-tarun kumar");
5060         if(ret != ACCOUNT_ERROR_NONE)
5061         {
5062                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5063         }
5064         else
5065         {
5066                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5067         }
5068         ret = account_set_domain_name(account, "updated-Samsung Facebook");
5069         if(ret != ACCOUNT_ERROR_NONE)
5070         {
5071                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5072         }
5073         else
5074         {
5075                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5076         }
5077         ret = account_set_email_address(account, NULL);
5078         if(ret != ACCOUNT_ERROR_NONE)
5079         {
5080                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5081         }
5082         else
5083         {
5084                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5085         }
5086
5087         ret = account_update_to_db_by_id(account, account_id);
5088
5089         if(ret != ACCOUNT_ERROR_NONE)
5090         {
5091                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5092         }
5093         else
5094         {
5095                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5096         }
5097
5098         ret = account_destroy(account);
5099         if(ret != ACCOUNT_ERROR_NONE)
5100         {
5101                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5102         }
5103         else
5104         {
5105                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5106         }
5107         ret = account_disconnect();
5108         if(ret != ACCOUNT_ERROR_NONE)
5109         {
5110                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5111         }
5112
5113         return 1;
5114 }
5115
5116 static int utc11_account_update()
5117 {
5118         int ret = - 1;
5119
5120         account_h account = NULL;
5121         ret = account_connect();
5122         if(ret != ACCOUNT_ERROR_NONE)
5123         {
5124                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5125         }
5126
5127         ret = account_create(&account);
5128
5129         if(ret != ACCOUNT_ERROR_NONE)
5130         {
5131                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5132         }
5133         else
5134         {
5135                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5136         }
5137
5138         account_set_user_name(account, "updated-tarun.kr");
5139
5140         if(ret != ACCOUNT_ERROR_NONE)
5141         {
5142                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5143         }
5144         else
5145         {
5146                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5147         }
5148         ret = account_set_display_name(account, "updated-tarun kumar");
5149         if(ret != ACCOUNT_ERROR_NONE)
5150         {
5151                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5152         }
5153         else
5154         {
5155                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5156         }
5157         ret = account_set_domain_name(account, "updated-Samsung Facebook");
5158         if(ret != ACCOUNT_ERROR_NONE)
5159         {
5160                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5161         }
5162         else
5163         {
5164                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5165         }
5166         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5167         if(ret != ACCOUNT_ERROR_NONE)
5168         {
5169                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5170         }
5171         else
5172         {
5173                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5174         }
5175
5176         ret = account_update_to_db_by_id(account, account_id);
5177
5178         if(ret != ACCOUNT_ERROR_NONE)
5179         {
5180                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5181         }
5182         else
5183         {
5184                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5185         }
5186
5187         ret = account_destroy(account);
5188         if(ret != ACCOUNT_ERROR_NONE)
5189         {
5190                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5191         }
5192         else
5193         {
5194                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5195         }
5196         ret = account_disconnect();
5197         if(ret != ACCOUNT_ERROR_NONE)
5198         {
5199                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5200         }
5201
5202         return 1;
5203 }
5204
5205 static int utc12_account_update()
5206 {
5207         int ret = - 1;
5208
5209         account_h account = NULL;
5210         ret = account_connect();
5211         if(ret != ACCOUNT_ERROR_NONE)
5212         {
5213                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5214         }
5215
5216         ret = account_create(&account);
5217
5218         if(ret != ACCOUNT_ERROR_NONE)
5219         {
5220                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5221         }
5222         else
5223         {
5224                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5225         }
5226
5227         account_set_user_name(account, "updated-tarun.kr");
5228
5229         if(ret != ACCOUNT_ERROR_NONE)
5230         {
5231                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5232         }
5233         else
5234         {
5235                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5236         }
5237         ret = account_set_display_name(account, "updated-tarun kumar");
5238         if(ret != ACCOUNT_ERROR_NONE)
5239         {
5240                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5241         }
5242         else
5243         {
5244                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5245         }
5246         ret = account_set_domain_name(account, "updated-Samsung Facebook");
5247         if(ret != ACCOUNT_ERROR_NONE)
5248         {
5249                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5250         }
5251         else
5252         {
5253                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5254         }
5255         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5256         if(ret != ACCOUNT_ERROR_NONE)
5257         {
5258                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5259         }
5260         else
5261         {
5262                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5263         }
5264         ret = account_set_package_name(account, NULL);
5265         if(ret != ACCOUNT_ERROR_NONE)
5266         {
5267                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5268         }
5269         else
5270         {
5271                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5272         }
5273
5274         ret = account_update_to_db_by_id(account, account_id);
5275
5276         if(ret != ACCOUNT_ERROR_NONE)
5277         {
5278                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5279         }
5280         else
5281         {
5282                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5283         }
5284
5285         ret = account_destroy(account);
5286         if(ret != ACCOUNT_ERROR_NONE)
5287         {
5288                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5289         }
5290         else
5291         {
5292                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5293         }
5294         ret = account_disconnect();
5295         if(ret != ACCOUNT_ERROR_NONE)
5296         {
5297                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5298         }
5299
5300         return 1;
5301 }
5302
5303 static int utc13_account_update()
5304 {
5305         int ret = - 1;
5306
5307         account_h account = NULL;
5308         ret = account_connect();
5309         if(ret != ACCOUNT_ERROR_NONE)
5310         {
5311                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5312         }
5313
5314         ret = account_create(&account);
5315
5316         if(ret != ACCOUNT_ERROR_NONE)
5317         {
5318                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5319         }
5320         else
5321         {
5322                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5323         }
5324
5325         account_set_user_name(account, "updated-tarun.kr");
5326
5327         if(ret != ACCOUNT_ERROR_NONE)
5328         {
5329                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5330         }
5331         else
5332         {
5333                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5334         }
5335         ret = account_set_display_name(account, "updated-tarun kumar");
5336         if(ret != ACCOUNT_ERROR_NONE)
5337         {
5338                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5339         }
5340         else
5341         {
5342                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5343         }
5344         ret = account_set_domain_name(account, "updated-Samsung Facebook");
5345         if(ret != ACCOUNT_ERROR_NONE)
5346         {
5347                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5348         }
5349         else
5350         {
5351                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5352         }
5353         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5354         if(ret != ACCOUNT_ERROR_NONE)
5355         {
5356                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5357         }
5358         else
5359         {
5360                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5361         }
5362         ret = account_set_package_name(account, "updated-com.samsung.account");
5363         if(ret != ACCOUNT_ERROR_NONE)
5364         {
5365                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5366         }
5367         else
5368         {
5369                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5370         }
5371
5372         ret = account_update_to_db_by_id(account, account_id);
5373
5374         if(ret != ACCOUNT_ERROR_NONE)
5375         {
5376                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5377         }
5378         else
5379         {
5380                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5381         }
5382
5383         ret = account_destroy(account);
5384         if(ret != ACCOUNT_ERROR_NONE)
5385         {
5386                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5387         }
5388         else
5389         {
5390                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5391         }
5392         ret = account_disconnect();
5393         if(ret != ACCOUNT_ERROR_NONE)
5394         {
5395                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5396         }
5397
5398         return 1;
5399 }
5400
5401 static int utc14_account_update()
5402 {
5403         int ret = - 1;
5404
5405         account_h account = NULL;
5406         ret = account_connect();
5407         if(ret != ACCOUNT_ERROR_NONE)
5408         {
5409                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5410         }
5411
5412         ret = account_create(&account);
5413
5414         if(ret != ACCOUNT_ERROR_NONE)
5415         {
5416                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5417         }
5418         else
5419         {
5420                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5421         }
5422
5423         account_set_user_name(account, "updated-tarun.kr");
5424
5425         if(ret != ACCOUNT_ERROR_NONE)
5426         {
5427                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5428         }
5429         else
5430         {
5431                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5432         }
5433         ret = account_set_display_name(account, "updated-tarun kumar");
5434         if(ret != ACCOUNT_ERROR_NONE)
5435         {
5436                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5437         }
5438         else
5439         {
5440                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5441         }
5442         ret = account_set_domain_name(account, "updated-Samsung Facebook");
5443         if(ret != ACCOUNT_ERROR_NONE)
5444         {
5445                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5446         }
5447         else
5448         {
5449                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5450         }
5451         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5452         if(ret != ACCOUNT_ERROR_NONE)
5453         {
5454                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5455         }
5456         else
5457         {
5458                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5459         }
5460         ret = account_set_package_name(account, "updated-com.samsung.account");
5461         if(ret != ACCOUNT_ERROR_NONE)
5462         {
5463                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5464         }
5465         else
5466         {
5467                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5468         }
5469         ret = account_set_icon_path(account, NULL);
5470         if(ret != ACCOUNT_ERROR_NONE)
5471         {
5472                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5473         }
5474         else
5475         {
5476                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5477         }
5478
5479         ret = account_update_to_db_by_id(account, account_id);
5480
5481         if(ret != ACCOUNT_ERROR_NONE)
5482         {
5483                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5484         }
5485         else
5486         {
5487                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5488         }
5489
5490         ret = account_destroy(account);
5491         if(ret != ACCOUNT_ERROR_NONE)
5492         {
5493                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5494         }
5495         else
5496         {
5497                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5498         }
5499         ret = account_disconnect();
5500         if(ret != ACCOUNT_ERROR_NONE)
5501         {
5502                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5503         }
5504
5505         return 1;
5506 }
5507
5508 static int utc15_account_update()
5509 {
5510         int ret = - 1;
5511
5512         account_h account = NULL;
5513         ret = account_connect();
5514         if(ret != ACCOUNT_ERROR_NONE)
5515         {
5516                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5517         }
5518
5519         ret = account_create(&account);
5520
5521         if(ret != ACCOUNT_ERROR_NONE)
5522         {
5523                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5524         }
5525         else
5526         {
5527                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5528         }
5529
5530         account_set_user_name(account, "updated-tarun.kr");
5531
5532         if(ret != ACCOUNT_ERROR_NONE)
5533         {
5534                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5535         }
5536         else
5537         {
5538                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5539         }
5540         ret = account_set_display_name(account, "updated-tarun kumar");
5541         if(ret != ACCOUNT_ERROR_NONE)
5542         {
5543                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5544         }
5545         else
5546         {
5547                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5548         }
5549         ret = account_set_domain_name(account, "updated-Samsung Facebook");
5550         if(ret != ACCOUNT_ERROR_NONE)
5551         {
5552                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5553         }
5554         else
5555         {
5556                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5557         }
5558         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5559         if(ret != ACCOUNT_ERROR_NONE)
5560         {
5561                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5562         }
5563         else
5564         {
5565                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5566         }
5567         ret = account_set_package_name(account, "updated-com.samsung.account");
5568         if(ret != ACCOUNT_ERROR_NONE)
5569         {
5570                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5571         }
5572         else
5573         {
5574                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5575         }
5576         ret = account_set_icon_path(account, "updated-icon-path");
5577         if(ret != ACCOUNT_ERROR_NONE)
5578         {
5579                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5580         }
5581         else
5582         {
5583                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5584         }
5585
5586         ret = account_update_to_db_by_id(account, account_id);
5587
5588         if(ret != ACCOUNT_ERROR_NONE)
5589         {
5590                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5591         }
5592         else
5593         {
5594                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5595         }
5596
5597         ret = account_destroy(account);
5598         if(ret != ACCOUNT_ERROR_NONE)
5599         {
5600                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5601         }
5602         else
5603         {
5604                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5605         }
5606         ret = account_disconnect();
5607         if(ret != ACCOUNT_ERROR_NONE)
5608         {
5609                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5610         }
5611
5612         return 1;
5613 }
5614
5615 static int utc16_account_update()
5616 {
5617         int ret = - 1;
5618
5619         account_h account = NULL;
5620         ret = account_connect();
5621         if(ret != ACCOUNT_ERROR_NONE)
5622         {
5623                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5624         }
5625
5626         ret = account_create(&account);
5627
5628         if(ret != ACCOUNT_ERROR_NONE)
5629         {
5630                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5631         }
5632         else
5633         {
5634                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5635         }
5636
5637         account_set_user_name(account, "updated-tarun.kr");
5638
5639         if(ret != ACCOUNT_ERROR_NONE)
5640         {
5641                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5642         }
5643         else
5644         {
5645                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5646         }
5647         ret = account_set_display_name(account, "updated-tarun kumar");
5648         if(ret != ACCOUNT_ERROR_NONE)
5649         {
5650                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5651         }
5652         else
5653         {
5654                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5655         }
5656         ret = account_set_domain_name(account, "updated-Samsung Facebook");
5657         if(ret != ACCOUNT_ERROR_NONE)
5658         {
5659                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5660         }
5661         else
5662         {
5663                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5664         }
5665         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5666         if(ret != ACCOUNT_ERROR_NONE)
5667         {
5668                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5669         }
5670         else
5671         {
5672                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5673         }
5674         ret = account_set_package_name(account, "updated-com.samsung.account");
5675         if(ret != ACCOUNT_ERROR_NONE)
5676         {
5677                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5678         }
5679         else
5680         {
5681                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5682         }
5683         ret = account_set_icon_path(account, "updated-icon-path");
5684         if(ret != ACCOUNT_ERROR_NONE)
5685         {
5686                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5687         }
5688         else
5689         {
5690                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5691         }
5692         ret = account_set_access_token(account, NULL);
5693         if(ret != ACCOUNT_ERROR_NONE)
5694         {
5695                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5696         }
5697         else
5698         {
5699                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5700         }
5701
5702         ret = account_update_to_db_by_id(account, account_id);
5703
5704         if(ret != ACCOUNT_ERROR_NONE)
5705         {
5706                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5707         }
5708         else
5709         {
5710                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5711         }
5712
5713         ret = account_destroy(account);
5714         if(ret != ACCOUNT_ERROR_NONE)
5715         {
5716                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5717         }
5718         else
5719         {
5720                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5721         }
5722         ret = account_disconnect();
5723         if(ret != ACCOUNT_ERROR_NONE)
5724         {
5725                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5726         }
5727
5728         return 1;
5729 }
5730
5731 static int utc17_account_update()
5732 {
5733         int ret = - 1;
5734
5735         account_h account = NULL;
5736         ret = account_connect();
5737         if(ret != ACCOUNT_ERROR_NONE)
5738         {
5739                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5740         }
5741
5742         ret = account_create(&account);
5743
5744         if(ret != ACCOUNT_ERROR_NONE)
5745         {
5746                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5747         }
5748         else
5749         {
5750                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5751         }
5752
5753         account_set_user_name(account, "updated-tarun.kr");
5754
5755         if(ret != ACCOUNT_ERROR_NONE)
5756         {
5757                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5758         }
5759         else
5760         {
5761                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5762         }
5763         ret = account_set_display_name(account, "updated-tarun kumar");
5764         if(ret != ACCOUNT_ERROR_NONE)
5765         {
5766                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5767         }
5768         else
5769         {
5770                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5771         }
5772         ret = account_set_domain_name(account, "updated-Samsung Facebook");
5773         if(ret != ACCOUNT_ERROR_NONE)
5774         {
5775                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5776         }
5777         else
5778         {
5779                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5780         }
5781         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5782         if(ret != ACCOUNT_ERROR_NONE)
5783         {
5784                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5785         }
5786         else
5787         {
5788                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5789         }
5790         ret = account_set_package_name(account, "updated-com.samsung.account");
5791         if(ret != ACCOUNT_ERROR_NONE)
5792         {
5793                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5794         }
5795         else
5796         {
5797                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5798         }
5799         ret = account_set_icon_path(account, "updated-icon-path");
5800         if(ret != ACCOUNT_ERROR_NONE)
5801         {
5802                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5803         }
5804         else
5805         {
5806                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5807         }
5808         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
5809         if(ret != ACCOUNT_ERROR_NONE)
5810         {
5811                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5812         }
5813         else
5814         {
5815                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5816         }
5817
5818         ret = account_update_to_db_by_id(account, account_id);
5819
5820         if(ret != ACCOUNT_ERROR_NONE)
5821         {
5822                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5823         }
5824         else
5825         {
5826                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5827         }
5828
5829         ret = account_destroy(account);
5830         if(ret != ACCOUNT_ERROR_NONE)
5831         {
5832                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5833         }
5834         else
5835         {
5836                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5837         }
5838         ret = account_disconnect();
5839         if(ret != ACCOUNT_ERROR_NONE)
5840         {
5841                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5842         }
5843
5844         return 1;
5845 }
5846
5847 static int utc18_account_update()
5848 {
5849         int ret = - 1;
5850
5851         account_h account = NULL;
5852         ret = account_connect();
5853         if(ret != ACCOUNT_ERROR_NONE)
5854         {
5855                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5856         }
5857
5858         ret = account_create(&account);
5859
5860         if(ret != ACCOUNT_ERROR_NONE)
5861         {
5862                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5863         }
5864         else
5865         {
5866                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5867         }
5868
5869         account_set_user_name(account, "updated-tarun.kr");
5870
5871         if(ret != ACCOUNT_ERROR_NONE)
5872         {
5873                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5874         }
5875         else
5876         {
5877                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5878         }
5879         ret = account_set_display_name(account, "updated-tarun kumar");
5880         if(ret != ACCOUNT_ERROR_NONE)
5881         {
5882                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5883         }
5884         else
5885         {
5886                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5887         }
5888         ret = account_set_domain_name(account, "updated-Samsung Facebook");
5889         if(ret != ACCOUNT_ERROR_NONE)
5890         {
5891                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5892         }
5893         else
5894         {
5895                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5896         }
5897         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
5898         if(ret != ACCOUNT_ERROR_NONE)
5899         {
5900                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5901         }
5902         else
5903         {
5904                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5905         }
5906         ret = account_set_package_name(account, "updated-com.samsung.account");
5907         if(ret != ACCOUNT_ERROR_NONE)
5908         {
5909                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5910         }
5911         else
5912         {
5913                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5914         }
5915         ret = account_set_icon_path(account, "updated-icon-path");
5916         if(ret != ACCOUNT_ERROR_NONE)
5917         {
5918                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5919         }
5920         else
5921         {
5922                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5923         }
5924         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
5925         if(ret != ACCOUNT_ERROR_NONE)
5926         {
5927                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5928         }
5929         else
5930         {
5931                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5932         }
5933         ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
5934         if(ret != ACCOUNT_ERROR_NONE)
5935         {
5936                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5937         }
5938         else
5939         {
5940                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5941         }
5942         ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
5943         if(ret != ACCOUNT_ERROR_NONE)
5944         {
5945                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5946         }
5947         else
5948         {
5949                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5950         }
5951
5952         ret = account_update_to_db_by_id(account, account_id);
5953
5954         if(ret != ACCOUNT_ERROR_NONE)
5955         {
5956                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5957         }
5958         else
5959         {
5960                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5961         }
5962
5963         ret = account_destroy(account);
5964         if(ret != ACCOUNT_ERROR_NONE)
5965         {
5966                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5967         }
5968         else
5969         {
5970                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
5971         }
5972         ret = account_disconnect();
5973         if(ret != ACCOUNT_ERROR_NONE)
5974         {
5975                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5976         }
5977
5978         return 1;
5979 }
5980
5981 static int utc19_account_update()
5982 {
5983         int ret = - 1;
5984
5985         account_h account = NULL;
5986         ret = account_connect();
5987         if(ret != ACCOUNT_ERROR_NONE)
5988         {
5989                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
5990         }
5991
5992         ret = account_create(&account);
5993
5994         if(ret != ACCOUNT_ERROR_NONE)
5995         {
5996                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
5997         }
5998         else
5999         {
6000                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6001         }
6002
6003         account_set_user_name(account, "updated-tarun.kr");
6004
6005         if(ret != ACCOUNT_ERROR_NONE)
6006         {
6007                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6008         }
6009         else
6010         {
6011                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6012         }
6013         ret = account_set_display_name(account, "updated-tarun kumar");
6014         if(ret != ACCOUNT_ERROR_NONE)
6015         {
6016                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6017         }
6018         else
6019         {
6020                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6021         }
6022         ret = account_set_domain_name(account, "updated-Samsung Facebook");
6023         if(ret != ACCOUNT_ERROR_NONE)
6024         {
6025                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6026         }
6027         else
6028         {
6029                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6030         }
6031         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6032         if(ret != ACCOUNT_ERROR_NONE)
6033         {
6034                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6035         }
6036         else
6037         {
6038                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6039         }
6040         ret = account_set_package_name(account, "updated-com.samsung.account");
6041         if(ret != ACCOUNT_ERROR_NONE)
6042         {
6043                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6044         }
6045         else
6046         {
6047                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6048         }
6049         ret = account_set_icon_path(account, "updated-icon-path");
6050         if(ret != ACCOUNT_ERROR_NONE)
6051         {
6052                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6053         }
6054         else
6055         {
6056                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6057         }
6058         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6059         if(ret != ACCOUNT_ERROR_NONE)
6060         {
6061                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6062         }
6063         else
6064         {
6065                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6066         }
6067         ret = account_set_source(account, NULL);
6068         if(ret != ACCOUNT_ERROR_NONE)
6069         {
6070                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6071         }
6072         else
6073         {
6074                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6075         }
6076
6077         ret = account_update_to_db_by_id(account, account_id);
6078
6079         if(ret != ACCOUNT_ERROR_NONE)
6080         {
6081                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6082         }
6083         else
6084         {
6085                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6086         }
6087
6088         ret = account_destroy(account);
6089         if(ret != ACCOUNT_ERROR_NONE)
6090         {
6091                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6092         }
6093         else
6094         {
6095                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6096         }
6097         ret = account_disconnect();
6098         if(ret != ACCOUNT_ERROR_NONE)
6099         {
6100                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6101         }
6102
6103         return 1;
6104 }
6105
6106 static int utc20_account_update()
6107 {
6108         int ret = - 1;
6109
6110         account_h account = NULL;
6111         ret = account_connect();
6112         if(ret != ACCOUNT_ERROR_NONE)
6113         {
6114                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6115         }
6116
6117         ret = account_create(&account);
6118
6119         if(ret != ACCOUNT_ERROR_NONE)
6120         {
6121                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6122         }
6123         else
6124         {
6125                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6126         }
6127
6128         account_set_user_name(account, "updated-tarun.kr");
6129
6130         if(ret != ACCOUNT_ERROR_NONE)
6131         {
6132                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6133         }
6134         else
6135         {
6136                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6137         }
6138         ret = account_set_display_name(account, "updated-tarun kumar");
6139         if(ret != ACCOUNT_ERROR_NONE)
6140         {
6141                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6142         }
6143         else
6144         {
6145                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6146         }
6147         ret = account_set_domain_name(account, "updated-Samsung Facebook");
6148         if(ret != ACCOUNT_ERROR_NONE)
6149         {
6150                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6151         }
6152         else
6153         {
6154                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6155         }
6156         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6157         if(ret != ACCOUNT_ERROR_NONE)
6158         {
6159                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6160         }
6161         else
6162         {
6163                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6164         }
6165         ret = account_set_package_name(account, "updated-com.samsung.account");
6166         if(ret != ACCOUNT_ERROR_NONE)
6167         {
6168                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6169         }
6170         else
6171         {
6172                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6173         }
6174         ret = account_set_icon_path(account, "updated-icon-path");
6175         if(ret != ACCOUNT_ERROR_NONE)
6176         {
6177                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6178         }
6179         else
6180         {
6181                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6182         }
6183         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6184         if(ret != ACCOUNT_ERROR_NONE)
6185         {
6186                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6187         }
6188         else
6189         {
6190                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6191         }
6192         ret = account_set_source(account, "updated-URUSA inc.");
6193         if(ret != ACCOUNT_ERROR_NONE)
6194         {
6195                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6196         }
6197         else
6198         {
6199                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6200         }
6201
6202         ret = account_update_to_db_by_id(account, account_id);
6203
6204         if(ret != ACCOUNT_ERROR_NONE)
6205         {
6206                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6207         }
6208         else
6209         {
6210                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6211         }
6212
6213         ret = account_destroy(account);
6214         if(ret != ACCOUNT_ERROR_NONE)
6215         {
6216                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6217         }
6218         else
6219         {
6220                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6221         }
6222         ret = account_disconnect();
6223         if(ret != ACCOUNT_ERROR_NONE)
6224         {
6225                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6226         }
6227
6228         return 1;
6229 }
6230
6231 static int utc21_account_update()
6232 {
6233         int ret = - 1;
6234
6235         account_h account = NULL;
6236         ret = account_connect();
6237         if(ret != ACCOUNT_ERROR_NONE)
6238         {
6239                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6240         }
6241
6242         ret = account_create(&account);
6243
6244         if(ret != ACCOUNT_ERROR_NONE)
6245         {
6246                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6247         }
6248         else
6249         {
6250                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6251         }
6252
6253         account_set_user_name(account, "updated-tarun.kr");
6254
6255         if(ret != ACCOUNT_ERROR_NONE)
6256         {
6257                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6258         }
6259         else
6260         {
6261                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6262         }
6263         ret = account_set_display_name(account, "updated-tarun kumar");
6264         if(ret != ACCOUNT_ERROR_NONE)
6265         {
6266                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6267         }
6268         else
6269         {
6270                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6271         }
6272         ret = account_set_domain_name(account, "updated-Samsung Facebook");
6273         if(ret != ACCOUNT_ERROR_NONE)
6274         {
6275                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6276         }
6277         else
6278         {
6279                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6280         }
6281         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6282         if(ret != ACCOUNT_ERROR_NONE)
6283         {
6284                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6285         }
6286         else
6287         {
6288                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6289         }
6290         ret = account_set_package_name(account, "updated-com.samsung.account");
6291         if(ret != ACCOUNT_ERROR_NONE)
6292         {
6293                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6294         }
6295         else
6296         {
6297                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6298         }
6299         ret = account_set_icon_path(account, "updated-icon-path");
6300         if(ret != ACCOUNT_ERROR_NONE)
6301         {
6302                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6303         }
6304         else
6305         {
6306                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6307         }
6308         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6309         if(ret != ACCOUNT_ERROR_NONE)
6310         {
6311                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6312         }
6313         else
6314         {
6315                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6316         }
6317         ret = account_set_source(account, "updated-URUSA inc.");
6318         if(ret != ACCOUNT_ERROR_NONE)
6319         {
6320                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6321         }
6322         else
6323         {
6324                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6325         }
6326         int i;
6327
6328         for(i=0;i<USER_TXT_CNT;i++)
6329         {
6330                 ret = account_set_user_text(account, i, NULL);
6331                 if(ret != ACCOUNT_ERROR_NONE)
6332                 {
6333                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6334                 }
6335
6336         }
6337
6338         ret = account_update_to_db_by_id(account, account_id);
6339
6340         if(ret != ACCOUNT_ERROR_NONE)
6341         {
6342                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6343         }
6344         else
6345         {
6346                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6347         }
6348
6349         ret = account_destroy(account);
6350         if(ret != ACCOUNT_ERROR_NONE)
6351         {
6352                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6353         }
6354         else
6355         {
6356                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6357         }
6358         ret = account_disconnect();
6359         if(ret != ACCOUNT_ERROR_NONE)
6360         {
6361                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6362         }
6363
6364         return 1;
6365 }
6366
6367 static int utc22_account_update()
6368 {
6369         int ret = - 1;
6370
6371         account_h account = NULL;
6372         ret = account_connect();
6373         if(ret != ACCOUNT_ERROR_NONE)
6374         {
6375                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6376         }
6377
6378         ret = account_create(&account);
6379
6380         if(ret != ACCOUNT_ERROR_NONE)
6381         {
6382                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6383         }
6384         else
6385         {
6386                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6387         }
6388
6389         account_set_user_name(account, "updated-tarun.kr");
6390
6391         if(ret != ACCOUNT_ERROR_NONE)
6392         {
6393                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6394         }
6395         else
6396         {
6397                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6398         }
6399         ret = account_set_display_name(account, "updated-tarun kumar");
6400         if(ret != ACCOUNT_ERROR_NONE)
6401         {
6402                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6403         }
6404         else
6405         {
6406                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6407         }
6408         ret = account_set_domain_name(account, "updated-Samsung Facebook");
6409         if(ret != ACCOUNT_ERROR_NONE)
6410         {
6411                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6412         }
6413         else
6414         {
6415                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6416         }
6417         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6418         if(ret != ACCOUNT_ERROR_NONE)
6419         {
6420                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6421         }
6422         else
6423         {
6424                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6425         }
6426         ret = account_set_package_name(account, "updated-com.samsung.account");
6427         if(ret != ACCOUNT_ERROR_NONE)
6428         {
6429                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6430         }
6431         else
6432         {
6433                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6434         }
6435         ret = account_set_icon_path(account, "updated-icon-path");
6436         if(ret != ACCOUNT_ERROR_NONE)
6437         {
6438                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6439         }
6440         else
6441         {
6442                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6443         }
6444         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6445         if(ret != ACCOUNT_ERROR_NONE)
6446         {
6447                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6448         }
6449         else
6450         {
6451                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6452         }
6453         ret = account_set_source(account, "updated-URUSA inc.");
6454         if(ret != ACCOUNT_ERROR_NONE)
6455         {
6456                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6457         }
6458         else
6459         {
6460                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6461         }
6462         int i;
6463         for(i=0;i<USER_TXT_CNT;i++)
6464         {
6465                 ret = account_set_user_text(account, i, "updated-user txt");
6466                 if(ret != ACCOUNT_ERROR_NONE)
6467                 {
6468                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6469                 }
6470
6471         }
6472
6473         ret = account_update_to_db_by_id(account, account_id);
6474
6475         if(ret != ACCOUNT_ERROR_NONE)
6476         {
6477                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6478         }
6479         else
6480         {
6481                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6482         }
6483
6484         ret = account_destroy(account);
6485         if(ret != ACCOUNT_ERROR_NONE)
6486         {
6487                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6488         }
6489         else
6490         {
6491                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6492         }
6493         ret = account_disconnect();
6494         if(ret != ACCOUNT_ERROR_NONE)
6495         {
6496                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6497         }
6498
6499         return 1;
6500 }
6501
6502 static int utc23_account_update()
6503 {
6504         int ret = - 1;
6505
6506         account_h account = NULL;
6507         ret = account_connect();
6508         if(ret != ACCOUNT_ERROR_NONE)
6509         {
6510                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6511         }
6512
6513         ret = account_create(&account);
6514
6515         if(ret != ACCOUNT_ERROR_NONE)
6516         {
6517                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6518         }
6519         else
6520         {
6521                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6522         }
6523
6524         account_set_user_name(account, "updated-tarun.kr");
6525
6526         if(ret != ACCOUNT_ERROR_NONE)
6527         {
6528                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6529         }
6530         else
6531         {
6532                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6533         }
6534         ret = account_set_display_name(account, "updated-tarun kumar");
6535         if(ret != ACCOUNT_ERROR_NONE)
6536         {
6537                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6538         }
6539         else
6540         {
6541                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6542         }
6543         ret = account_set_domain_name(account, "updated-Samsung Facebook");
6544         if(ret != ACCOUNT_ERROR_NONE)
6545         {
6546                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6547         }
6548         else
6549         {
6550                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6551         }
6552         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6553         if(ret != ACCOUNT_ERROR_NONE)
6554         {
6555                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6556         }
6557         else
6558         {
6559                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6560         }
6561         ret = account_set_package_name(account, "updated-com.samsung.account");
6562         if(ret != ACCOUNT_ERROR_NONE)
6563         {
6564                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6565         }
6566         else
6567         {
6568                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6569         }
6570         ret = account_set_icon_path(account, "updated-icon-path");
6571         if(ret != ACCOUNT_ERROR_NONE)
6572         {
6573                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6574         }
6575         else
6576         {
6577                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6578         }
6579         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6580         if(ret != ACCOUNT_ERROR_NONE)
6581         {
6582                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6583         }
6584         else
6585         {
6586                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6587         }
6588         ret = account_set_source(account, "updated-URUSA inc.");
6589         if(ret != ACCOUNT_ERROR_NONE)
6590         {
6591                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6592         }
6593         else
6594         {
6595                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6596         }
6597         int i;
6598         for(i=0;i<USER_TXT_CNT;i++)
6599         {
6600                 ret = account_set_user_text(account, i, "updated-user txt");
6601                 if(ret != ACCOUNT_ERROR_NONE)
6602                 {
6603                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6604                 }
6605
6606         }
6607         for(i=0;i<USER_INT_CNT;i++)
6608         {
6609                 ret = account_set_user_int(account, i, -111);
6610                 if(ret != ACCOUNT_ERROR_NONE)
6611                 {
6612                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6613                 }
6614         }
6615
6616         ret = account_update_to_db_by_id(account, account_id);
6617
6618         if(ret != ACCOUNT_ERROR_NONE)
6619         {
6620                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6621         }
6622         else
6623         {
6624                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6625         }
6626
6627         ret = account_destroy(account);
6628         if(ret != ACCOUNT_ERROR_NONE)
6629         {
6630                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6631         }
6632         else
6633         {
6634                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6635         }
6636         ret = account_disconnect();
6637         if(ret != ACCOUNT_ERROR_NONE)
6638         {
6639                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6640         }
6641
6642         return 1;
6643 }
6644
6645 static int utc24_account_update()
6646 {
6647         int ret = - 1;
6648
6649         account_h account = NULL;
6650         ret = account_connect();
6651         if(ret != ACCOUNT_ERROR_NONE)
6652         {
6653                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6654         }
6655
6656         ret = account_create(&account);
6657
6658         if(ret != ACCOUNT_ERROR_NONE)
6659         {
6660                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6661         }
6662         else
6663         {
6664                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6665         }
6666
6667         account_set_user_name(account, "updated-tarun.kr");
6668
6669         if(ret != ACCOUNT_ERROR_NONE)
6670         {
6671                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6672         }
6673         else
6674         {
6675                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6676         }
6677         ret = account_set_display_name(account, "updated-tarun kumar");
6678         if(ret != ACCOUNT_ERROR_NONE)
6679         {
6680                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6681         }
6682         else
6683         {
6684                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6685         }
6686         ret = account_set_domain_name(account, "updated-Samsung Facebook");
6687         if(ret != ACCOUNT_ERROR_NONE)
6688         {
6689                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6690         }
6691         else
6692         {
6693                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6694         }
6695         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6696         if(ret != ACCOUNT_ERROR_NONE)
6697         {
6698                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6699         }
6700         else
6701         {
6702                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6703         }
6704         ret = account_set_package_name(account, "updated-com.samsung.account");
6705         if(ret != ACCOUNT_ERROR_NONE)
6706         {
6707                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6708         }
6709         else
6710         {
6711                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6712         }
6713         ret = account_set_icon_path(account, "updated-icon-path");
6714         if(ret != ACCOUNT_ERROR_NONE)
6715         {
6716                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6717         }
6718         else
6719         {
6720                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6721         }
6722         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6723         if(ret != ACCOUNT_ERROR_NONE)
6724         {
6725                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6726         }
6727         else
6728         {
6729                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6730         }
6731         ret = account_set_source(account, "updated-URUSA inc.");
6732         if(ret != ACCOUNT_ERROR_NONE)
6733         {
6734                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6735         }
6736         else
6737         {
6738                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6739         }
6740         int i;
6741         for(i=0;i<USER_TXT_CNT;i++)
6742         {
6743                 ret = account_set_user_text(account, i, "updated-user txt");
6744                 if(ret != ACCOUNT_ERROR_NONE)
6745                 {
6746                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6747                 }
6748
6749         }
6750         for(i=0;i<USER_INT_CNT;i++)
6751         {
6752                 ret = account_set_user_int(account, i, 0);
6753                 if(ret != ACCOUNT_ERROR_NONE)
6754                 {
6755                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6756                 }
6757         }
6758
6759         ret = account_update_to_db_by_id(account, account_id);
6760
6761         if(ret != ACCOUNT_ERROR_NONE)
6762         {
6763                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6764         }
6765         else
6766         {
6767                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6768         }
6769
6770         ret = account_destroy(account);
6771         if(ret != ACCOUNT_ERROR_NONE)
6772         {
6773                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6774         }
6775         else
6776         {
6777                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6778         }
6779         ret = account_disconnect();
6780         if(ret != ACCOUNT_ERROR_NONE)
6781         {
6782                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6783         }
6784
6785         return 1;
6786 }
6787
6788 static int utc25_account_update()
6789 {
6790         int ret = - 1;
6791
6792         account_h account = NULL;
6793         ret = account_connect();
6794         if(ret != ACCOUNT_ERROR_NONE)
6795         {
6796                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6797         }
6798
6799         ret = account_create(&account);
6800
6801         if(ret != ACCOUNT_ERROR_NONE)
6802         {
6803                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6804         }
6805         else
6806         {
6807                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6808         }
6809
6810         account_set_user_name(account, "updated-tarun.kr");
6811
6812         if(ret != ACCOUNT_ERROR_NONE)
6813         {
6814                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6815         }
6816         else
6817         {
6818                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6819         }
6820         ret = account_set_display_name(account, "updated-tarun kumar");
6821         if(ret != ACCOUNT_ERROR_NONE)
6822         {
6823                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6824         }
6825         else
6826         {
6827                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6828         }
6829         ret = account_set_domain_name(account, "updated-Samsung Facebook");
6830         if(ret != ACCOUNT_ERROR_NONE)
6831         {
6832                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6833         }
6834         else
6835         {
6836                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6837         }
6838         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6839         if(ret != ACCOUNT_ERROR_NONE)
6840         {
6841                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6842         }
6843         else
6844         {
6845                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6846         }
6847         ret = account_set_package_name(account, "updated-com.samsung.account");
6848         if(ret != ACCOUNT_ERROR_NONE)
6849         {
6850                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6851         }
6852         else
6853         {
6854                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6855         }
6856         ret = account_set_icon_path(account, "updated-icon-path");
6857         if(ret != ACCOUNT_ERROR_NONE)
6858         {
6859                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6860         }
6861         else
6862         {
6863                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6864         }
6865         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
6866         if(ret != ACCOUNT_ERROR_NONE)
6867         {
6868                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6869         }
6870         else
6871         {
6872                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6873         }
6874         ret = account_set_source(account, "updated-URUSA inc.");
6875         if(ret != ACCOUNT_ERROR_NONE)
6876         {
6877                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6878         }
6879         else
6880         {
6881                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6882         }
6883         int i;
6884         for(i=0;i<USER_TXT_CNT;i++)
6885         {
6886                 ret = account_set_user_text(account, i, "updated-user txt");
6887                 if(ret != ACCOUNT_ERROR_NONE)
6888                 {
6889                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6890                 }
6891
6892         }
6893         for(i=0;i<USER_INT_CNT;i++)
6894         {
6895                 ret = account_set_user_int(account, i, 111);
6896                 if(ret != ACCOUNT_ERROR_NONE)
6897                 {
6898                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
6899                 }
6900         }
6901
6902         ret = account_update_to_db_by_id(account, account_id);
6903
6904         if(ret != ACCOUNT_ERROR_NONE)
6905         {
6906                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6907         }
6908         else
6909         {
6910                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6911         }
6912
6913         ret = account_destroy(account);
6914         if(ret != ACCOUNT_ERROR_NONE)
6915         {
6916                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6917         }
6918         else
6919         {
6920                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6921         }
6922         ret = account_disconnect();
6923         if(ret != ACCOUNT_ERROR_NONE)
6924         {
6925                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6926         }
6927
6928         return 1;
6929 }
6930
6931 static int utc26_account_update()
6932 {
6933         int ret = - 1;
6934
6935         account_h account = NULL;
6936         ret = account_connect();
6937         if(ret != ACCOUNT_ERROR_NONE)
6938         {
6939                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
6940         }
6941
6942         ret = account_create(&account);
6943
6944         if(ret != ACCOUNT_ERROR_NONE)
6945         {
6946                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6947         }
6948         else
6949         {
6950                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6951         }
6952
6953         account_set_user_name(account, "updated-tarun.kr");
6954
6955         if(ret != ACCOUNT_ERROR_NONE)
6956         {
6957                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6958         }
6959         else
6960         {
6961                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6962         }
6963         ret = account_set_display_name(account, "updated-tarun kumar");
6964         if(ret != ACCOUNT_ERROR_NONE)
6965         {
6966                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6967         }
6968         else
6969         {
6970                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6971         }
6972         ret = account_set_domain_name(account, "updated-Samsung Facebook");
6973         if(ret != ACCOUNT_ERROR_NONE)
6974         {
6975                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6976         }
6977         else
6978         {
6979                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6980         }
6981         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
6982         if(ret != ACCOUNT_ERROR_NONE)
6983         {
6984                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6985         }
6986         else
6987         {
6988                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6989         }
6990         ret = account_set_package_name(account, "updated-com.samsung.account");
6991         if(ret != ACCOUNT_ERROR_NONE)
6992         {
6993                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
6994         }
6995         else
6996         {
6997                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
6998         }
6999         ret = account_set_icon_path(account, "updated-icon-path");
7000         if(ret != ACCOUNT_ERROR_NONE)
7001         {
7002                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7003         }
7004         else
7005         {
7006                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7007         }
7008         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
7009         if(ret != ACCOUNT_ERROR_NONE)
7010         {
7011                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7012         }
7013         else
7014         {
7015                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7016         }
7017         ret = account_set_source(account, "updated-URUSA inc.");
7018         if(ret != ACCOUNT_ERROR_NONE)
7019         {
7020                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7021         }
7022         else
7023         {
7024                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7025         }
7026         int i;
7027         for(i=0;i<USER_TXT_CNT;i++)
7028         {
7029                 ret = account_set_user_text(account, i, "updated-user txt");
7030                 if(ret != ACCOUNT_ERROR_NONE)
7031                 {
7032                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
7033                 }
7034
7035         }
7036         for(i=0;i<USER_INT_CNT;i++)
7037         {
7038                 ret = account_set_user_int(account, i, 111);
7039                 if(ret != ACCOUNT_ERROR_NONE)
7040                 {
7041                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
7042                 }
7043         }
7044
7045         ret = account_update_to_db_by_id(account, account_id);
7046
7047         if(ret != ACCOUNT_ERROR_NONE)
7048         {
7049                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7050         }
7051         else
7052         {
7053                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7054         }
7055
7056         ret = account_destroy(account);
7057         if(ret != ACCOUNT_ERROR_NONE)
7058         {
7059                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7060         }
7061         else
7062         {
7063                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7064         }
7065         ret = account_disconnect();
7066         if(ret != ACCOUNT_ERROR_NONE)
7067         {
7068                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7069         }
7070
7071         return 1;
7072 }
7073
7074 static int utc27_account_update()
7075 {
7076         int ret = - 1;
7077
7078         account_h account = NULL;
7079         ret = account_connect();
7080         if(ret != ACCOUNT_ERROR_NONE)
7081         {
7082                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7083         }
7084
7085         ret = account_create(&account);
7086
7087         if(ret != ACCOUNT_ERROR_NONE)
7088         {
7089                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7090         }
7091         else
7092         {
7093                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7094         }
7095
7096         account_set_user_name(account, "updated-tarun.kr");
7097
7098         if(ret != ACCOUNT_ERROR_NONE)
7099         {
7100                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7101         }
7102         else
7103         {
7104                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7105         }
7106         ret = account_set_display_name(account, "updated-tarun kumar");
7107         if(ret != ACCOUNT_ERROR_NONE)
7108         {
7109                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7110         }
7111         else
7112         {
7113                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7114         }
7115         ret = account_set_domain_name(account, "updated-Samsung Facebook");
7116         if(ret != ACCOUNT_ERROR_NONE)
7117         {
7118                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7119         }
7120         else
7121         {
7122                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7123         }
7124         ret = account_set_email_address(account, "updated-urusa77@gmail.com");
7125         if(ret != ACCOUNT_ERROR_NONE)
7126         {
7127                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7128         }
7129         else
7130         {
7131                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7132         }
7133         ret = account_set_package_name(account, "updated-com.samsung.account");
7134         if(ret != ACCOUNT_ERROR_NONE)
7135         {
7136                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7137         }
7138         else
7139         {
7140                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7141         }
7142         ret = account_set_icon_path(account, "updated-icon-path");
7143         if(ret != ACCOUNT_ERROR_NONE)
7144         {
7145                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7146         }
7147         else
7148         {
7149                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7150         }
7151         ret = account_set_access_token(account, "updated-ACCESSTOKEN");
7152         if(ret != ACCOUNT_ERROR_NONE)
7153         {
7154                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7155         }
7156         else
7157         {
7158                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7159         }
7160         ret = account_set_source(account, "updated-URUSA inc.");
7161         if(ret != ACCOUNT_ERROR_NONE)
7162         {
7163                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7164         }
7165         else
7166         {
7167                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7168         }
7169         int i;
7170         for(i=0;i<USER_TXT_CNT;i++)
7171         {
7172                 ret = account_set_user_text(account, i, "updated-user txt");
7173                 if(ret != ACCOUNT_ERROR_NONE)
7174                 {
7175                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
7176                 }
7177
7178         }
7179         for(i=0;i<USER_INT_CNT;i++)
7180         {
7181                 ret = account_set_user_int(account, i, 111);
7182                 if(ret != ACCOUNT_ERROR_NONE)
7183                 {
7184                         ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
7185                 }
7186         }
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);
7196
7197         ret = account_update_to_db_by_id(account, account_id);
7198
7199         if(ret != ACCOUNT_ERROR_NONE)
7200         {
7201                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7202         }
7203         else
7204         {
7205                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7206         }
7207
7208         ret = account_destroy(account);
7209         if(ret != ACCOUNT_ERROR_NONE)
7210         {
7211                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7212         }
7213         else
7214         {
7215                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7216         }
7217         ret = account_disconnect();
7218         if(ret != ACCOUNT_ERROR_NONE)
7219         {
7220                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7221         }
7222
7223         return 1;
7224 }
7225
7226 bool _utc1_account_get_callback(account_h handle, void* user_data)
7227 {
7228         ACCOUNT_SLOGD("_account_get_callback handle = %s , user_data = %s \n", (char *)handle, (char *)user_data);
7229
7230         char *test_text = NULL;
7231
7232         account_get_user_name(handle, &test_text);
7233         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7234
7235         _account_free_text(test_text);
7236
7237         account_get_display_name(handle, &test_text);
7238         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7239
7240         _account_free_text(test_text);
7241
7242         account_get_email_address(handle, &test_text);
7243         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7244
7245         _account_free_text(test_text);
7246
7247         account_get_icon_path(handle, &test_text);
7248         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7249
7250         _account_free_text(test_text);
7251
7252         account_get_source(handle, &test_text);
7253         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7254
7255         _account_free_text(test_text);
7256
7257         account_get_package_name(handle, &test_text);
7258         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7259
7260         _account_free_text(test_text);
7261
7262         account_get_domain_name(handle, &test_text);
7263         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7264
7265         _account_free_text(test_text);
7266
7267         account_get_access_token(handle, &test_text);
7268         ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
7269         _account_free_text(test_text);
7270
7271         int i=0, test_int=0;
7272
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);
7276
7277         account_secrecy_state_e secret;
7278         account_get_secret(handle, &secret);
7279         ACCOUNT_SLOGD("account_get_secret : %d\n", secret);
7280
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);
7284
7285         for(i=0;i<USER_INT_CNT;i++)
7286         {
7287                 account_get_user_int(handle, i, &test_int);
7288                 ACCOUNT_SLOGD("_account_get_callback : %d\n", test_int);
7289         }
7290
7291         account_get_capability_all(handle, _capability_get_callback, NULL);
7292
7293         return TRUE;
7294 }
7295
7296
7297 static int utc1_get_account_by_id()
7298 {
7299         int ret = - 1;
7300
7301         account_h account = NULL;
7302         ret = account_connect();
7303         if(ret != ACCOUNT_ERROR_NONE)
7304         {
7305                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7306         }
7307
7308         ret = account_create(&account);
7309
7310         if(ret != ACCOUNT_ERROR_NONE)
7311         {
7312                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7313         }
7314         else
7315         {
7316                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7317         }
7318
7319         ret = account_query_account_by_account_id(account_id, &account);
7320
7321         if(ret != ACCOUNT_ERROR_NONE)
7322         {
7323                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7324         }
7325         else
7326         {
7327                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7328         }
7329
7330         _account_get_account_info(account);
7331
7332         ret = account_destroy(account);
7333         if(ret != ACCOUNT_ERROR_NONE)
7334         {
7335                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7336         }
7337         else
7338         {
7339                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7340         }
7341         ret = account_disconnect();
7342         if(ret != ACCOUNT_ERROR_NONE)
7343         {
7344                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7345         }
7346
7347         return 1;
7348 }
7349
7350 static int utc2_get_account_by_id()
7351 {
7352         int ret = - 1;
7353
7354         account_h account = NULL;
7355         ret = account_connect();
7356         if(ret != ACCOUNT_ERROR_NONE)
7357         {
7358                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7359         }
7360
7361         ret = account_create(&account);
7362
7363         if(ret != ACCOUNT_ERROR_NONE)
7364         {
7365                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7366         }
7367         else
7368         {
7369                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7370         }
7371
7372         ret = account_query_account_by_account_id(account_id, &account);
7373
7374         _account_get_account_info(account);
7375
7376         if(ret != ACCOUNT_ERROR_NONE)
7377         {
7378                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7379         }
7380         else
7381         {
7382                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7383         }
7384
7385         ret = account_destroy(account);
7386         if(ret != ACCOUNT_ERROR_NONE)
7387         {
7388                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7389         }
7390         else
7391         {
7392                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7393         }
7394         ret = account_disconnect();
7395         if(ret != ACCOUNT_ERROR_NONE)
7396         {
7397                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7398         }
7399
7400         return 1;
7401 }
7402
7403 static int utc1_get_account_by_user_name()
7404 {
7405         int ret = - 1;
7406
7407         account_h account = NULL;
7408         ret = account_connect();
7409         if(ret != ACCOUNT_ERROR_NONE)
7410         {
7411                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7412         }
7413
7414         ret = account_query_account_by_user_name(_account_get_callback, "usernamed-wy1115", NULL);
7415
7416         if(ret != ACCOUNT_ERROR_NONE)
7417         {
7418                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7419         }
7420         else
7421         {
7422                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7423         }
7424
7425         ret = account_disconnect();
7426         if(ret != ACCOUNT_ERROR_NONE)
7427         {
7428                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7429         }
7430
7431         return 1;
7432 }
7433
7434 static int utc2_get_account_by_user_name()
7435 {
7436         int ret = - 1;
7437
7438         account_h account = NULL;
7439         ret = account_connect();
7440         if(ret != ACCOUNT_ERROR_NONE)
7441         {
7442                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7443         }
7444
7445         char *user_data = "test user_data";
7446
7447         ret = account_query_account_by_user_name(_account_get_callback, "usernamed-wy1115", (void *)user_data);
7448
7449         if(ret != ACCOUNT_ERROR_NONE)
7450         {
7451                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7452         }
7453         else
7454         {
7455                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7456         }
7457
7458         ret = account_disconnect();
7459         if(ret != ACCOUNT_ERROR_NONE)
7460         {
7461                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7462         }
7463
7464         return 1;
7465 }
7466
7467 static int utc1_get_account_by_capability()
7468 {
7469         int ret = - 1;
7470
7471         account_h account = NULL;
7472         ret = account_connect();
7473         if(ret != ACCOUNT_ERROR_NONE)
7474         {
7475                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7476         }
7477
7478         ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED, NULL);
7479
7480         if(ret != ACCOUNT_ERROR_NONE)
7481         {
7482                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7483         }
7484         else
7485         {
7486                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7487         }
7488
7489         ret = account_disconnect();
7490         if(ret != ACCOUNT_ERROR_NONE)
7491         {
7492                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7493         }
7494
7495         return 1;
7496 }
7497
7498 static int utc2_get_account_by_capability()
7499 {
7500         int ret = - 1;
7501
7502         account_h account = NULL;
7503         ret = account_connect();
7504         if(ret != ACCOUNT_ERROR_NONE)
7505         {
7506                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7507         }
7508
7509         ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_DISABLED, NULL);
7510
7511         if(ret != ACCOUNT_ERROR_NONE)
7512         {
7513                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7514         }
7515         else
7516         {
7517                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7518         }
7519
7520         ret = account_disconnect();
7521         if(ret != ACCOUNT_ERROR_NONE)
7522         {
7523                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7524         }
7525
7526         return 1;
7527 }
7528
7529 static int utc3_get_account_by_capability()
7530 {
7531         int ret = - 1;
7532
7533         account_h account = NULL;
7534         ret = account_connect();
7535         if(ret != ACCOUNT_ERROR_NONE)
7536         {
7537                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7538         }
7539
7540         ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, -1, NULL);
7541
7542         if(ret != ACCOUNT_ERROR_NONE)
7543         {
7544                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7545         }
7546         else
7547         {
7548                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7549         }
7550
7551         ret = account_disconnect();
7552         if(ret != ACCOUNT_ERROR_NONE)
7553         {
7554                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7555         }
7556
7557         return 1;
7558 }
7559
7560 static int utc4_get_account_by_capability()
7561 {
7562         int ret = - 1;
7563
7564         account_h account = NULL;
7565         ret = account_connect();
7566         if(ret != ACCOUNT_ERROR_NONE)
7567         {
7568                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7569         }
7570
7571         ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_DISABLED, NULL);
7572
7573         if(ret != ACCOUNT_ERROR_NONE)
7574         {
7575                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7576         }
7577         else
7578         {
7579                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7580         }
7581
7582         ret = account_disconnect();
7583         if(ret != ACCOUNT_ERROR_NONE)
7584         {
7585                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7586         }
7587
7588         return 1;
7589 }
7590
7591 static int utc5_get_account_by_capability()
7592 {
7593         int ret = - 1;
7594
7595         account_h account = NULL;
7596         ret = account_connect();
7597         if(ret != ACCOUNT_ERROR_NONE)
7598         {
7599                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7600         }
7601
7602         ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, -1, NULL);
7603
7604         if(ret != ACCOUNT_ERROR_NONE)
7605         {
7606                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
7607         }
7608         else
7609         {
7610                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
7611         }
7612
7613         ret = account_disconnect();
7614         if(ret != ACCOUNT_ERROR_NONE)
7615         {
7616                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7617         }
7618
7619         return 1;
7620 }
7621
7622 static int utc1_get_all_accounts()
7623 {
7624         int ret = - 1;
7625
7626         ret = account_connect();
7627         if(ret != ACCOUNT_ERROR_NONE)
7628         {
7629                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7630         }
7631
7632         ret = account_foreach_account_from_db(_account_get_callback, NULL);
7633
7634         if(ret != ACCOUNT_ERROR_NONE)
7635         {
7636                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7637         }
7638         else
7639         {
7640                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7641         }
7642
7643         ret = account_disconnect();
7644         if(ret != ACCOUNT_ERROR_NONE)
7645         {
7646                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7647         }
7648
7649         return 1;
7650 }
7651
7652 static int utc2_get_all_accounts()
7653 {
7654         int ret = - 1;
7655
7656         ret = account_connect();
7657         if(ret != ACCOUNT_ERROR_NONE)
7658         {
7659                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7660         }
7661
7662         char *user_data = "test user_data";
7663
7664         ret = account_foreach_account_from_db(_account_get_callback, (void *)user_data);
7665
7666         if(ret != ACCOUNT_ERROR_NONE)
7667         {
7668                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d \n", __LINE__, ret);
7669         }
7670         else
7671         {
7672                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d \n", __LINE__, ret);
7673         }
7674
7675         ret = account_disconnect();
7676         if(ret != ACCOUNT_ERROR_NONE)
7677         {
7678                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7679         }
7680
7681         return 1;
7682 }
7683
7684 bool _utc_capability_get_callback(const char* capability_type, account_capability_state_e capability_value, void* user_data)
7685 {
7686         char* test_type = (char*)capability_type;
7687         int test_value = capability_value;
7688
7689         ACCOUNT_SLOGD("_capability_get_callback test_type = : %s\n", test_type);
7690         ACCOUNT_SLOGD("_capability_get_callback test_value = : %d\n", test_value);
7691         return TRUE;
7692
7693 }
7694
7695 static int utc1_account_get_capability_by_account_id()
7696 {
7697         int ret = -1;
7698         ret = account_connect();
7699         if(ret != ACCOUNT_ERROR_NONE)
7700         {
7701                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7702         }
7703
7704         ret = account_query_capability_by_account_id(_utc_capability_get_callback, account_id, NULL);
7705
7706         if(ret != ACCOUNT_ERROR_NONE)
7707         {
7708                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d,\n", __LINE__, ret);
7709         }
7710         else
7711         {
7712                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7713         }
7714         ret = account_disconnect();
7715         if(ret != ACCOUNT_ERROR_NONE)
7716         {
7717                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7718         }
7719         return 1;
7720 }
7721
7722 static int utc2_account_get_capability_by_account_id()
7723 {
7724         int ret = -1;
7725
7726         char *user_data = "test user_data";
7727         ret = account_connect();
7728         if(ret != ACCOUNT_ERROR_NONE)
7729         {
7730                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7731         }
7732
7733         ret = account_query_capability_by_account_id(_utc_capability_get_callback, account_id, (void *)user_data);
7734
7735         if(ret != ACCOUNT_ERROR_NONE)
7736         {
7737                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7738         }
7739         else
7740         {
7741                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7742         }
7743         ret = account_disconnect();
7744         if(ret != ACCOUNT_ERROR_NONE)
7745         {
7746                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7747         }
7748         return 1;
7749 }
7750
7751 static int utc_account_delete_by_id()
7752 {
7753         int ret = -1;
7754
7755         ret = account_connect();
7756         if(ret != ACCOUNT_ERROR_NONE)
7757         {
7758                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7759         }
7760
7761         ret = account_delete_from_db_by_id(account_id);
7762         if(ret != ACCOUNT_ERROR_NONE)
7763         {
7764                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7765         }
7766         else
7767         {
7768                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
7769         }
7770         ret = account_disconnect();
7771         if(ret != ACCOUNT_ERROR_NONE)
7772         {
7773                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7774         }
7775         return 1;
7776 }
7777
7778 static int utc_account_delete_by_user_name()
7779 {
7780         int ret = -1;
7781         ret = account_connect();
7782         if(ret != ACCOUNT_ERROR_NONE)
7783         {
7784                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7785         }
7786
7787         ret = account_delete_from_db_by_user_name("usernamed-wy1115", "usernamed-com.samsung.account");
7788         if(ret != ACCOUNT_ERROR_NONE)
7789         {
7790                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d \n", __LINE__, ret);
7791         }
7792         else
7793         {
7794                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d \n", __LINE__, ret);
7795         }
7796         ret = account_disconnect();
7797         if(ret != ACCOUNT_ERROR_NONE)
7798         {
7799                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7800         }
7801         return 1;
7802 }
7803
7804 static int utc_account_delete_by_package_name()
7805 {
7806         int ret = -1;
7807         ret = account_connect();
7808         if(ret != ACCOUNT_ERROR_NONE)
7809         {
7810                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7811         }
7812
7813         ret = account_delete_from_db_by_package_name("usernamed-com.samsung.account");
7814         if(ret != ACCOUNT_ERROR_NONE)
7815         {
7816                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d\n", __LINE__, ret);
7817         }
7818         else
7819         {
7820                 ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d\n", __LINE__, ret);
7821         }
7822         ret = account_disconnect();
7823         if(ret != ACCOUNT_ERROR_NONE)
7824         {
7825                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7826         }
7827         return 1;
7828 }
7829
7830 static int utc_account_update_sync_status_by_id()
7831 {
7832    int ret = -1;
7833
7834    ret = account_connect();
7835    if(ret != ACCOUNT_ERROR_NONE)
7836    {
7837            ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7838    }
7839
7840    ret = account_update_sync_status_by_id(account_id, ACCOUNT_SYNC_STATUS_IDLE);
7841    if(ret != ACCOUNT_ERROR_NONE)
7842    {
7843            ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7844    }
7845
7846    ret = account_disconnect();
7847    if(ret != ACCOUNT_ERROR_NONE)
7848    {
7849            ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7850    }
7851    return ret;
7852 }
7853
7854 static int utc_account_get_application_capability_support()
7855 {
7856    int ret = -1;
7857    bool test = false;
7858
7859    ret = account_connect();
7860    if(ret != ACCOUNT_ERROR_NONE)
7861    {
7862            ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7863    }
7864
7865    ret = account_get_application_capability_support("com.samsung.facebook", ACCOUNT_SUPPORTS_CAPABILITY_CONTACT, &test);
7866    if(ret != ACCOUNT_ERROR_NONE)
7867    {
7868            ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7869    }
7870
7871    ret = account_disconnect();
7872    if(ret != ACCOUNT_ERROR_NONE)
7873    {
7874            ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7875    }
7876    return ret;
7877 }
7878
7879 static int utc_account_get_and_update()
7880 {
7881         int ret = -1;
7882         account_h account = NULL;
7883
7884         ret = account_connect();
7885         ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7886
7887         ret = account_create(&account);
7888         ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7889
7890         ret = account_query_account_by_account_id( 2, &account);
7891         ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7892
7893         ret = account_set_access_token(account, "ACCESSSSSSSSSSSSSSSSSSSFASFASDGDSFFASDFASFDSDGAASDFASDGDFDFGAFASDFASFASDFASASGSGASDFASFSADDSGASGASGGASDFASDFASGSAASDFAAAG");
7894         ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7895
7896         ret = account_update_to_db_by_id( account, 2);
7897         ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7898
7899         ret = account_destroy(account);
7900         ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7901
7902         ret = account_disconnect();
7903         ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
7904
7905         return 1;
7906 }
7907
7908 int main(int argc, char** argv)
7909 {
7910 #if 0
7911         utc_notify_account_insert_update_delete();
7912 #else
7913         int account_id = -1;
7914         int cap_key = -1;
7915         int cap_value = -1;
7916         int user_resp = 0;
7917         char temp[128];
7918         memset(temp, 0x00, sizeof(temp));
7919
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");
7927                 exit(0);
7928         }
7929
7930         if (user_resp == 1) {
7931                 ACCOUNT_SLOGD("In Account Insert Test Mode \n");
7932                 account_id = _account_insert_test_new();
7933                 if(account_id > 0)
7934                 {
7935                         ACCOUNT_SLOGD("(%d)-[Account] account insert test Success!! account id = %d\n", __LINE__, account_id);
7936                 }
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");
7944                         exit(0);
7945                 }
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");
7950                                 exit(0);
7951                         }
7952                         if (_account_update_test_new(account_id) == ACCOUNT_ERROR_NONE)
7953                                 ACCOUNT_SLOGD("Account update Success \n");
7954                         else
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");
7961                                 exit(0);
7962                         }
7963                         char temp2[128];
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");
7968                                 exit(0);
7969                         }
7970                         if (_account_update_test_new_by_user_name(temp, temp2) == ACCOUNT_ERROR_NONE)
7971                                 ACCOUNT_SLOGD("Account update Success \n");
7972                         else
7973                                 ACCOUNT_SLOGD("Account update Failed \n");
7974                 } else {
7975                         ACCOUNT_SLOGD("Wrong info entered \n");
7976                         exit(0);
7977                 }
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");
7985                         exit(0);
7986                 }
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");
7991                                 exit(0);
7992                         }
7993                         int ret = account_connect();
7994                         if(ret != ACCOUNT_ERROR_NONE)
7995                         {
7996                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
7997                         }
7998                         if (account_delete_from_db_by_id(account_id) == ACCOUNT_ERROR_NONE)
7999                                 ACCOUNT_SLOGD("Account delete Success \n");
8000                         else
8001                                 ACCOUNT_SLOGD("Account delete Failed \n");
8002
8003                         ret = account_disconnect();
8004                         if(ret != ACCOUNT_ERROR_NONE)
8005                         {
8006                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8007                         }
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");
8013                                 exit(0);
8014                         }
8015                         char temp2[128];
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");
8020                                 exit(0);
8021                         }
8022                         int ret = account_connect();
8023                         if(ret != ACCOUNT_ERROR_NONE)
8024                         {
8025                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8026                         }
8027                         if (account_delete_from_db_by_user_name(temp, temp2) == ACCOUNT_ERROR_NONE)
8028                                 ACCOUNT_SLOGD("Account delete Success \n");
8029                         else
8030                                 ACCOUNT_SLOGD("Account delete Failed \n");
8031                         ret = account_disconnect();
8032                         if(ret != ACCOUNT_ERROR_NONE)
8033                         {
8034                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8035                         }
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");
8041                                 exit(0);
8042                         }
8043                         int ret = account_connect();
8044                         if(ret != ACCOUNT_ERROR_NONE)
8045                         {
8046                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8047                         }
8048                         if (account_delete_from_db_by_package_name(temp) == ACCOUNT_ERROR_NONE )
8049                                 ACCOUNT_SLOGD("Account delete Success \n");
8050                         else
8051                                 ACCOUNT_SLOGD("Account delete Failed \n");
8052                         ret = account_disconnect();
8053                         if(ret != ACCOUNT_ERROR_NONE)
8054                         {
8055                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8056                         }
8057
8058                 } else {
8059                         ACCOUNT_SLOGD("Wrong info entered \n");
8060                         exit(0);
8061                 }
8062
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");
8071                         exit(0);
8072                 }
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");
8077                                 exit(0);
8078                         }
8079                         account_h account = NULL;
8080                         account_connect();
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");
8084                         else
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");
8092                                 exit(0);
8093                         }
8094                         int ret = account_connect();
8095                         if(ret != ACCOUNT_ERROR_NONE)
8096                         {
8097                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8098                         }
8099                         if (account_query_account_by_user_name(_account_get_callback, temp, NULL) == ACCOUNT_ERROR_NONE)
8100                                 ACCOUNT_SLOGD("Account Queried Successfully \n");
8101                         else
8102                                 ACCOUNT_SLOGD("Account Queried failed \n");
8103
8104                         ret = account_disconnect();
8105                         if(ret != ACCOUNT_ERROR_NONE)
8106                         {
8107                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8108                         }
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");
8113                                 exit(0);
8114                         }
8115                         int ret = account_connect();
8116                         if(ret != ACCOUNT_ERROR_NONE)
8117                         {
8118                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d\n", __LINE__, ret);
8119                         }
8120                         if (account_query_account_by_package_name(_account_get_callback, temp, NULL) == ACCOUNT_ERROR_NONE)
8121                                 ACCOUNT_SLOGD("Account Queried Successfully \n");
8122                         else
8123                                 ACCOUNT_SLOGD("Account Queried failed \n");
8124                         ret = account_disconnect();
8125                         if(ret != ACCOUNT_ERROR_NONE)
8126                         {
8127                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8128                         }
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");
8133                                 exit(0);
8134                         }
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");
8138                                 exit(0);
8139                         }
8140                         int ret = account_connect();
8141                         if(ret != ACCOUNT_ERROR_NONE)
8142                         {
8143                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d\n", __LINE__, ret);
8144                         }
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");
8147                         else
8148                                 ACCOUNT_SLOGD("Account Queried failed \n");
8149                         ret = account_disconnect();
8150                         if(ret != ACCOUNT_ERROR_NONE)
8151                         {
8152                                 ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
8153                         }
8154                 } else {
8155                         ACCOUNT_SLOGD("Wrong info entered \n");
8156                         exit(0);
8157                 }
8158
8159         } else {
8160                         ACCOUNT_SLOGD("Wrong info entered \n");
8161                         exit(0);
8162         }
8163
8164         //utc calls
8165 #if 1
8166         //utc insert
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();
8190 #endif
8191
8192         //utc update
8193 #if 1
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();
8221 #endif
8222
8223         //utc get account by id
8224 #if 1
8225         utc1_get_account_by_id();
8226         utc2_get_account_by_id();
8227 #endif
8228
8229         //utc get account by user name
8230 #if 1
8231         utc1_get_account_by_user_name();
8232         utc2_get_account_by_user_name();
8233 #endif
8234
8235         //utc get account by capability
8236 #if 1
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();
8242 #endif
8243
8244         //utc get all accounts
8245 #if 1
8246         utc1_get_all_accounts();
8247         utc2_get_all_accounts();
8248 #endif
8249
8250         //utc get capability by account id
8251 #if 1
8252         utc1_account_get_capability_by_account_id();
8253         utc2_account_get_capability_by_account_id();
8254 #endif
8255
8256         //utc update sync status by id
8257 #if 1
8258         utc_account_update_sync_status_by_id();
8259 #endif
8260
8261         //utc get application capability support
8262 #if 1
8263         utc_account_get_application_capability_support();
8264 #endif
8265
8266 #if 1
8267         utc_account_delete_by_id();
8268         utc_account_delete_by_user_name();
8269         utc_account_delete_by_package_name();
8270 #endif
8271
8272 #endif
8273
8274         return 0;
8275 }
8276