- ret = account_set_source(account, "update-URUSA inc.");
- if(ret != ACCOUNT_ERROR_NONE)
- {
- SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
- }
-
- int i;
-
- for(i=0;i<USER_TXT_CNT;i++)
- {
- ret = account_set_user_text(account, i, "update-user txt");
- if(ret != ACCOUNT_ERROR_NONE)
- {
- SECURE_LOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
- }
-
- }
-
- for(i=0;i<USER_INT_CNT;i++)
- {
- ret = account_set_user_int(account, i, 999);
- if(ret != ACCOUNT_ERROR_NONE)
- {
- SECURE_LOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
- }
- }
-
- ret = account_set_capability(account, ACCOUNT_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_DISABLED);
- ret = account_set_capability(account, ACCOUNT_CAPABILITY_CALENDAR, ACCOUNT_CAPABILITY_DISABLED);
- ret = account_set_capability(account, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_DISABLED);
- ret = account_set_capability(account, ACCOUNT_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_DISABLED);
- ret = account_set_capability(account, ACCOUNT_CAPABILITY_EMAIL, ACCOUNT_CAPABILITY_DISABLED);
- ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_DISABLED);
- ret = account_set_capability(account, ACCOUNT_CAPABILITY_VOIP, ACCOUNT_CAPABILITY_DISABLED);
- ret = account_set_capability(account, ACCOUNT_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_DISABLED);
- ret = account_set_capability(account, ACCOUNT_CAPABILITY_MOBILE_TRACKER, ACCOUNT_CAPABILITY_DISABLED);
-
- ret = account_update_to_db_by_user_name(account, user_name, package_name);
- if(ret != ACCOUNT_ERROR_NONE)
- {
- SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
- return;
- }
-
- ret = account_destroy(account);
- if(ret != ACCOUNT_ERROR_NONE)
- {
- SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
- }
-
- ret = account_disconnect();
- if(ret != ACCOUNT_ERROR_NONE)
- {
- SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
- }
+ ret = account_connect();
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_create(&account);
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_set_user_name(account, "update-tarun.kr");
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_set_display_name(account, "update-Tarun Kumar");
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_set_domain_name(account, "update-Samsung electronics");
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_set_email_address(account, "update-tarun@gmail.com");
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_set_package_name(account, "update-com.samsung.twiter");
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_set_icon_path(account, "update-icon-path");
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_set_access_token(account, "update-ACCESSTOKEN");
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+ ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE );
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_set_source(account, "update-URUSA inc.");
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ int i;
+
+ for(i=0;i<USER_TXT_CNT;i++)
+ {
+ ret = account_set_user_text(account, i, "update-user txt");
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ }
+ }
+
+ for(i=0;i<USER_INT_CNT;i++)
+ {
+ ret = account_set_user_int(account, i, 999);
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ }
+ }
+
+ ret = account_set_capability(account, ACCOUNT_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_DISABLED);
+ ret = account_set_capability(account, ACCOUNT_CAPABILITY_CALENDAR, ACCOUNT_CAPABILITY_DISABLED);
+ ret = account_set_capability(account, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_DISABLED);
+ ret = account_set_capability(account, ACCOUNT_CAPABILITY_VIDEO, ACCOUNT_CAPABILITY_DISABLED);
+ ret = account_set_capability(account, ACCOUNT_CAPABILITY_EMAIL, ACCOUNT_CAPABILITY_DISABLED);
+ ret = account_set_capability(account, ACCOUNT_CAPABILITY_STATUS_POST, ACCOUNT_CAPABILITY_DISABLED);
+ ret = account_set_capability(account, ACCOUNT_CAPABILITY_VOIP, ACCOUNT_CAPABILITY_DISABLED);
+ ret = account_set_capability(account, ACCOUNT_CAPABILITY_SAMSUNG_APPS, ACCOUNT_CAPABILITY_DISABLED);
+ ret = account_set_capability(account, ACCOUNT_CAPABILITY_MOBILE_TRACKER, ACCOUNT_CAPABILITY_DISABLED);
+
+ ret = account_update_to_db_by_user_name(account, user_name, package_name);
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ return;
+ }
+
+ ret = account_destroy(account);
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }
+
+ ret = account_disconnect();
+ if(ret != ACCOUNT_ERROR_NONE)
+ {
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ }