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