SET(LIBDIR "\${prefix}/lib")
SET(INCLUDEDIR "\${prefix}/include ")
SET(VERSION_MAJOR 0)
-SET(VERSION "${VERSION_MAJOR}.2.66")
+SET(VERSION "${VERSION_MAJOR}.2.97")
SET(SRCS
src/account.c
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED sqlite3 dlog db-util glib-2.0 capi-base-common vconf pkgmgr-info aul)
+pkg_check_modules(pkgs REQUIRED sqlite3 dlog db-util glib-2.0 capi-base-common vconf pkgmgr-info aul libsmack)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF ("${ARCH}" STREQUAL "arm")
- ADD_DEFINITIONS("-DTARGET_ARM")
- MESSAGE("[TARGET] Compile")
-ELSE ("${ARCH}" STREQUAL "arm")
- ADD_DEFINITIONS("-DTARGET_I386")
- MESSAGE("[i386] Compile")
-ENDIF ("${ARCH}" STREQUAL "arm")
-
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall")
SET(CMAKE_LDFLAGS "-Wl,-zdefs")
+++ /dev/null
-Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
-Except as noted, this software is licensed under Apache License, Version 2.
-Please, see the LICENSE.APLv2 file for Apache License, Version 2 terms and conditions.
+++ /dev/null
-#!/bin/sh
-
-. ./config
-export TET_INSTALL_PATH=$TET_INSTALL_HOST_PATH # tetware root path
-export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path
-export PATH=$TET_TARGET_PATH/bin:$PATH
-export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
-export TET_ROOT=$TET_TARGET_PATH
+++ /dev/null
-#!/bin/sh
-. ./config
-export TET_INSTALL_PATH=$TET_INSTALL_TARGET_PATH # path to path
-export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
-export PATH=$TET_TARGET_PATH/bin:$PATH
-export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
-export TET_ROOT=$TET_TARGET_PATH
+++ /dev/null
-#!/bin/sh
-
-. ./_export_env.sh # setting environment variables
-
-export TET_SUITE_ROOT=`pwd`
-FILE_NAME_EXTENSION=`date +%s`
-
-RESULT_DIR=results
-HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html
-JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal
-
-mkdir -p $RESULT_DIR
-
-tcc -c -p ./
-tcc -b -j $JOURNAL_RESULT -p ./
-grw -c 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
+++ /dev/null
-#!/bin/sh
-
-. ./_export_env.sh # setting environment variables
-
-export TET_SUITE_ROOT=`pwd`
-RESULT_DIR=results
-
-tcc -c -p ./ # executing tcc, with clean option (-c)
-rm -r $RESULT_DIR
-rm -r tet_tmp_dir
-rm testcase/tet_captured
+++ /dev/null
-TET_INSTALL_HOST_PATH=/home/user/git_new/DTS/TETware
-TET_INSTALL_TARGET_PATH=/mnt/nfs/DTS/TETware
+++ /dev/null
-#!/bin/sh
-
-. ./_export_target_env.sh # setting environment variables
-
-export TET_INSTALL_PATH=/mnt/nfs/TETWare
-export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
-export PATH=$TEST_TARGET_PATH/bin:$PATH
-export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
-export TET_ROOT=$TET_TARGET_PATH
-export TET_SUITE_ROOT=`pwd`
-FILE_NAME_EXTENSION=`date +%s`
-
-RESULT_DIR=results
-HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html
-JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal
-
-mkdir -p $RESULT_DIR
-
-tcc -e -j $JOURNAL_RESULT -p ./
-grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
+++ /dev/null
-CC ?= gcc
-
-C_FILES = $(shell ls *.c)
-
-PKGS = accounts-svc dlog gthread-2.0
-
-LDFLAGS = `pkg-config --libs $(PKGS)`
-LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
-LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
-LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
-
-CFLAGS = -I. `pkg-config --cflags $(PKGS)`
-CFLAGS += -I$(TET_ROOT)/inc/tet3
-CFLAGS += -Wall
-
-TCS := $(shell ls -1 *.c | cut -d. -f1)
-
-all: $(TCS)
-
-%: %.c
- $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
-
-clean:
- rm -f $(TCS)
+++ /dev/null
-/testcase/utc_account
-
-
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <tet_api.h>
-#include <account.h>
-#include <account-types.h>
-#include <account-error.h>
-
-#define TEST_PACKAGE_NAME "com.samsung.facebook"
-
-static void startup(void);
-static void cleanup(void);
-
-void (*tet_startup)(void) = startup;
-void (*tet_cleanup)(void) = cleanup;
-
-static void utc_account_connect_positive(void);
-static void utc_account_connect_negative(void);
-static void utc_account_create_positive(void);
-static void utc_account_create_negative(void);
-static void utc_account_destroy_positive(void);
-static void utc_account_destroy_negative(void);
-static void utc_account_insert_to_db_positive(void);
-static void utc_account_insert_to_db_negative(void);
-static void utc_account_delete_from_db_by_id_positive(void);
-static void utc_account_delete_from_db_by_id_negative(void);
-static void utc_account_delete_from_db_by_user_name_positive(void);
-static void utc_account_delete_from_db_by_user_name_negative(void);
-static void utc_account_delete_from_db_by_package_name_positive(void);
-static void utc_account_delete_from_db_by_package_name_negative(void);
-static void utc_account_update_to_db_by_id_positive(void);
-static void utc_account_update_to_db_by_id_negative(void);
-static void utc_account_update_to_db_by_user_name_positive(void);
-static void utc_account_update_to_db_by_user_name_negative(void);
-static void utc_account_update_sync_status_by_id_positive(void);
-static void utc_account_update_sync_status_by_id_negative(void);
-static void utc_account_get_account_id_positive(void);
-static void utc_account_get_account_id_negative(void);
-static void utc_account_get_user_name_positive(void);
-static void utc_account_get_user_name_negative(void);
-static void utc_account_set_user_name_positive(void);
-static void utc_account_set_user_name_negative(void);
-static void utc_account_get_display_name_positive(void);
-static void utc_account_get_display_name_negative(void);
-static void utc_account_set_display_name_positive(void);
-static void utc_account_set_display_name_negative(void);
-static void utc_account_get_capability_positive(void);
-static void utc_account_get_capability_negative(void);
-static void utc_account_set_capability_positive(void);
-static void utc_account_set_capability_negative(void);
-static void utc_account_get_icon_path_positive(void);
-static void utc_account_get_icon_path_negative(void);
-static void utc_account_set_icon_path_positive(void);
-static void utc_account_set_icon_path_negative(void);
-static void utc_account_get_domain_name_positive(void);
-static void utc_account_get_domain_name_negative(void);
-static void utc_account_set_domain_name_positive(void);
-static void utc_account_set_domain_name_negative(void);
-static void utc_account_get_email_address_positive(void);
-static void utc_account_get_email_address_negative(void);
-static void utc_account_set_email_address_positive(void);
-static void utc_account_set_email_address_negative(void);
-static void utc_account_get_package_name_positive(void);
-static void utc_account_get_package_name_negative(void);
-static void utc_account_set_package_name_positive(void);
-static void utc_account_set_package_name_negative(void);
-static void utc_account_get_access_token_positive(void);
-static void utc_account_get_access_token_negative(void);
-static void utc_account_set_access_token_positive(void);
-static void utc_account_set_access_token_negative(void);
-static void utc_account_get_user_text_positive(void);
-static void utc_account_get_user_text_negative(void);
-static void utc_account_set_user_text_positive(void);
-static void utc_account_set_user_text_negative(void);
-static void utc_account_get_user_int_positive(void);
-static void utc_account_get_user_int_negative(void);
-static void utc_account_set_user_int_positive(void);
-static void utc_account_set_user_int_negative(void);
-static void utc_account_get_auth_type_positive(void);
-static void utc_account_get_auth_type_negative(void);
-static void utc_account_set_auth_type_positive(void);
-static void utc_account_set_auth_type_negative(void);
-static void utc_account_get_secret_positive(void);
-static void utc_account_get_secret_negative(void);
-static void utc_account_set_secret_positive(void);
-static void utc_account_set_secret_negative(void);
-static void utc_account_get_sync_support_positive(void);
-static void utc_account_get_sync_support_negative(void);
-static void utc_account_set_sync_support_positive(void);
-static void utc_account_set_sync_support_negative(void);
-static void utc_account_get_source_positive(void);
-static void utc_account_get_source_negative(void);
-static void utc_account_set_source_positive(void);
-static void utc_account_set_source_negative(void);
-static void utc_account_foreach_account_from_db_positive(void);
-static void utc_account_foreach_account_from_db_negative(void);
-static void utc_account_query_account_by_account_id_positive(void);
-static void utc_account_query_account_by_account_id_negative(void);
-static void utc_account_query_account_by_user_name_positive(void);
-static void utc_account_query_account_by_user_name_negative(void);
-static void utc_account_query_account_by_package_name_positive(void);
-static void utc_account_query_account_by_package_name_negative(void);
-static void utc_account_query_account_by_capability_positive(void);
-static void utc_account_query_account_by_capability_negative(void);
-static void utc_account_query_capability_by_account_id_positive(void);
-static void utc_account_query_capability_by_account_id_negative(void);
-static void utc_account_get_total_count_from_db_positive(void);
-static void utc_account_get_total_count_from_db_negative(void);
-
-
-struct tet_testlist tet_testlist[] = {
- {utc_account_connect_positive, 1},
- //{utc_account_connect_negative, 1},
- {utc_account_create_positive, 1},
- {utc_account_create_negative, 1},
- {utc_account_destroy_positive, 1},
- //{utc_account_destroy_negative, 1},
- {utc_account_insert_to_db_positive, 1},
- {utc_account_insert_to_db_negative, 1},
- {utc_account_update_to_db_by_id_positive, 1},
- {utc_account_update_to_db_by_id_negative, 1},
- {utc_account_update_to_db_by_user_name_positive, 1},
- {utc_account_update_to_db_by_user_name_negative, 1},
- {utc_account_update_sync_status_by_id_positive, 1},
- {utc_account_update_sync_status_by_id_negative, 1},
- {utc_account_get_account_id_positive, 1},
- {utc_account_get_account_id_negative, 1},
- {utc_account_get_user_name_positive, 1},
- {utc_account_get_user_name_negative, 1},
- {utc_account_set_user_name_positive, 1},
- {utc_account_set_user_name_negative, 1},
- {utc_account_get_display_name_positive, 1},
- {utc_account_get_display_name_negative, 1},
- {utc_account_set_display_name_positive, 1},
- {utc_account_set_display_name_negative, 1},
- {utc_account_get_capability_positive, 1},
- {utc_account_get_capability_negative, 1},
- {utc_account_set_capability_positive, 1},
- {utc_account_set_capability_negative, 1},
- {utc_account_get_icon_path_positive, 1},
- {utc_account_get_icon_path_negative, 1},
- {utc_account_set_icon_path_positive, 1},
- {utc_account_set_icon_path_negative, 1},
- {utc_account_get_domain_name_positive, 1},
- {utc_account_get_domain_name_negative, 1},
- {utc_account_set_domain_name_positive, 1},
- {utc_account_set_domain_name_negative, 1},
- {utc_account_get_email_address_positive, 1},
- {utc_account_get_email_address_negative, 1},
- {utc_account_set_email_address_positive, 1},
- {utc_account_set_email_address_negative, 1},
- {utc_account_get_package_name_positive, 1},
- {utc_account_get_package_name_negative, 1},
- {utc_account_set_package_name_positive, 1},
- {utc_account_set_package_name_negative, 1},
- {utc_account_get_access_token_positive, 1},
- {utc_account_get_access_token_negative, 1},
- {utc_account_set_access_token_positive, 1},
- {utc_account_set_access_token_negative, 1},
- {utc_account_get_user_text_positive, 1},
- {utc_account_get_user_text_negative, 1},
- {utc_account_set_user_text_positive, 1},
- {utc_account_set_user_text_negative, 1},
- {utc_account_get_user_int_negative, 1},
- {utc_account_get_user_int_negative, 1},
- {utc_account_set_user_int_negative, 1},
- {utc_account_set_user_int_negative, 1},
- {utc_account_get_auth_type_positive, 1},
- {utc_account_get_auth_type_negative, 1},
- {utc_account_set_auth_type_positive, 1},
- {utc_account_set_auth_type_negative, 1},
- {utc_account_get_secret_positive, 1},
- {utc_account_get_secret_negative, 1},
- {utc_account_set_secret_positive, 1},
- {utc_account_set_secret_negative, 1},
- {utc_account_get_sync_support_positive, 1},
- {utc_account_get_sync_support_negative, 1},
- {utc_account_set_sync_support_positive, 1},
- {utc_account_set_sync_support_negative, 1},
- {utc_account_get_source_positive, 1},
- {utc_account_get_source_negative, 1},
- {utc_account_set_source_positive, 1},
- {utc_account_set_source_negative, 1},
- {utc_account_foreach_account_from_db_positive, 1},
- {utc_account_foreach_account_from_db_negative, 1},
- {utc_account_query_account_by_account_id_positive, 1},
- {utc_account_query_account_by_account_id_negative, 1},
- {utc_account_query_account_by_user_name_positive, 1},
- {utc_account_query_account_by_user_name_negative, 1},
- {utc_account_query_account_by_package_name_positive, 1},
- {utc_account_query_account_by_package_name_negative, 1},
- {utc_account_query_account_by_capability_positive, 1},
- {utc_account_query_account_by_capability_negative, 1},
- {utc_account_query_capability_by_account_id_positive, 1},
- {utc_account_query_capability_by_account_id_negative, 1},
- {utc_account_get_total_count_from_db_positive, 1},
- {utc_account_get_total_count_from_db_negative, 1},
- {utc_account_delete_from_db_by_id_positive, 1},
- {utc_account_delete_from_db_by_id_negative, 1},
- {utc_account_delete_from_db_by_user_name_positive, 1},
- {utc_account_delete_from_db_by_user_name_negative, 1},
- {utc_account_delete_from_db_by_package_name_positive, 1},
- {utc_account_delete_from_db_by_package_name_negative, 1},
- /* TODO : Add more test case */
- {NULL, 0},
-};
-
-static void startup(void)
-{
-
-}
-
-
-static void cleanup(void)
-{
- /* end of TC */
-}
-
-static void _account_free_text(char *text)
-{
- if (text) {
- free(text);
- text = NULL;
- }
-}
-
-// START example for libaccounts-svc API test case
-
-static void utc_account_connect_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- int ret = ACCOUNT_ERROR_NONE;
-
- ret = account_connect();
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
-}
-
-static void utc_account_connect_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- int ret = ACCOUNT_ERROR_NONE;
-
- ret = rename("/opt/dbspace/.account.db", "/opt/dbspace/.account-tmp.db");
-
- ret = rename("/opt/dbspace/.account.db-journal", "/opt/dbspace/.account-tmp.db-journal");
-
- ret = account_connect();
-
- if ( ret == ACCOUNT_ERROR_DB_NOT_OPENED ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = rename("/opt/dbspace/.account-tmp.db", "/opt/dbspace/.account.db");
- ret = rename("/opt/dbspace/.account-tmp.db-journal", "/opt/dbspace/.account.db-journal");
-
- ret = account_disconnect();
- if ( ret != ACCOUNT_ERROR_NONE) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_destroy_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- int ret = ACCOUNT_ERROR_NONE;
-
- ret = account_connect();
- if ( ret != ACCOUNT_ERROR_NONE) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
-}
-
-static void utc_account_destroy_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- int ret = ACCOUNT_ERROR_NONE;
-
- ret = rename("/opt/dbspace/.account.db", "/opt/dbspace/.account-tmp.db");
-
- ret = rename("/opt/dbspace/.account.db-journal", "/opt/dbspace/.account-tmp.db-journal");
-
- ret = account_disconnect();
-
- if ( ret == ACCOUNT_ERROR_DB_NOT_OPENED ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = rename("/opt/dbspace/.account-tmp.db", "/opt/dbspace/.account.db");
- ret = rename("/opt/dbspace/.account-tmp.db-journal", "/opt/dbspace/.account.db-journal");
-}
-
-static void utc_account_create_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int ret = ACCOUNT_ERROR_NONE;
-
- ret = account_connect();
- if ( ret != ACCOUNT_ERROR_NONE) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
- if ( ret != ACCOUNT_ERROR_NONE) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
- if ( ret != ACCOUNT_ERROR_NONE) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_create_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int ret = ACCOUNT_ERROR_NONE;
-
- ret = account_connect();
- if ( ret != ACCOUNT_ERROR_NONE) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
- if ( ret != ACCOUNT_ERROR_NONE) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_insert_to_db_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_user_name(account, "tarun.kr");
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_package_name(account, TEST_PACKAGE_NAME);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_insert_to_db_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(NULL, &account_id);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_display_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_display_name(account, "tarun.kr");
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_display_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_display_name(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_user_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_user_name(account, "tarun.kr");
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_user_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_user_name(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_icon_path_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_icon_path(account, "icon-path");
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_icon_path_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_icon_path(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_domain_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_domain_name(account, "domain-name");
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_domain_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_domain_name(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_email_address_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_email_address(account, "email-address");
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_email_address_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_email_address(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_source_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_source(account, "source");
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_source_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_source(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_package_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_package_name(account, "package_name");
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_package_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_package_name(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_access_token_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_access_token(account, "access_token");
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_access_token_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_access_token(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_auth_type_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_auth_type(account, ACCOUNT_AUTH_TYPE_XAUTH);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_auth_type_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_auth_type(account, -999);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_secret_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_secret(account, ACCOUNT_SECRECY_INVISIBLE);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_secret_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_secret(account, -999);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_sync_support_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_sync_support(account, ACCOUNT_SYNC_STATUS_IDLE);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_sync_support_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- ret = account_set_sync_support(account, -999);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_user_text_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- int i;
- for ( i = 0; i < 5; i++)
- ret = account_set_user_text(account, i, "user-text");
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_user_text_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- int i;
-
- for (i = 0; i < 5; i++)
- ret = account_set_user_text(account, i, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_user_int_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- int i;
- for (i = 0; i < 5; i++)
- ret = account_set_user_int(account, i, 999);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_user_int_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- int i;
- for (i = 0; i < 5; i++)
- ret = account_set_user_int(NULL, i, 999);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_capability_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_capability(account, ACCOUNT_CAPABILITY_CALENDAR, ACCOUNT_CAPABILITY_ENABLED);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_set_capability_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_capability(account, -100, -5);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_display_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- char * display_name;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_display_name(account, &display_name);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- _account_free_text(display_name);
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_display_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_display_name(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_account_id_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_account_id(account, &account_id);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_account_id_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_account_id(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_user_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- char *user_name;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_user_name(account, &user_name);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- _account_free_text(user_name);
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_user_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_user_name(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_icon_path_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- char *icon_path;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_icon_path(account, &icon_path);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- _account_free_text(icon_path);
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_icon_path_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_icon_path(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_domain_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- char *domain_name;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_domain_name(account, &domain_name);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- _account_free_text(domain_name);
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_domain_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_domain_name(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_email_address_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- char *email_address;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_email_address(account, &email_address);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- _account_free_text(email_address);
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_email_address_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_email_address(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_source_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- char *source;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_source(account, &source);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- _account_free_text(source);
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_source_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_source(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_package_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- char *package_name;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_package_name(account, &package_name);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- _account_free_text(package_name);
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_package_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_package_name(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_access_token_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- char *access_token;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_access_token(account, &access_token);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- _account_free_text(access_token);
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_access_token_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_access_token(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_auth_type_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int auth_type;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_auth_type(account, &auth_type);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_auth_type_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_auth_type(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_secret_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- account_secrecy_state_e secret;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_secret(account, &secret);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_sync_support_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- account_sync_state_e sync_support;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_sync_support(account, &sync_support);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_secret_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_secret(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_sync_support_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_sync_support(account, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_user_text_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- char *user_text;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- int i;
- for (i = 0; i < 5; i++) {
- ret = account_get_user_text(account, i, &user_text);
- _account_free_text(user_text);
- }
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_user_text_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- int i;
- for (i = 0; i < 5; i++)
- ret = account_get_user_text(account, i, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_user_int_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int user_int;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- int i;
- for (i = 0; i < 5; i++)
- ret = account_get_user_int(account, i, &user_int);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_insert_to_db(account, &account_id);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_user_int_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
- int i;
- for (i = 0; i < 5; i++)
- ret = account_get_user_int(NULL, i, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-bool capability_call_back(account_capability_type_e capability_type, account_capability_state_e capability_state, void *user_data)
-{
-
-}
-
-static void utc_account_get_capability_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_capability(account, capability_call_back, NULL);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_capability_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_capability(account, NULL, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-bool account_call_back(account_h account, void *user_data)
-{
-
-}
-
-static void utc_account_foreach_account_from_db_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_foreach_account_from_db(account_call_back, NULL);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_foreach_account_from_db_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_foreach_account_from_db(NULL, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_query_account_by_account_id_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(1, &account);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_query_account_by_account_id_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_account_id(-999, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_query_account_by_user_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_user_name(account_call_back, "tarun.kr", NULL);
-
- if ( ret == ACCOUNT_ERROR_NONE || ret == ACCOUNT_ERROR_RECORD_NOT_FOUND) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_query_account_by_user_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_user_name(account_call_back, NULL, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_query_account_by_package_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_package_name(account_call_back, TEST_PACKAGE_NAME, NULL);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_query_account_by_package_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_package_name(account_call_back, NULL, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_query_account_by_capability_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_capability(account_call_back, ACCOUNT_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED, NULL);
-
- if ( ret == ACCOUNT_ERROR_NONE || ret == ACCOUNT_ERROR_RECORD_NOT_FOUND) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_query_account_by_capability_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_account_by_capability(account_call_back, -999, -999, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_query_capability_by_account_id_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_capability_by_account_id(capability_call_back, 1, NULL);
-
- if ( ret == ACCOUNT_ERROR_NONE || ret == ACCOUNT_ERROR_RECORD_NOT_FOUND) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_query_capability_by_account_id_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_query_capability_by_account_id(capability_call_back, -1, NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_total_count_from_db_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int *count;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_total_count_from_db(&count);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_get_total_count_from_db_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_get_total_count_from_db(NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_update_sync_status_by_id_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_update_sync_status_by_id(1, ACCOUNT_SYNC_STATUS_IDLE);
-
- if ( ret == ACCOUNT_ERROR_NONE || ret == ACCOUNT_ERROR_RECORD_NOT_FOUND) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_update_sync_status_by_id_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_update_sync_status_by_id(-1, ACCOUNT_SYNC_STATUS_IDLE);
-
- if ( ret == ACCOUNT_ERROR_RECORD_NOT_FOUND || ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
-}
-
-static void utc_account_delete_from_db_by_id_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_delete_from_db_by_id(1);
-
- if ( ret == ACCOUNT_ERROR_NONE || ret == ACCOUNT_ERROR_RECORD_NOT_FOUND) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_delete_from_db_by_id_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_delete_from_db_by_id(-1);
-
- if ( ret == ACCOUNT_ERROR_RECORD_NOT_FOUND || ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
-}
-
-static void utc_account_delete_from_db_by_user_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_delete_from_db_by_user_name("tarun.kr", TEST_PACKAGE_NAME);
-
- if ( ret == ACCOUNT_ERROR_NONE || ret == ACCOUNT_ERROR_RECORD_NOT_FOUND) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_delete_from_db_by_user_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_delete_from_db_by_user_name(NULL, TEST_PACKAGE_NAME);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_delete_from_db_by_package_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_delete_from_db_by_package_name(TEST_PACKAGE_NAME);
-
- if ( ret == ACCOUNT_ERROR_NONE || ret == ACCOUNT_ERROR_RECORD_NOT_FOUND) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_delete_from_db_by_package_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_delete_from_db_by_package_name(NULL);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_update_to_db_by_id_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_user_name(account, "update-tarun.kr");
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_package_name(account, TEST_PACKAGE_NAME);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_update_to_db_by_id(account, 1);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_update_to_db_by_id_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_update_to_db_by_id(account, -1);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_update_to_db_by_user_name_positive(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_user_name(account, "update-tarun.kr");
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_set_package_name(account, TEST_PACKAGE_NAME);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_update_to_db_by_user_name(account, "tarun.kr", TEST_PACKAGE_NAME);
-
- if ( ret == ACCOUNT_ERROR_NONE ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-static void utc_account_update_to_db_by_user_name_negative(void)
-{
- const char *API_NAME = __FUNCTION__;
- account_h account;
- int account_id = -1;
- int ret = ACCOUNT_ERROR_NONE;
- ret = account_connect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_create(&account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_update_to_db_by_user_name(account, NULL, TEST_PACKAGE_NAME);
-
- if ( ret == ACCOUNT_ERROR_INVALID_PARAMETER ) {
- dts_pass(API_NAME, "passed");
- } else {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_destroy(account);
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-
- ret = account_disconnect();
-
- if ( ret != ACCOUNT_ERROR_NONE ) {
- dts_fail(API_NAME, "failed");
- }
-}
-
-// END of example for libaccounts-svc API unit test
-
+++ /dev/null
-all
- ^TEST
-##### Scenarios for TEST #####
-
-# Test scenario
-TEST
- :include:/testcase/tslist
+++ /dev/null
-TET_OUTPUT_CAPTURE=True # capture option for build operation checking
-TET_BUILD_TOOL=make # build with using make command
-TET_BUILD_FILE=-f Makefile # execution file (Makefile) for build
-TET_API_COMPLIANT=True # use TET API in Test Case ?
-TET_PASS_TC_NAME=True # report passed TC name in Journal file?
+++ /dev/null
-TET_OUTPUT_CAPTURE=True # capture option
-TET_CLEAN_TOOL= make clean # clean tool
-TET_CLEAN_FILE= Makefile # file for clean
-TET_API_COMPLIANT=True # TET API useage
-TET_PASS_TC_NAME=True # showing name , passed TC
+++ /dev/null
-TET_OUTPUT_CAPTURE=True # capturing execution or not
-TET_EXEC_TOOL= # ex) exec : execution tool set up/ Optional
-TET_EXEC_FILE= # ex) exectool : execution file/ Optional
-TET_API_COMPLIANT=True # Test case or Tool usesTET API?
-TET_PASS_TC_NAME=True # showing Passed TC name ?
Name: accounts-svc
Description: Account DB library
Version: @VERSION@
-Requires: sqlite3 dlog db-util glib-2.0 capi-base-common vconf
+Requires: capi-base-common
Libs: -L${libdir} -laccounts-svc
Cflags: -I${includedir}
--- /dev/null
+/*
+ *
+ * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Wonyoung Lee <wy1115.lee@samsung.com>, Sungchan Kim <sungchan81.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __ACCOUNT_H__
+#define __ACCOUNT_H__
+
+/**
+ * @defgroup CAPI_ACCOUNT_MANAGER_MODULE Account Manager
+ * @ingroup CAPI_SOCIAL_FRAMEWORK
+ * @brief The account APIs provide CRUD (Create, Read, Update, Delete) account management functionality.
+ *
+ * @section CAPI_ACCOUNT_MANAGER_HEADER Required Header
+ * \#include <account.h>
+ *
+ * @section CAPI_ACCOUNT_MANAGER_MODULE_OVERVIEW Overview
+ * The account APIs is separated into two major sections:
+ * 1. Registering an account provider while an application is installed. This information will be used for the Add account screen.
+ * 2. Adding an account information when an application signs in successfully to share the account information to the Tizen system. This information will be shown in the Tizen settings account menu.
+
+ * The APIs of both of the sections consist of the following functionality:
+ * - Create an account or account provider
+ * - Update an account or account provider(Only available for the creator)
+ * - Delete an account or account provider(Only available for the creator)
+ * - Read an account or account provider with some filter
+*/
+
+#endif /* __ACCOUNT_H__ */
/*
- * account
*
* Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
*
*/
/**
- * @file account-error.h
- * @brief ACCOUNT error definitions.
+ * @file account-error.h
+ * @brief This file contains ACCOUNT error definitions.
*/
-//#define TIZEN_ERROR_ACCOUNT_CLASS SLP_ERROR_SOCIAL_CLASS | 0x90
+//#define TIZEN_ERROR_ACCOUNT_CLASS SLP_ERROR_ACCOUNT | 0x90
/**
- * @brief Enumerations of error codes for ACOUNT APIs.
+ * @brief Enumerations of error codes for ACCOUNT APIs.
+ * @since_tizen 2.3
*/
typedef enum
{
+ ACCOUNT_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
+ ACCOUNT_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ ACCOUNT_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
- ACCOUNT_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
- ACCOUNT_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
- ACCOUNT_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+ ACCOUNT_ERROR_DUPLICATED = TIZEN_ERROR_ACCOUNT | 0x01, /**< Same user name exists in your application */
+ ACCOUNT_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< Empty data */
- ACCOUNT_ERROR_DUPLICATED = TIZEN_ERROR_SOCIAL_CLASS | 0x01,
- ACCOUNT_ERROR_NO_DATA = TIZEN_ERROR_SOCIAL_CLASS | 0x02,
-
- ACCOUNT_ERROR_RECORD_NOT_FOUND = TIZEN_ERROR_SOCIAL_CLASS | 0x03,
- ACCOUNT_ERROR_DB_FAILED = TIZEN_ERROR_SOCIAL_CLASS | 0x04,
- ACCOUNT_ERROR_DB_NOT_OPENED = TIZEN_ERROR_SOCIAL_CLASS | 0x05,
- ACCOUNT_ERROR_QUERY_SYNTAX_ERROR = TIZEN_ERROR_SOCIAL_CLASS | 0x06,
- ACCOUNT_ERROR_ITERATOR_END = TIZEN_ERROR_SOCIAL_CLASS | 0x07,
- ACCOUNT_ERROR_NOTI_FAILED = TIZEN_ERROR_SOCIAL_CLASS | 0x08,
- ACCOUNT_ERROR_PERMISSION_DENIED = TIZEN_ERROR_SOCIAL_CLASS | 0x09,
- ACCOUNT_ERROR_XML_PARSE_FAILED = TIZEN_ERROR_SOCIAL_CLASS | 0x0a,
- ACCOUNT_ERROR_XML_FILE_NOT_FOUND = TIZEN_ERROR_SOCIAL_CLASS | 0x0b,
- ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL = TIZEN_ERROR_SOCIAL_CLASS | 0x0c,
- ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER = TIZEN_ERROR_SOCIAL_CLASS | 0x0d,
- ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE = TIZEN_ERROR_SOCIAL_CLASS | 0x0e,
+ ACCOUNT_ERROR_RECORD_NOT_FOUND = TIZEN_ERROR_ACCOUNT | 0x03, /**< Related record does not exist */
+ ACCOUNT_ERROR_DB_FAILED = TIZEN_ERROR_ACCOUNT | 0x04, /**< DB operation failed */
+ ACCOUNT_ERROR_DB_NOT_OPENED = TIZEN_ERROR_ACCOUNT | 0x05, /**< DB is not connected */
+ ACCOUNT_ERROR_QUERY_SYNTAX_ERROR = TIZEN_ERROR_ACCOUNT | 0x06, /**< DB query syntax error */
+ ACCOUNT_ERROR_ITERATOR_END = TIZEN_ERROR_ACCOUNT | 0x07, /**< Iterator has reached the end */
+ ACCOUNT_ERROR_NOTI_FAILED = TIZEN_ERROR_ACCOUNT | 0x08, /**< Notification failed */
+ ACCOUNT_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+ ACCOUNT_ERROR_XML_PARSE_FAILED = TIZEN_ERROR_ACCOUNT | 0x0a, /**< XML parse failed */
+ ACCOUNT_ERROR_XML_FILE_NOT_FOUND = TIZEN_ERROR_ACCOUNT | 0x0b, /**< XML file does not exist */
+ ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL = TIZEN_ERROR_ACCOUNT | 0x0c, /**< Subscription failed */
+ ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER = TIZEN_ERROR_ACCOUNT | 0x0d, /**< Account provider is not registered */
+ ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE = TIZEN_ERROR_ACCOUNT | 0x0e, /**< Multiple accounts are not supported */
+ ACCOUNT_ERROR_DATABASE_BUSY = TIZEN_ERROR_ACCOUNT | 0x10, /**< SQLite busy handler expired */
} account_error_e;
/**
#define __ACCOUNT_PRIVATE_TYPES_H__
-/*#include <glib.h>*/
#ifdef __cplusplus
extern "C"
{
#define LOG_TAG "ACCOUNT"
#define ACCOUNT_VERBOSE(fmt, arg...) \
- LOGV(": " fmt "\n", ##arg);
+ LOGD(": " fmt "\n", ##arg);
#define ACCOUNT_DEBUG(fmt, arg...) \
LOGD(": " fmt "\n", ##arg);
-#define ACCOUNT_INFO(fmt, arg...) \
- LOGI(": " fmt "\n", ##arg);
-#define ACCOUNT_WARNING(fmt, arg...) \
- LOGW(": " fmt "\n", ##arg);
#define ACCOUNT_ERROR(fmt, arg...) \
- LOGW(": " fmt "\n", ##arg);
+ LOGE(": " fmt "\n", ##arg);
#define ACCOUNT_FATAL(fmt, arg...) \
LOGF(": " fmt "\n", ##arg);
+#define ACCOUNT_SLOGD(fmt, arg...) \
+ SECURE_LOGD(": " fmt "\n", ##arg);
+#define ACCOUNT_SLOGI(fmt, arg...) \
+ SECURE_LOGI(": " fmt "\n", ##arg);
+#define ACCOUNT_SLOGE(fmt, arg...) \
+ SECURE_LOGE(": " fmt "\n", ##arg);
#define ACCOUNT_RETURN_VAL(eval, expr, ret_val, X)\
if (!(eval)) \
{\
expr; \
- if (1)\
- {ACCOUNT_ERROR X;}\
return ret_val;\
} else {;}
{\
expr; \
error_code = (error_val);\
- if (1)\
- {ACCOUNT_ERROR X;}\
goto CATCH;\
} else {;}
ptr = NULL; \
} \
-#define ACCOUNT_DB_NAME "/opt/dbspace/.account.db"
+#define ACCOUNT_DB_NAME "/opt/usr/dbspace/.account.db"
#define ACCOUNT_TABLE "account"
#define CAPABILITY_TABLE "capability"
#define ACCOUNT_CUSTOM_TABLE "account_custom"
#define ACCOUNT_SQL_LEN_MAX 1024
#define ACCOUNT_TABLE_TOTAL_COUNT 6
+#define FACEBOOK_PKG_NAME "com.samsung.facebook"
+#define EMAIL_PKG_NAME "email-setting-efl"
+#define EXCHANGE_PKG_NAME "activesync-ui"
+#define IMS_SERVICE_PKG_NAME "ims-service"
+#define SAMSUNGACCOUNTFRONT_PKG_NAME "com.samsung.samsung-account-front"
+//#define SAMSUNGACCOUNT_PKG_NAME "gr47by21a5.SamsungAccount"
+#define SAMSUNGACCOUNT_PKG_NAME "com.samsung.samsungaccount"
+#define CHATON_PKG_NAME "xnq5eh9vop.ChatON"
+#define DROPBOX_PKG_NAME "com.samsung.dropbox"
+#define SYNCHRONISE_PKG_NAME "setting-synchronise-efl"
+
+#define USER_TXT_CNT 5
+#define USER_INT_CNT 5
+
+
+/* account uri list */
+#define ACCOUNT_DATA_SERVICE_PROVIDER "http://tizen.org/account/data/service_provider"
+#define ACCOUNT_OPERATION_SIGNIN_OLD "http://tizen.org/account/operation/signin"
+
+// private account operation type
+#define ACCOUNT_OPERATION_FMM "http://tizen.org/account/operation/fmm"
+#define ACCOUNT_OPERATION_MYACCOUNT "http://tizen.org/account/operation/signin_from_myaccount"
+// End of private account operation type
+
+#define ACCOUNT_SUPPORTS_CAPABILITY_POST "http://tizen.org/account/capability/post"
+#define ACCOUNT_SUPPORTS_CAPABILITY_VOIP "http://tizen.org/account/capability/voip"
+#define ACCOUNT_SUPPORTS_CAPABILITY_SAMSUNG_APPS "http://tizen.org/account/capability/samsungapps"
+#define ACCOUNT_SUPPORTS_CAPABILITY_TASK "http://tizen.org/account/capability/task"
+#define ACCOUNT_SUPPORTS_CAPABILITY_MOBILE_TRACKER "http://tizen.org/account/capability/mobiletracker"
+#define ACCOUNT_SUPPORTS_CAPABILITY_S_NOTE "http://tizen.org/account/capability/snote"
+#define ACCOUNT_SUPPORTS_CAPABILITY_GALLERY "http://tizen.org/account/capability/gallery"
+#define ACCOUNT_SUPPORTS_CAPABILITY_MEMO "http://tizen.org/account/capability/memo"
+#define ACCOUNT_SUPPORTS_CAPABILITY_CHAT "http://tizen.org/account/capability/chat"
+#define ACCOUNT_SUPPORTS_CAPABILITY_BOOKMARK "http://tizen.org/account/capability/bookmark"
+#define ACCOUNT_SUPPORTS_CAPABILITY_SYNCHRONISE "http://tizen.org/account/capability/synchronise"
+#define ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL "http://tizen.org/account/capability/tizen_email"
+#define ACCOUNT_SUPPORTS_CAPABILITY_INTERNET "http://tizen.org/account/capability/internet"
+#define ACCOUNT_SUPPORTS_CAPABILITY_DOCOMO_SCHEDULE_MEMO "http://tizen.org/account/capability/docomo"
+/* end of account uri list */
+
typedef struct _account_s
{
int id;
typedef sqlite3_stmt* account_stmt;
-#define ACCOUNT_SCHEMA "create table %s \n"\
+//ACCOUNT_TABLE
+#define ACCOUNT_SCHEMA "create table account \n"\
"(\n"\
"_id INTEGER PRIMARY KEY AUTOINCREMENT, "\
"user_name TEXT, "\
"int_custom4 INTEGER "\
");"
-#define CAPABILITY_SCHEMA "create table %s \n"\
+//CAPABILITY_TABLE
+#define CAPABILITY_SCHEMA "create table capability \n"\
"(\n"\
"_id INTEGER PRIMARY KEY AUTOINCREMENT, "\
"key TEXT, "\
"account_id INTEGER "\
");"
-#define ACCOUNT_CUSTOM_SCHEMA "create table %s \n"\
+//ACCOUNT_CUSTOM_TABLE
+#define ACCOUNT_CUSTOM_SCHEMA "create table account_custom \n"\
"(\n"\
"AccountId INTEGER, "\
"AppId TEXT, "\
"Value TEXT "\
");"
-#define ACCOUNT_TYPE_SCHEMA "create table %s \n"\
+//ACCOUNT_TYPE_TABLE
+#define ACCOUNT_TYPE_SCHEMA "create table account_type \n"\
"(\n"\
"_id INTEGER PRIMARY KEY AUTOINCREMENT, "\
"AppId TEXT, "\
"MultipleAccountSupport INTEGER "\
");"
-#define LABEL_SCHEMA "create table %s \n"\
+//LABEL_TABLE
+#define LABEL_SCHEMA "create table label \n"\
"(\n"\
"AppId TEXT, "\
"Label TEXT, "\
"Locale TEXT"\
");"
-#define PROVIDER_FEATURE_SCHEMA "create table %s \n"\
+//PROVIDER_FEATURE_TABLE
+#define PROVIDER_FEATURE_SCHEMA "create table provider_feature \n"\
"(\n"\
"app_id TEXT, "\
"key TEXT "\
/*
- * account
*
* Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
*
#ifndef __ACCOUNT_TYPES_H__
#define __ACCOUNT_TYPES_H__
-#include <db-util.h>
-
#ifdef __cplusplus
extern "C"
{
*/
/**
- * @file account-types.h
- * @ingroup CAPI_ACCOUNT
- * @brief This file defines common types and enums of ACCOUNT.
+ * @file account-types.h
+ * @ingroup CAPI_ACCOUNT
+ * @brief This file defines common types and enums of ACCOUNT.
*/
/**
- * @brief Enumerations for the state of capability.
+ * @brief Enumeration for the state of capability.
+ * @since_tizen 2.3
*/
typedef enum
{
- ACCOUNT_CAPABILITY_STATE_INVALID = 0,
- ACCOUNT_CAPABILITY_DISABLED,
- ACCOUNT_CAPABILITY_ENABLED,
- ACCOUNT_CAPABILITY_STATE_MAX
+ ACCOUNT_CAPABILITY_STATE_INVALID = 0, /**< Account capability is invalid */
+ ACCOUNT_CAPABILITY_DISABLED, /**< Account capability is disabled */
+ ACCOUNT_CAPABILITY_ENABLED, /**< Account capability is enabled */
+ ACCOUNT_CAPABILITY_STATE_MAX
}
account_capability_state_e;
/**
- * @brief Enumerations for the state of account secrecy.
+ * @brief Enumeration for the state of account secrecy.
+ * @since_tizen 2.3
*/
typedef enum
{
- ACCOUNT_SECRECY_INVALID = 0,
- ACCOUNT_SECRECY_INVISIBLE,
- ACCOUNT_SECRECY_VISIBLE,
- ACCOUNT_SECRECY_MAX
+ ACCOUNT_SECRECY_INVALID = 0, /**< Account secrecy is invalid */
+ ACCOUNT_SECRECY_INVISIBLE, /**< Account is not visible */
+ ACCOUNT_SECRECY_VISIBLE, /**< Account is visible */
+ ACCOUNT_SECRECY_MAX
}
account_secrecy_state_e;
/**
- * @brief Enumerations for the account supported sync or not.
- * ACCOUNT_SYNC_NOT_SUPPORT: sync not supported
- * ACCOUNT_SYNC_STATUS_OFF: supproted sync but all synchronization functionalities are off
- * ACCOUNT_SYNC_STATUS_IDLE: sync support and sync status is idle
- * ACCOUNT_SYNC_STATUS_RUNNING: sync support and sync status is running
- * ACCOUNT_SUPPORTS_SYNC: NOT USED, WILL BE REMOVED. TO PREVENT BUILD ERROR.
- * ACCOUNT_NOT_SUPPORTS_SYNC: NOT USED, WILL BE REMOVED. TO PREVENT BUILD ERROR.
+ * @brief Enumeration for the account sync status.
+ * @since_tizen 2.3
*/
typedef enum
{
- ACCOUNT_SYNC_INVALID = 0,
- ACCOUNT_SYNC_NOT_SUPPORT,
- ACCOUNT_SYNC_STATUS_OFF,
- ACCOUNT_SYNC_STATUS_IDLE,
- ACCOUNT_SYNC_STATUS_RUNNING,
- ACCOUNT_SUPPORTS_SYNC,
- ACCOUNT_NOT_SUPPORTS_SYNC,
- ACCOUNT_SYNC_MAX
+ ACCOUNT_SYNC_INVALID = 0, /**< Account sync is invalid */
+ ACCOUNT_SYNC_NOT_SUPPORT, /**< Account sync not supported */
+ ACCOUNT_SYNC_STATUS_OFF, /**< Account sync supported but all synchronization functionalities are off */
+ ACCOUNT_SYNC_STATUS_IDLE, /**< Account sync support and sync status is idle */
+ ACCOUNT_SYNC_STATUS_RUNNING, /**< Account sync support and sync status is running */
+ ACCOUNT_SUPPORTS_SYNC, /**< NOT USED, WILL BE REMOVED TO PREVENT BUILD ERROR */
+ ACCOUNT_NOT_SUPPORTS_SYNC, /**< NOT USED, WILL BE REMOVED TO PREVENT BUILD ERROR */
+ ACCOUNT_SYNC_MAX
}
account_sync_state_e;
+/**
+ * @brief Enumeration for the account auth type.
+ * @since_tizen 2.3
+ */
typedef enum
{
- ACCOUNT_AUTH_TYPE_INVALID = 0,
- ACCOUNT_AUTH_TYPE_XAUTH,
- ACCOUNT_AUTH_TYPE_OAUTH,
- ACCOUNT_AUTH_TYPE_CLIENT_LOGIN,
- ACCOUNT_AUTH_TYPE_MAX
+ ACCOUNT_AUTH_TYPE_INVALID = 0, /**< Auth type is invalid */
+ ACCOUNT_AUTH_TYPE_XAUTH, /**< XAuth type */
+ ACCOUNT_AUTH_TYPE_OAUTH, /**< OAuth type */
+ ACCOUNT_AUTH_TYPE_CLIENT_LOGIN, /**< Client-Login type */
+ ACCOUNT_AUTH_TYPE_MAX
}account_auth_type_e;
/**
- * @brief Account handle.
+ * @brief The structure type for the Account handle.
+ * @since_tizen 2.3
*/
typedef struct account_s* account_h;
/**
- * @brief Account capability handle.
- */
-typedef struct account_capability_s* account_capability_h;
-
-/**
- * @brief Account type handle.
+ * @brief The structure type for the Account provider handle.
+ * @since_tizen 2.3
*/
typedef struct account_type_s* account_type_h;
/**
- * @brief Account handle.
+ * @brief The structure type for the Account handle.
+ * @since_tizen 2.3
*/
typedef struct label_s* label_h;
+
+/**
+ * @brief The structure type for the Account subscribe handle.
+ * @since_tizen 2.3
+ */
typedef struct account_subscribe_s* account_subscribe_h;
-#define ACCOUNT_DATA_USERNAME "http://tizen.org/account/data/username"
-#define ACCOUNT_DATA_SERVICE_PROVIDER "http://tizen.org/account/data/service_provider"
-#define ACCOUNT_DATA_ID "http://tizen.org/appcontrol/data/account/id"
-#define ACCOUNT_OPERATION_SIGNIN "http://tizen.org/appcontrol/operation/account/add"
-#define ACCOUNT_OPERATION_VIEW "http://tizen.org/appcontrol/operation/account/configure"
-
-#define ACCOUNT_SUPPORTS_CAPABILITY_CONTACT "http://tizen.org/account/capability/contact"
-#define ACCOUNT_SUPPORTS_CAPABILITY_CALENDAR "http://tizen.org/account/capability/calendar"
-#define ACCOUNT_SUPPORTS_CAPABILITY_PHOTO "http://tizen.org/account/capability/photo"
-#define ACCOUNT_SUPPORTS_CAPABILITY_VIDEO "http://tizen.org/account/capability/video"
-#define ACCOUNT_SUPPORTS_CAPABILITY_EMAIL "http://tizen.org/account/capability/email"
-#define ACCOUNT_SUPPORTS_CAPABILITY_POST "http://tizen.org/account/capability/post"
-#define ACCOUNT_SUPPORTS_CAPABILITY_VOIP "http://tizen.org/account/capability/voip"
-#define ACCOUNT_SUPPORTS_CAPABILITY_SAMSUNG_APPS "http://tizen.org/account/capability/samsungapps"
-#define ACCOUNT_SUPPORTS_CAPABILITY_TASK "http://tizen.org/account/capability/task"
-#define ACCOUNT_SUPPORTS_CAPABILITY_MOBILE_TRACKER "http://tizen.org/account/capability/mobiletracker"
-#define ACCOUNT_SUPPORTS_CAPABILITY_S_NOTE "http://tizen.org/account/capability/snote"
-#define ACCOUNT_SUPPORTS_CAPABILITY_GALLERY "http://tizen.org/account/capability/gallery"
-#define ACCOUNT_SUPPORTS_CAPABILITY_MUSIC "http://tizen.org/account/capability/music"
-#define ACCOUNT_SUPPORTS_CAPABILITY_MEMO "http://tizen.org/account/capability/memo"
-#define ACCOUNT_SUPPORTS_CAPABILITY_MESSAGE "http://tizen.org/account/capability/message"
-#define ACCOUNT_SUPPORTS_CAPABILITY_CHAT "http://tizen.org/account/capability/chat"
-#define ACCOUNT_SUPPORTS_CAPABILITY_BOOKMARK "http://tizen.org/account/capability/bookmark"
-#define ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL "http://tizen.org/account/capability/tizen_email"
-
-#define USER_TXT_CNT 5
-#define USER_INT_CNT 5
-
-#define ACCOUNT_NOTI_NAME_INSERT "insert"
-#define ACCOUNT_NOTI_NAME_UPDATE "update"
-#define ACCOUNT_NOTI_NAME_DELETE "delete"
-#define ACCOUNT_NOTI_NAME_SYNC_UPDATE "sync_update"
+/**
+ * @brief The insert notification type.
+ * @since_tizen 2.3
+ * @remarks When the account database is changed, You can distinguish one event type from the other which are set for subscribing notification.
+ *
+ * @see account_subscribe_notification()
+ */
+#define ACCOUNT_NOTI_NAME_INSERT "insert"
+
+/**
+ * @brief The update notification type.
+ * @since_tizen 2.3
+ * @remarks When the account database is changed, You can distinguish one event type from the other which are set for subscribing notification.
+ *
+ * @see account_subscribe_notification()
+ */
+#define ACCOUNT_NOTI_NAME_UPDATE "update"
+
+/**
+ * @brief The delete notification type.
+ * @since_tizen 2.3
+ * @remarks When the account database is changed, You can distinguish one event type from the other which are set for subscribing notification.
+ *
+ * @see account_subscribe_notification()
+ */
+#define ACCOUNT_NOTI_NAME_DELETE "delete"
+
+/**
+ * @brief The sync_update notification type.
+ * @since_tizen 2.3
+ * @remarks When the account database is changed, You can distinguish one event type from the other which are set for subscribing notification.
+ *
+ * @see account_subscribe_notification()
+ */
+#define ACCOUNT_NOTI_NAME_SYNC_UPDATE "sync_update"
+
+
+/**
+ * @brief This is a key of app_control_h’s extra data. The value of the key is a user account name.
+ * @since_tizen 2.3
+ * @remarks You can retrieve the value like this, app_control_get_extra_data(app_control, ACCOUNT_DATA_USERNAME, &username).\n
+ This value will be sent with ACCOUNT_OPERATION_VIEW.
+ */
+#define ACCOUNT_DATA_USERNAME "http://tizen.org/account/data/username"
+
+/**
+ * @brief This is a key of app_control_h’s extra data. The value of the key is account DB ID of the user’s account information.
+ * @since_tizen 2.3
+ * @remarks You can retrieve the value like this, app_control_get_extra_data(app_control, ACCOUNT_DATA_ID, &id).\n
+ This value will be sent with ACCOUNT_OPERATION_VIEW.
+ */
+#define ACCOUNT_DATA_ID "http://tizen.org/appcontrol/data/account/id"
+
+/**
+ * @brief This is an application launch operation name.
+ * @since_tizen 2.3
+ * @remarks This operation will be sent when a user selects your account in add account view.
+ */
+#define ACCOUNT_OPERATION_SIGNIN "http://tizen.org/appcontrol/operation/account/add"
+
+/**
+ * @brief This is an application launch operation name.
+ * @since_tizen 2.3
+ * @remarks This operation will be sent when a user selects your account in account list view.
+ */
+#define ACCOUNT_OPERATION_VIEW "http://tizen.org/appcontrol/operation/account/configure"
+
+/**
+ * @brief This is contact capability string.
+ * @since_tizen 2.3
+ * @remarks If your provider service has contact information and contact information is provided another application, register this capability through manifest file.
+ */
+#define ACCOUNT_SUPPORTS_CAPABILITY_CONTACT "http://tizen.org/account/capability/contact"
+
+/**
+ * @brief This is calendar capability string.
+ * @since_tizen 2.3
+ * @remarks If your provider service has calendar information and calendar information is provided another application, register this capability through manifest file.
+ */
+#define ACCOUNT_SUPPORTS_CAPABILITY_CALENDAR "http://tizen.org/account/capability/calendar"
+
+/**
+ * @brief This is email capability string.
+ * @since_tizen 2.3
+ * @remarks If your provider service have email service and email is provided another application, register this capability through manifest file.
+ */
+#define ACCOUNT_SUPPORTS_CAPABILITY_EMAIL "http://tizen.org/account/capability/email"
+
+/**
+ * @brief This is photo capability string.
+ * @since_tizen 2.3
+ * @remarks If your provider service has photo and photo is provided another application, register this capability through manifest file.
+ */
+#define ACCOUNT_SUPPORTS_CAPABILITY_PHOTO "http://tizen.org/account/capability/photo"
+
+/**
+ * @brief This is video capability string.
+ * @since_tizen 2.3
+ * @remarks If your provider service has video and video is provided another application, register this capability through manifest file.
+ */
+#define ACCOUNT_SUPPORTS_CAPABILITY_VIDEO "http://tizen.org/account/capability/video"
+
+/**
+ * @brief This is music capability string.
+ * @since_tizen 2.3
+ * @remarks If your provider service has music and music is provided another application, register this capability through manifest file.
+ */
+#define ACCOUNT_SUPPORTS_CAPABILITY_MUSIC "http://tizen.org/account/capability/music"
+
+/**
+ * @brief This is document capability string.
+ * @since_tizen 2.3
+ * @remarks If your provider service has document and document is provided another application, register this capability through manifest file.
+ */
+#define ACCOUNT_SUPPORTS_CAPABILITY_DOCUMENT "http://tizen.org/account/capability/document"
+
+/**
+ * @brief This is message capability string.
+ * @since_tizen 2.3
+ * @remarks This capability will be exploited to use SMS, MMS.
+ */
+#define ACCOUNT_SUPPORTS_CAPABILITY_MESSAGE "http://tizen.org/account/capability/message"
+
+/**
+ * @brief This is game capability string.
+ * @since_tizen 2.3
+ * @remarks This capability will be exploited to use game data.
+ */
+#define ACCOUNT_SUPPORTS_CAPABILITY_GAME "http://tizen.org/account/capability/game"
/**
* @}
/*
- * account
*
* Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
*
#ifndef __ACCOUNT_H__
#define __ACCOUNT_H__
-#include <stdlib.h>
-#include <stdio.h>
-#include <glib.h>
#include <account-types.h>
#include <account-error.h>
/**
* @file account.h
- * @brief This file contains the Account API for account management
+ * @brief This file contains the Account API for account management.
*/
/**
*/
/**
- * @brief Called once for each account from database
+ * @brief Called once for each account from the database.
*
- * @param[in] account The account handle
- * @param[in] user_data The user data passed from the foreach function
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] user_data The user data passed from the foreach function
*
- * @return @c true to continue with the next iteration of the loop or @c false to break out of the loop.
+ * @return @c true to continue with the next iteration of the loop, \n
+ * otherwise @c false to break out of the loop
*
- * @pre account_foreach_account_from_db(), account_query_account_by_account_id(), account_query_account_by_user_name() or account_query_account_by_package_name() invoke this callback.
+ * @pre account_foreach_account_from_db(), account_query_account_by_account_id(), account_query_account_by_user_name() or account_query_account_by_package_name() must be called.
*
* @see account_foreach_account_from_db()
* @see account_query_account_by_account_id()
*/
typedef bool (*account_cb)(account_h account, void *user_data);
-
/**
- * @brief Called once for each capability of account from database
+ * @brief Called once for each capability of an account in the database.
*
- * @param[in] capability_type The capability type
- * @param[in] capability_state The capability state
- * @param[in] user_data The user data passed from the foreach function
+ * @since_tizen 2.3
+ * @param[in] capability_type The capability type
+ * @param[in] capability_state The capability state
+ * @param[in] user_data The user data passed from the foreach function
*
- * @return @c true to continue with the next iteration of the loop or @c false to break out of the loop.
+ * @return @c true to continue with the next iteration of the loop, \n
+ * otherwise @c false to break out of the loop
*
- * @pre account_query_capability_by_account_id() invokes this callback.
+ * @pre account_query_capability_by_account_id() must be called.
*
* @see account_query_capability_by_account_id()
*/
typedef bool (*capability_cb)(const char* capability_type, account_capability_state_e capability_state, void *user_data);
/**
- * @brief Called once for each custom data of account from database
+ * @brief Called once for each custom data of an account in the database.
+ *
+ * @since_tizen 2.3
+ * @param[in] key The user custom key
+ * @param[in] value The user custom value of the specific key
+ * @param[in] user_data The user data passed
*
- * @param[in] key The user custom key
- * @param[in] value The user custom value of the specific key
- * @param[in] user_data The user data passed
+ * @return @c true to continue with the next iteration of the loop, \n
+ * otherwise @c false to break out of the loop
*
- * @return @c true to continue with the next iteration of the loop or @c false to break out of the loop.
+ * @pre account_query_capability_by_account_id() must be called.
*
* @see account_query_capability_by_account_id()
*/
typedef bool (*account_custom_cb)(char* key, char* value, void *user_data);
+/**
+ * @brief Called once for each account provider in the database.
+ *
+ * @since_tizen 2.3
+ * @param[in] account_type The account provider handle
+ * @param[in] user_data The user data passed
+ *
+ * @return @c true to continue with the next iteration of the loop, \n
+ * otherwise @c false to break out of the loop
+ *
+ * @pre account_type_foreach_account_type_from_db(), account_type_query_by_provider_feature() must be called.
+ *
+ * @see account_type_foreach_account_type_from_db()
+ * @see account_type_query_by_provider_feature()
+ */
typedef bool (*account_type_cb)(account_type_h account_type, void *user_data);
+
+
+/**
+ * @brief Called once for each account label.
+ *
+ * @since_tizen 2.3
+ * @param[in] app_id The application ID
+ * @param[in] label The name of the account depends on the specified locale
+ * @param[in] locale The locale is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.\n
+ * For example, "ko_KR" for Korean, "en_US" for American English.
+ * @param[in] user_data The user data passed
+ *
+ * @return @c true to continue with the next iteration of the loop, \n
+ * otherwise @c false to break out of the loop
+ *
+ * @pre account_type_get_label(), account_type_query_label_by_app_id() must be called.
+ *
+ * @see account_type_get_label()
+ * @see account_type_query_label_by_app_id()
+ */
typedef bool (*account_label_cb)(char* app_id, char* label, char* locale, void *user_data);
+
+
+/**
+ * @brief Called once for each capability of an account provider in the database.
+ *
+ * @since_tizen 2.3
+ * @param[in] app_id The application ID
+ * @param[in] key The user custom key
+ * @param[in] user_data The user data passed
+ *
+ * @return @c true to continue with the next iteration of the loop, \n
+ * otherwise @c false to break out of the loop
+ *
+ * @pre account_type_query_provider_feature_by_app_id(), account_type_get_provider_feature_all() must be called.
+ *
+ * @see account_type_query_provider_feature_by_app_id()
+ * @see account_type_get_provider_feature_all()
+ */
typedef bool (*provider_feature_cb)(char* app_id, char* key, void* user_data);
+
+
+/**
+ * @brief Called once when an event occurs.
+ *
+ * @since_tizen 2.3
+ * @param[in] event_type The account event type
+ * @param[in] account_id The account ID to update
+ * @param[in] user_data The user data passed
+ *
+ * @return @c true to continue with the next iteration of the loop, \n
+ * otherwise @c false to break out of the loop
+ *
+ * @pre account_subscribe_notification() must be called.
+ *
+ * @see account_subscribe_notification()
+ */
typedef bool (*account_event_cb)(const char* event_type, int account_id, void* user_data);
/**
- * @brief Connects to the account database.
+ * @brief Connects to the account database by readwrite mode.
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_DB_NOT_OPENED DB is not connected
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
* @see account_disconnect()
*/
/**
- * @brief Disconnects from account database.
+ * @brief Connects to the account database by readonly mode.
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_DB_NOT_OPENED DB is not connected
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
+ *
+ * @see account_disconnect()
+ */
+ACCOUNT_API int account_connect_readonly(void);
+
+
+/**
+ * @brief Disconnects from the account database.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
+ * @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite busy handler expired
*
* @see account_connect()
*/
/**
- * @brief Creates a handle to the account.
+ * @brief Creates a handle to the account.
*
- * @remarks @a account must be released with account_destroy() by you. \n
- * The created handle is not added to the account database until account_insert_to_db() is called.
+ * @since_tizen 2.3
+ * @remarks Release @a account using account_destroy().
+ * @remarks The created handle is not added to the account database until account_insert_to_db() is called.
*
- * @param[in] account The account handle
+ * @param[in] account The account handle
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_destroy()
*/
/**
- * @brief Destroys the account handle and releases all its resources.
+ * @brief Destroys the account handle and releases all its resources.
*
- * @param[in] account The account handle
+ * @since_tizen 2.3
+ * @param[in] account The account handle
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_create()
*/
/**
- * @brief Inserts the account details to the account database.
+ * @brief Inserts the account details to the account database.
*
- * @param[in] account The account handle
- * @param[out] account_db_id The account ID to be assigned to a account
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] account The account handle
+ * @param[out] account_db_id The account ID to be assigned to an account
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
- * @retval #ACCOUNT_ERROR_DUPLICATED Same user name exist in your application
- * @retval #ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE when you try to add an account inspite of multiple account false
- * @retval #ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER when you try to add an account though you didn't register account type in manifest
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_DUPLICATED Same user name exists in your application
+ * @retval #ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE Tried to add an account in spite of multiple false accounts
+ * @retval #ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER Tried to add an account though you did not register the account provider in manifest
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
* @see account_delete_from_db_by_id()
*/
ACCOUNT_API int account_insert_to_db(account_h account, int *account_db_id);
+
/**
- * @brief Updates the account details to the account database without checking provider permission.
+ * @brief Deletes an account from the account database by account DB ID.
*
- * @param[in] account The account handle
- * @param[in] account_id The account ID to update
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] account_db_id The account ID to delete
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
- * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update not exist
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED The account owner is different from the caller or DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect()
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
* @see account_insert_to_db()
- * @see account_delete_from_db_by_id()
* @see account_delete_from_db_by_user_name()
* @see account_delete_from_db_by_package_name()
+ * @see account_update_to_db_by_id()
* @see account_update_to_db_by_user_name()
*/
-ACCOUNT_API int account_update_to_db_by_id_ex(account_h account, int account_id);
+ACCOUNT_API int account_delete_from_db_by_id(int account_db_id);
/**
- * @brief Deletes the account from the account database by accound DB ID.
+ * @brief Deletes an account from the account database by user name.
*
- * @param[in] account_db_id The account ID to delete
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] user_name The user name of the account to delete
+ * @param[in] package_name The package name of the account to delete
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
- * @retval #ACCOUNT_ERROR_PERMISSION_DENIED the account owner is different from caller
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect()
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
* @see account_insert_to_db()
- * @see account_delete_from_db_by_user_name()
+ * @see account_delete_from_db_by_id()
* @see account_delete_from_db_by_package_name()
* @see account_update_to_db_by_id()
* @see account_update_to_db_by_user_name()
*/
-ACCOUNT_API int account_delete_from_db_by_id(int account_db_id);
+ACCOUNT_API int account_delete_from_db_by_user_name(char *user_name, char *package_name);
/**
- * @brief Deletes the account from the account database by user name.
+ * @brief Deletes an account from the account database by package name.
*
- * @param[in] user_name The user name of account to delete
- * @param[in] package_name The package name of account to delete
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] package_name The package name of account(s) to delete
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect()
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
* @see account_insert_to_db()
* @see account_delete_from_db_by_id()
- * @see account_delete_from_db_by_package_name()
+ * @see account_delete_from_db_by_user_name()
* @see account_update_to_db_by_id()
* @see account_update_to_db_by_user_name()
*/
-ACCOUNT_API int account_delete_from_db_by_user_name(char *user_name, char *package_name);
+ACCOUNT_API int account_delete_from_db_by_package_name(const char *package_name);
/**
- * @brief Deletes the account from the account database by package name.
+ * @brief Updates the account details to the account database.
*
- * @param[in] package_name The package name of account(s) to delete
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] account The account handle
+ * @param[in] account_id The account ID to update
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update does not exist
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect()
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
* @see account_insert_to_db()
* @see account_delete_from_db_by_id()
* @see account_delete_from_db_by_user_name()
- * @see account_update_to_db_by_id()
+ * @see account_delete_from_db_by_package_name()
* @see account_update_to_db_by_user_name()
*/
-ACCOUNT_API int account_delete_from_db_by_package_name(const char *package_name);
+ACCOUNT_API int account_update_to_db_by_id(account_h account, int account_id);
/**
- * @brief Updates the account details to the account database.
+ * @brief Updates the account details to the account database without checking provider's permission.
*
- * @param[in] account The account handle
- * @param[in] account_id The account ID to update
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] account The account handle
+ * @param[in] account_id The account ID to update
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
- * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update not exist
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update does not exist
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect()
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
* @see account_insert_to_db()
* @see account_delete_from_db_by_package_name()
* @see account_update_to_db_by_user_name()
*/
-ACCOUNT_API int account_update_to_db_by_id(account_h account, int account_id);
-
+ACCOUNT_API int account_update_to_db_by_id_ex(account_h account, int account_id);
/**
- * @brief Updates the account details to the account database.
+ * @brief Updates the account details to the account database.
*
- * @param[in] account The account handle
- * @param[in] user_name The user name of account to update
- * @param[in] package_name The package name for the user name
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] account The account handle
+ * @param[in] user_name The user name of the account to update
+ * @param[in] package_name The package name for the user name
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
- * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update not exist
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update does not exist
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect()
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
* @see account_insert_to_db()
ACCOUNT_API int account_update_to_db_by_user_name(account_h account, const char *user_name, const char *package_name);
/**
- * @brief Gets the account id of account.
- *
+ * @brief Gets the ID of an account.
*
- * @param[in] account The account handle
- * @param[out] account_id The account id of account
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[out] account_id The account ID
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
*/
ACCOUNT_API int account_get_account_id(account_h account, int *account_id);
-
/**
- * @brief Gets the user name of account.
+ * @brief Gets the user name of an account.
*
- * @remarks @a user_name must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a user_name using free().
*
- * @param[in] account The account handle
- * @param[out] user_name The user name of account
+ * @param[in] account The account handle
+ * @param[out] user_name The user name of the account
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_set_user_name()
*/
/**
- * @brief Sets the user name of account.
+ * @brief Sets the user name of an account.
*
- * @param[in] account The account handle
- * @param[in] user_name The string to set as user name
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] user_name The string to set as user name
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_user_name()
*/
/**
- * @brief Gets the display name of account.
+ * @brief Gets the display name of an account.
*
- * @remarks @a display_name must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a display_name using free().
*
- * @param[in] account The account handle
- * @param[out] display_name The display name of account
+ * @param[in] account The account handle
+ * @param[out] display_name The display name of the account
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_get_display_name()
*/
/**
- * @brief Sets the display name of account.
+ * @brief Sets the display name of an account.
*
- * @param[in] account The account handle
- * @param[in] display_name The text string to set as the display name
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] display_name The text string to set as the display name
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_display_name()
*/
ACCOUNT_API int account_set_display_name(account_h account, const char *display_name);
/**
- * @brief Gets the capability detail of account.
+ * @brief Gets the capability detail of an account.
*
- * @param[in] account The account handle
- * @param[in] capability_type Capability type to get the capability value
- * @param[out] capability_value Corresponding capability value(on/off) of the specified capability_type
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] capability_type The capability type to get the capability value
+ * @param[out] capability_value The capability value (on/off) of the specified capability_type
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND There is no given capability_type in the account
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND There is no given capability_type in the account
*
* @see account_set_capability()
*/
ACCOUNT_API int account_get_capability(account_h account, const char* capability_type, account_capability_state_e* capability_value);
/**
- * @brief Gets all the capabilities of account.
+ * @brief Gets all the capabilities of an account.
*
- * @param[in] account The account handle
- * @param[in] callback The callback function
- * @param[in] user_data The user data to be passed to the callback function
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] callback The callback function
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_set_capability()
*/
-ACCOUNT_API int account_get_capability_all(account_h account, capability_cb cb_func, void *user_data);
+ACCOUNT_API int account_get_capability_all(account_h account, capability_cb callback, void *user_data);
/**
- * @brief Sets the capability.
+ * @brief Sets the capability.
*
- * @param[in] account The account handle
- * @param[in] capability_type The capability type
- * @param[in] capability_state The capability state
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] capability_type The capability type
+ * @param[in] capability_state The capability state
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_capability()
*/
/**
- * @brief Gets the icon path.
+ * @brief Gets the icon path.
*
- * @remarks @a icon_path must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a icon_path using free().
*
- * @param[in] account The account handle
- * @param[out] icon_path The icon path
+ * @param[in] account The account handle
+ * @param[out] icon_path The icon path
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_set_icon_path()
*/
/**
- * @brief Sets the icon path.
+ * @brief Sets the icon path.
*
- * @param[in] account The account handle
- * @param[in] icon_path The text string to set as a icon path
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] icon_path The text string to set as the icon path
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_icon_path()
*/
/**
- * @brief Gets the domain name.
+ * @brief Gets the domain name.
*
- * @remarks @a domain_name must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a domain_name using free().
*
- * @param[in] account The account handle
- * @param[out] domain_name The domain name
+ * @param[in] account The account handle
+ * @param[out] domain_name The domain name
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_set_domain_name()
*/
/**
- * @brief Sets the domain name.
+ * @brief Sets the domain name.
*
- * @param[in] account The account handle
- * @param[in] domain_name The text string to set as a domain name
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] domain_name The text string to set as the domain name
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_domain_name()
*/
/**
- * @brief Gets the email address.
+ * @brief Gets the email address.
*
- * @remarks @a email_address must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a email_address using free().
*
- * @param[in] account The account handle
- * @param[out] email_address The email address
+ * @param[in] account The account handle
+ * @param[out] email_address The email address
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_set_email_address()
*/
/**
- * @brief Sets the email address.
+ * @brief Sets the email address.
*
- * @param[in] account The account handle
- * @param[in] email_address The text string to set as a email address
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] email_address The text string to set as the email address
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
- * @see account_get_email_addres()
+ * @see account_get_email_address()
*/
ACCOUNT_API int account_set_email_address(account_h account, const char *email_address);
/**
- * @brief Gets the package name.
+ * @brief Gets the package name.
*
- * @remarks @a package_name must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a package_name using free().
*
- * @param[in] account The account handle
- * @param[out] package_name The package name
+ * @param[in] account The account handle
+ * @param[out] package_name The package name
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_set_package_name()
*/
/**
- * @brief Sets the package name.
+ * @brief Sets the package name.
*
- * @param[in] account The account handle
- * @param[in] package_name The text string to set as a package name
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] package_name The text string to set as the package name
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
- * @see account_get_email_addres()
+ * @see account_get_email_address()
*/
ACCOUNT_API int account_set_package_name(account_h account, const char *package_name);
/**
- * @brief Gets the access token.
+ * @brief Gets the access token.
*
- * @remarks @a access_token must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a access_token using free().
*
- * @param[in] account The account handle
- * @param[out] access_token The access token
+ * @param[in] account The account handle
+ * @param[out] access_token The access token
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_set_access_token()
*/
/**
- * @brief Set the access token.
+ * @brief Sets the access token.
*
- * @param[in] account The account handle
- * @param[in] access_token The text string to set as a access token
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] access_token The text string to set as the access token
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_access_token()
*/
/**
- * @brief Gets the user text.
+ * @brief Gets the user text.
*
- * @remarks @a user_text must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a user_text using free().
*
- * @param[in] account The account handle
- * @param[in] user_text_index The index of the user text (range: 0 ~ 4)
- * @param[out] user_text The user text
+ * @param[in] account The account handle
+ * @param[in] user_text_index The index of the user text (range: 0 ~ 4)
+ * @param[out] user_text The user text
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_set_user_text()
*/
/**
- * @brief Sets the user text.
+ * @brief Sets the user text.
*
- * @param[in] account The account handle
- * @param[in] user_text_index The index of the user text (must be in range from 0 to 4)
- * @param[in] user_text The text string to set as a user txt
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] user_text_index The index of the user text (must be in range from @c 0 to @c 4)
+ * @param[in] user_text The text string to set as the user text
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_user_text()
*/
/**
- * @brief Gets the user integer.
+ * @brief Gets the user integer.
*
- * @param[in] account The account handle
- * @param[in] user_int_index The index of the user integer (must be in range from 0 to 4)
- * @param[out] user_integer The user interger
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] user_int_index The index of the user integer (must be in range from @c 0 to @c 4)
+ * @param[out] user_integer The user integer
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_set_user_int()
*/
/**
- * @brief Set the user integer.
+ * @brief Sets the user integer.
*
- * @param[in] account The account handle
- * @param[in] user_int_index The index of the user integer (must be in range from 0 to 4)
- * @param[in] user_integer The integer to set as user integer
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] user_int_index The index of the user integer (must be in range from @c 0 to @c 4)
+ * @param[in] user_integer The integer to set as the user integer
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_user_int()
*/
/**
- * @brief Gets the auth type.
+ * @brief Gets the auth type.
*
- * @param[in] account The account handle
- * @param[out] auth_type The auth type
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[out] auth_type The auth type
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_set_auth_type()
*/
/**
- * @brief Sets the auth type.
+ * @brief Sets the auth type.
*
- * @param[in] account The account handle
- * @param[in] auth_type Integer to be set as auth type
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] auth_type The integer to be set as the auth type
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_auth_type()
*/
/**
- * @brief Gets the secret.
+ * @brief Gets the secret.
*
- * @param[in] account The account handle
- * @param[out] secret The secret
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[out] secret The secret
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_set_secret()
*/
/**
- * @brief Sets the secret.
+ * @brief Sets the secret.
*
- * @param[in] account The account handle
- * @param[in] secret Secrecy to be set
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] secret The secrecy to be set
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_secret()
*/
ACCOUNT_API int account_set_secret(account_h account, const account_secrecy_state_e secret);
/**
- * @brief Gets the sync support.
+ * @brief Gets the sync support.
*
- * @param[in] account The account handle
- * @param[out] sync_support The sync support
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[out] sync_support The sync support
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_set_sync_support()
*/
/**
- * @brief Sets the sync support.
+ * @brief Sets the sync support.
*
- * @param[in] account The account handle
- * @param[in] sync_support sync state to be set
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] sync_support The sync state to be set
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_sync_support()
*/
/**
- * @brief Gets the source.
+ * @brief Gets the source.
*
- * @remarks @a user_text must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a user_text using free().
*
- * @param[in] account The account handle
- * @param[out] source The source
+ * @param[in] account The account handle
+ * @param[out] source The source
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_set_source()
*/
/**
- * @brief Sets the source.
+ * @brief Sets the source.
*
- * @param[in] account The account handle
- * @param[in] source The text string to set as a source
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] source The text string to set as the source
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_source()
*/
ACCOUNT_API int account_set_source(account_h account, const char *source);
/**
- * @brief Sets the capability.
+ * @brief Sets the custom.
*
- * @param[in] account The account handle
- * @param[in] key The user custom key for specific value
- * @param[in] value The user custom value about the given key
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] key The user custom key for the specific value
+ * @param[in] value The user custom value about the given key
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_get_custom()
*/
ACCOUNT_API int account_set_custom(account_h account, const char* key, const char* value);
/**
- * @brief Gets the user specific custom text of account key.
+ * @brief Gets the user specific custom text of an account key.
*
- * @param[in] account The account handle
- * @param[in] callback The callback function to retreive custom text. The callback function gives key and value
- * @param[out] value text of the given key
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] key The key to retrieve custom text
+ * @param[out] value The text of the given key
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND There is no given capability_type in the account
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND There is no given capability type in the account
*
* @see account_set_custom()
*/
/**
- * @brief Gets all the user custom texts of account.
+ * @brief Gets all the user custom texts of an account.
*
- * @param[in] account The account handle
- * @param[in] callback The callback function to retreive all custom text. The callback function gives key and value
- * @param[in] user_data The user data to be passed to the callback function
+ * @since_tizen 2.3
+ * @param[in] account The account handle
+ * @param[in] callback The callback function to retrieve all custom text \n
+ * The callback function gives the key and value.
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_set_custom()
*/
-ACCOUNT_API int account_get_custom_all(account_h account, account_custom_cb cb_func, void* user_data);
+ACCOUNT_API int account_get_custom_all(account_h account, account_custom_cb callback, void* user_data);
/**
- * @brief Retrieves all accounts details by invoking the given callback function iteratively.
+ * @brief Retrieves all accounts details by invoking the given callback function iteratively.
*
- * @param[in] callback The callback function to invoke
- * @param[in] user_data The user data to be passed to the callback function
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The callback function to invoke
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND Related record does not exist
*
- * @pre This function requires an open connection to account service by account_connect().
- * @post This function invokes account_cb().
+ * @pre This function requires an open connection to an account service by account_connect().
+ * @post This function invokes account_cb().
*
* @see account_connect()
* @see account_query_account_by_account_id()
/**
- * @brief Retrieves all accounts with the account database ID.
+ * @brief Retrieve an account with the account ID.
*
- * @param[in] account_db_id The account database ID to search
- * @param[out] account account handle. Must be allocated by account_create and free after using by account_destroy.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] account_db_id The account database ID to search
+ * @param[out] account The account handle \n
+ * Must be allocated by account_create() and freed after using by account_destroy().
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
- * @see account_query_account_by_account_id()
* @see account_query_account_by_user_name()
* @see account_query_account_by_package_name()
* @see account_query_account_by_capability()
ACCOUNT_API int account_query_account_by_account_id(int account_db_id, account_h *account);
/**
- * @brief Retrieves all accounts with the user name.
+ * @brief Retrieves all accounts with the user name.
*
- * @param[in] callback The callback function to invoke
- * @param[in] user_name The user name to search
- * @param[in] user_data The user data to be passed to the callback function
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The callback function to invoke
+ * @param[in] user_name The user name to search
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
- * @post This function invokes account_cb().
+ * @pre This function requires an open connection to an account service by account_connect().
+ * @post This function invokes account_cb().
*
* @see account_connect()
* @see account_foreach_account_from_db()
ACCOUNT_API int account_query_account_by_user_name(account_cb callback, const char* user_name, void* user_data);
/**
- * @brief Retrieves all accounts with the package name.
+ * @brief Retrieves all accounts with the package name.
*
- * @param[in] callback The callback function to invoke
- * @param[in] package_name The package name to search
- * @param[in] user_data The user data to be passed to the callback function
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The callback function to invoke
+ * @param[in] package_name The package name to search
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
- * @post This function invokes account_cb().
+ * @pre This function requires an open connection to an account service by account_connect().
+ * @post This function invokes account_cb().
*
* @see account_connect()
* @see account_foreach_account_from_db()
ACCOUNT_API int account_query_account_by_package_name(account_cb callback, const char *package_name, void *user_data);
/**
- * @brief Retrieves all accounts with the capability type and capability value.
+ * @brief Retrieves all accounts with the capability type and capability value.
*
- * @param[in] callback The callback function to invoke
- * @param[in] capability_type The capablity type to search
- * @param[in] capability_value The capablity value to search
- * @param[in] user_data The user data to be passed to the callback function
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The callback function to invoke
+ * @param[in] capability_type The capability type to search
+ * @param[in] capability_value The capability value to search
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
- * @post This function invokes account_cb().
+ * @pre This function requires an open connection to an account service by account_connect().
+ * @post This function invokes account_cb().
*
* @see account_connect()
* @see account_foreach_account_from_db()
ACCOUNT_API int account_query_account_by_capability(account_cb callback, const char* capability_type, account_capability_state_e capability_value, void *user_data);
/**
- * @brief Retrieves all accounts with the capability type.
+ * @brief Retrieves all accounts with the capability type.
*
- * @param[in] callback The callback function to invoke
- * @param[in] capability_type The capablity type to search
- * @param[in] user_data The user data to be passed to the callback function
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The callback function to invoke
+ * @param[in] capability_type The capability type to search
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
- * @post This function invokes account_cb().
+ * @pre This function requires an open connection to an account service by account_connect().
+ * @post This function invokes account_cb().
*
* @see account_connect()
* @see account_foreach_account_from_db()
* @see account_query_account_by_user_name()
* @see account_query_account_by_package_name()
*/
-ACCOUNT_API int account_query_account_by_capability_type(account_cb cb_func, const char* capability_type, void* user_data);
+ACCOUNT_API int account_query_account_by_capability_type(account_cb callback, const char* capability_type, void* user_data);
/**
- * @brief Retrieves all capabilities with the account database ID.
+ * @brief Retrieves all capabilities with the account database ID.
*
- * @param[in] callback The callback function to invoke
- * @param[in] account_db_id The account database ID to search
- * @param[in] user_data The user data to be passed to the callback function
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The callback function to invoke
+ * @param[in] account_db_id The account database ID to search
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
- * @post This function invokes capability_cb().
+ * @pre This function requires an open connection to an account service by account_connect().
+ * @post This function invokes capability_cb().
*
* @see account_connect()
* @see account_get_capability()
/**
- * @brief Retrieves number of account in the account database.
+ * @brief Gets the count of accounts in the account database.
*
- * @param[out] out parameter for number of all accounts
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[out] count The out parameter for count of all accounts
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
*/
ACCOUNT_API int account_get_total_count_from_db(int *count);
/**
- * @brief changes sync status of account by account id
+ * @brief Updates the sync status of an account with the given account ID.
*
- * @param[in] account_db_id The account id which sync status needs to be change
- * @param[in] sync_status New sync status
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] account_db_id The account ID for which sync status needs to be changed
+ * @param[in] sync_status The new sync status
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
*/
/**
- * @brief Creates a handle to the account.
+ * @brief Creates a handle to the account provider.
*
- * @remarks @a account type handle must be released with account_type_destroy() by you. \n
- * The created handle is not added to the account database until account_type_insert_to_db() is called.
+ * @since_tizen 2.3
+ * @remarks You must release @a account_type handle using account_type_destroy().\n
*
- * @param[in] account_type The account type handle
+ * @param[in] account_type The account provider handle
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_type_destroy()
*/
ACCOUNT_API int account_type_create(account_type_h *account_type);
/**
- * @brief Destroys the account type handle and releases all its resources.
- * When you get account_type_h through account_type_create, the handle should be released by account_destroy to avoid memory leak
+ * @brief Destroys the account provider handle and releases all its resources.
*
- * @param[in] account_type The account type handle
+ * @since_tizen 2.3
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @remarks When you get @a account_type_h using account_type_create(), you must release the handle using account_destroy() to avoid the memory leak.
+ *
+ * @param[in] account_type The account provider handle
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_type_create()
*/
ACCOUNT_API int account_type_destroy(account_type_h account_type);
/**
- * @brief Sets the app id. It should be filled with your application id. e.g) com.tizen.testapp
+ * @internal
+ * @brief Sets the app ID.
+ * It should be filled with your application ID. For example, com.tizen.testapp.
*
- * @remarks @ app id is mandatory field and is not allowed duplicated app id in account type database
+ * @since_tizen 2.3
+ * @remarks @a app_id is a mandatory field and does not allow duplicate app ID in the account provider database.
*
- * @param[in] account_type The account type handle. It should be assigned by account_type_create()
- * @param[in] app_id Application id of yours.
+ * @param[in] account_type The account provider handle \n
+ * It should be assigned by account_type_create().
+ * @param[in] app_id The application ID
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_get_app_id()
*/
ACCOUNT_API int account_type_set_app_id(account_type_h account_type, const char *app_id);
/**
- * @brief Sets the service provider id. It should be filled with your service provider id.
+ * @internal
+ * @brief Sets the service provider ID.
+ * It should be filled with your service provider ID.
*
- * @remarks @ service provider id is mandatory field.
+ * @since_tizen 2.3
+ * @remarks @a service_provider_id is a mandatory field.
*
- * @param[in] account_type The account type handle. It should be assigned by account_type_create()
- * @param[in] service_provider_id Service provider id of yours.
+ * @param[in] account_type The account provider handle \n
+ * It should be assigned by account_type_create().
+ * @param[in] service_provider_id The service provider ID
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_get_service_provider_id()
*/
ACCOUNT_API int account_type_set_service_provider_id(account_type_h account_type, const char *service_provider_id);
/**
- * @brief Sets icon path. It represents your service provider or application.
+ * @internal
+ * @brief Sets icon path.
+ * It represents your service provider or an application.
*
- * @remarks @ icon_path is not mandatory field. But when it is set, you can display this icon in add account screen.
+ * @since_tizen 2.3
+ * @remarks @a icon_path is not a mandatory field. But when it is set, you can display this icon in the Add Account screen.
*
- * @param[in] account_type The account type handle. It should be assigned by account_type_create()
- * @param[in] icon_path of your application.
+ * @param[in] account_type The account provider handle\n
+ * It should be assigned by account_type_create().
+ * @param[in] icon_path The icon path of the application
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_get_icon_path()
*/
ACCOUNT_API int account_type_set_icon_path(account_type_h account_type, const char *icon_path);
/**
- * @brief Sets small icon path. It also represents your service provider or application.
+ * @internal
+ * @brief Sets small icon path.
+ * It also represents your service provider or an application.
*
- * @remarks @ small icon_path is not mandatory field.
+ * @since_tizen 2.3
+ * @remarks @a small_icon_path is not a mandatory field.
*
- * @param[in] account_type The account type handle. It should be assigned by account_type_create()
- * @param[in] small_icon_path the scaled icon of your application.
+ * @param[in] account_type The account provider handle \n
+ * It should be assigned by account_type_create().
+ * @param[in] small_icon_path The scaled icon of your application
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_get_small_icon_path()
*/
ACCOUNT_API int account_type_set_small_icon_path(account_type_h account_type, const char *small_icon_path);
/**
- * @brief Sets multiple account. It represents whether your application support multiple accounts or not.
+ * @internal
+ * @brief Sets support for multiple accounts.
+ * It represents whether your application supports multiple accounts.
*
- * @remarks @ The default value of multiple account support is FALSE.
+ * @since_tizen 2.3
+ * @remarks The default value of multiple account support is @c FALSE.
*
- * @param[in] account_type The account type handle. It should be assigned by account_type_create()
- * @param[in] multiple_account_support TRUE means that your application can make two or more accounts. FALSE means that your application can make only one account.
+ * @param[in] account_type The account provider handle \n
+ * It should be assigned by account_type_create().
+ * @param[in] multiple_account_support Set @c TRUE if your application can support two or more accounts, \n
+ * otherwise @c FALSE if your application can support only one account
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_get_multiple_account_support()
*/
ACCOUNT_API int account_type_set_multiple_account_support(account_type_h account_type, const bool multiple_account_support);
/**
- * @brief Sets label and locale. Label represents the name of account type.
+ * @internal
+ * @brief Sets label and locale.
+ * Label represents the name of an account provider.
*
- * @param[in] account_type The account type handle. It should be assigned by account_type_create()
- * @param[in] label The name of account depend on the specified locale
- * @param[in] locale Locale of the corresponding label
+ * @since_tizen 2.3
+ * @param[in] account_type The account provider handle \n
+ * It should be assigned by account_type_create().
+ * @param[in] label The name of account depends on the specified locale
+ * @param[in] locale The locale is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.\n
+ * For example, "ko_KR" for Korean, "en_US" for American English.
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_get_label()
*/
ACCOUNT_API int account_type_set_label(account_type_h account_type, const char* label, const char* locale);
/**
- * @brief Sets the provider feature.
+ * @internal
+ * @brief Sets the capability.
*
- * @param[in] account_type The account type handle
- * @param[in] provider_feature This will be capability key of account
+ * @since_tizen 2.3
+ * @param[in] account_type The account provider handle
+ * @param[in] provider_feature Th capability key of the account
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_set_capability()
*/
ACCOUNT_API int account_type_set_provider_feature(account_type_h account_type, const char* provider_feature);
/**
- * @brief Retrieves provider feature information with your applicaiton id.
+ * @brief Retrieves capability information with your application ID.
*
- * @param[in] cb_func Callback function will carry provider feature name of app id.
- * @param[in] app_id Your application ID to search
- * @param[in] user_data User data if you have your private data to carry into callback function, you can use.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The callback function carries the capability name of an app ID
+ * @param[in] app_id The application ID to search
+ * @param[in] user_data The user data \n
+ * If you have your private data to carry into callback function, then you can use it.
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
- * @see account_type_set_provider_feature()
* @see account_disconnect()
*/
-ACCOUNT_API int account_type_query_provider_feature_by_app_id(provider_feature_cb cb_func, const char* app_id, void *user_data );
+ACCOUNT_API int account_type_query_provider_feature_by_app_id(provider_feature_cb callback, const char* app_id, void *user_data );
/**
- * @brief Retrieves label information with your applicaiton id.
+ * @brief Checks whether the given application ID supports the capability.
*
- * @param[in] cb_func Callback function will carry provider feature name of app id.
- * @param[in] app_id Your application ID to search
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
+ * @param[in] app_id The application ID
+ * @param[in] capability The capability \n
+ * For example, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT or "http://tizen.org/account/capability/contact"
*
- * @return 0 on success, otherwise a negative error value.
- * @retval TRUE means the application supports the given capability
- * @retval FALSE means the application does not support the given capability
+ * @return @c TRUE if the application supports the given capability, \n
+ * otherwise @c FALSE if the application does not support the given capability
+ * @retval @c TRUE means the application supports the given capability
+ * @retval @c FALSE means the application does not support the given capability
+ * @exception #ACCOUNT_ERROR_NONE Successful
+ * @exception #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @exception #ACCOUNT_ERROR_RECORD_NOT_FOUND Related record does not exist
+ * @exception #ACCOUNT_ERROR_PERMISSION_DENIED DB access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
- * @see account_type_set_provider_feature()
* @see account_disconnect()
*/
ACCOUNT_API bool account_type_query_supported_feature(const char* app_id, const char* capability);
/**
- * @brief Gets the application id of account type.
+ * @brief Gets the application ID of an account provider.
*
- * @remarks @a app_id must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a app_id using free().
*
- * @param[in] account_type The account type handle. It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db
- * @param[out] app_id application id of account type item
+ * @param[in] account_type The account provider handle \n
+ * It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
+ * @param[out] app_id The application ID of an account provider item
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
- * @see account_type_set_app_id()
*/
ACCOUNT_API int account_type_get_app_id(account_type_h account_type, char **app_id);
/**
- * @brief Gets the service provider id of account type.
+ * @brief Gets the service provider ID of an account provider.
*
- * @remarks @a service_provider_id must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a service_provider_id using free().
*
- * @param[in] account_type The account type handle. It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db
- * @param[out] service_provider_id service provider text id of account type item
+ * @param[in] account_type The account provider handle \n
+ * It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
+ * @param[out] service_provider_id The service provider text ID of an account provider item
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
- * @see account_type_set_service_provider_id()
*/
ACCOUNT_API int account_type_get_service_provider_id(account_type_h account_type, char **service_provider_id);
/**
- * @brief Gets icon path of account type.
+ * @brief Gets the icon path of an account provider.
*
- * @remarks @a icon_path must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a icon_path using free().
*
- * @param[in] account_type The account type handle. It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db
- * @param[out] icon_path It represents the icon of account type item
+ * @param[in] account_type The account provider handle \n
+ * It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
+ * @param[out] icon_path The icon path of the account provider item
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
- * @see account_type_set_icon_path()
*/
ACCOUNT_API int account_type_get_icon_path(account_type_h account_type, char **icon_path);
/**
- * @brief Gets small icon path of account type.
+ * @brief Gets the small icon path of an account provider.
*
- * @remarks @a small_icon_path must be released with free() by you.
+ * @since_tizen 2.3
+ * @remarks You must release @a small_icon_path using free().
*
- * @param[in] account_type The account type handle. It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db
- * @param[out] small_icon_path It represents the small icon of account type item
+ * @param[in] account_type The account provider handle\n
+ * It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
+ * @param[out] small_icon_path The small icon path of the account provider item
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
- * @see account_type_set_small_icon_path()
*/
ACCOUNT_API int account_type_get_small_icon_path(account_type_h account_type, char **small_icon_path);
/**
- * @brief Gets small icon path of account type.
+ * @brief Checks whether the given account provider supports multiple accounts.
*
- * @param[in] account_type The account type handle. It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db
- * @param[out] multiple_account_support It represents whether the retreived account type supports over two accounts or not. TRUE or FALSE
+ * @since_tizen 2.3
+ * @param[in] account_type The account provider handle \n
+ * It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db.
+ * @param[out] multiple_account_support The flag indicating support for multiple accounts accounts\n
+ * TRUE or FALSE.
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
- * @see account_type_set_small_icon_path()
*/
ACCOUNT_API int account_type_get_multiple_account_support(account_type_h account_type, int *multiple_account_support);
/**
- * @brief Retrieves provider feature information with the given account_type_h.
+ * @brief Gets capability information with the given account provider handle.
*
- * @param[in] account_type The account type handle. It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db
- * @param[in] cb_func Callback function will carry provider feature name of app id.
- * @param[in] user_data User data if you have your private data to carry into callback function, you can use.
+ * @since_tizen 2.3
+ * @param[in] account_type The account provider handle\n
+ * It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
+ * @param[in] callback The callback function that carries the capability name of the app ID
+ * @param[in] user_data The user data \n
+ * If you have your private data to carry into callback function, then you can use it.
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
- * @see account_type_set_provider_feature()
* @see account_disconnect()
*/
-ACCOUNT_API int account_type_get_provider_feature_all(account_type_h account_type, provider_feature_cb cb_func, void* user_data);
+ACCOUNT_API int account_type_get_provider_feature_all(account_type_h account_type, provider_feature_cb callback, void* user_data);
/**
- * @brief Gets the specific label information detail of account type.
+ * @brief Gets the specific label information detail of an account provider.
*
- * @param[in] account_type The account type handle. It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db
- * @param[in] locale Locale query. E.g) "en-gb"
- * @param[out] label Label text will be given for the locale.
+ * @since_tizen 2.3
+ * @param[in] account_type The account provider handle\n
+ * It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
+ * @param[in] locale The locale is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.\n
+ * For example, "ko_KR" or "ko-kr" for Korean, "en_US" or "en-us" for American English.
+ * @param[out] label The label text given for the locale
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND No label for the given locale
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND No label for the given locale
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
- * @see account_type_set_label()
*/
ACCOUNT_API int account_type_get_label_by_locale(account_type_h account_type, const char* locale, char** label);
/**
- * @brief Gets the label information detail of account type.
+ * @brief Gets the label information detail of an account provider.
*
- * @param[in] account_type The account type handle. It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db
- * @param[in] callback The callback function carrying label information
- * @param[in] user_data The user data to be passed to the callback function
+ * @since_tizen 2.3
+ * @param[in] account_type The account provider handle\n
+ * It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db().
+ * @param[in] callback The callback function carrying the label information
+ * @param[in] user_data The user data to be passed to the callback function
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_type_foreach_account_type_from_db()
* @see account_type_query_by_app_id()
- * @see account_type_set_label()
*/
-ACCOUNT_API int account_type_get_label(account_type_h account_type, account_label_cb cb_func, void *user_data);
+ACCOUNT_API int account_type_get_label(account_type_h account_type, account_label_cb callback, void *user_data);
/**
- * @brief Inserts the account type details to the database.
+ * @internal
+ * @brief Inserts the account provider details to the database.
*
- * @param[in] account_type The account handle which is created by account_type_create(). And the madatory fields must be filled with account_type_set_* functions
- * @param[out] account_type_id The account type ID to be assigned after inserting account type handle.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] account_type The account handle which is created by account_type_create() \n
+ * @param[out] account_type_id The account provider ID to be assigned after inserting the account provider handle
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
- * @post account_disconnect() is recommended after insertion
+ * @pre This function requires an open connection to an account service by account_connect().
+ * @post account_disconnect() is recommended after insertion.
*
* @see account_connect()
- * @see account_type_set_app_id()
- * @see account_type_set_service_provider_id()
- * @see account_type_set_icon_path()
- * @see account_type_set_small_icon_path()
- * @see account_type_set_multiple_account_support()
- * @see account_type_set_label()
- * @see account_type_delete_by_app_id()
- * @see account_type_update_to_db_by_app_id()
* @see account_disconnect()
*/
ACCOUNT_API int account_type_insert_to_db(account_type_h account_type, int* account_type_id);
/**
- * @brief Updates the account details to the account database.
+ * @internal
+ * @brief Updates the account details to the account database.
*
- * @param[in] account_type The account handle which is created by account_type_create(). And the madatory fields must be filled with account_type_set_* functions
- * @param[in] app_id Application id of account type
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] account_type The account handle which is created by account_type_create() \n
+ * @param[in] app_id The application ID of the account provider
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect()
- * @post account_disconnect() is recommended after update
+ * @pre This function requires an open connection to an account service by account_connect().
+ * @post account_disconnect() is recommended after update.
*
* @see account_connect()
- * @see account_type_insert_to_db()
- * @see account_type_set_app_id()
- * @see account_type_set_service_provider_id()
- * @see account_type_set_icon_path()
- * @see account_type_set_small_icon_path()
- * @see account_type_set_multiple_account_support()
- * @see account_type_set_label()
- * @see account_type_delete_by_app_id()
* @see account_disconnect()
*/
ACCOUNT_API int account_type_update_to_db_by_app_id(const account_type_h account_type, const char* app_id);
/**
- * @brief Deletes the account type from the account database by application id.
+ * @internal
+ * @brief Deletes the account provider from the account database by application ID.
*
- * @param[in] app_id Application id of account type to be deleted
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read \n
+ * %http://tizen.org/privilege/account.write
+ * @remarks this API need both privileges
+ * @param[in] app_id The application ID of account provider to be deleted
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect()
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
- * @see account_type_insert_to_db()
- * @see account_type_update_to_db_by_app_id()
* @see account_disconnect()
*/
ACCOUNT_API int account_type_delete_by_app_id(const char* app_id);
/**
- * @brief Retrieves label information with your applicaiton id.
+ * @brief Retrieves the label information with your application ID.
*
- * @param[in] cb_func Callback function will carry label_h for label information. label_h contains label info as parameter.
- * @param[in] app_id Your application ID to search
- * @param[in] user_data User data if you have your private data to carry into callback function, you can use.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The callback function that carries label_h for label information \n
+ * label_h contains label info as parameter.
+ * @param[in] app_id The application ID to search
+ * @param[in] user_data The user data \n
+ * If you have your private data to carry into callback function, then you can use it.
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
* @see account_type_query_by_app_id()
* @see account_type_foreach_account_type_from_db()
* @see account_disconnect()
*/
-ACCOUNT_API int account_type_query_label_by_app_id(account_label_cb cb_func, const char* app_id, void *user_data );
+ACCOUNT_API int account_type_query_label_by_app_id(account_label_cb callback, const char* app_id, void *user_data );
/**
- * @brief Retrieves account type information with your applicaiton id.
+ * @brief Retrieves the account provider information with your application ID.
*
- * @param[in] app_id Your application ID to search
- * @param[out] account_type The account handle which is created by account_type_create().
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] app_id The application ID to search
+ * @param[out] account_type The account handle which is created by account_type_create()
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
- * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND query data is not exist
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND Queried data does not exist
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
* @see account_type_create()
ACCOUNT_API int account_type_query_by_app_id(const char* app_id, account_type_h *account_type);
/**
- * @brief Retrieves all account type information with your applicaiton id.
+ * @brief Retrieves all account priovider information.
*
- * @param[in] callback Retrieving account type information. You can get account information through account_type_get_* with the carried account_type_handle
- * @param[in] user_data User data. It will be carried through your callback function.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The account provider information \n
+ * You can get the account information through account_type_get_* with the carried account_type_handle.
+ * @param[in] user_data The user data \n
+ * It will be carried through your callback function.
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
* @see account_type_create()
ACCOUNT_API int account_type_foreach_account_type_from_db(account_type_cb callback, void *user_data);
/**
- * @brief Retrieves all account type information with your applicaiton id.
+ * @brief Retrieves the label information with the given application ID and locale.
*
- * @param[in] app_id Your application id
- * @param[in] locale Locale value to search label. e.g) en_US
- * @param[out] label label text corresponding app_id and locale. It must be free.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] app_id The application ID
+ * @param[in] locale The locale is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.\n
+ * For example, "ko_KR" or "ko-kr" for Korean, "en_US" or "en-us" for American English.
+ * @param[out] label The label text corresponding app_id and locale \n
+ * It must be free text.
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
*/
ACCOUNT_API int account_type_query_label_by_locale(const char* app_id, const char* locale, char** label);
/**
- * @brief Retrieves account type information with provider feature name.
+ * @brief Retrieves account provider information with the capability name.
*
- * @param[in] cb_func callback function to retrieve account type information
- * @param[in] key provider feature value to search account type . e.g) ACCOUNT_SUPPORTS_CAPABILITY_CONTACT or "http://tizen.org/account/capability/contact"
- * @param[out] account_type_h handle corresponding provider feature name.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] callback The callback function to retrieve account provider information
+ * @param[in] key The capability value to search account provider \n
+ * For example, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT or "http://tizen.org/account/capability/contact"
+ * @param[in] user_data If you have your private data to carry into callback function, then you can use it
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND Record not found
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_connect()
*/
-ACCOUNT_API int account_type_query_by_provider_feature(account_type_cb cb_func, const char* key, void* user_data);
+ACCOUNT_API int account_type_query_by_provider_feature(account_type_cb callback, const char* key, void* user_data);
/**
- * @brief Check account type db whether the given app_id exists.
+ * @brief Checks whether the given app_id exists in the account provider DB.
*
- * @param[in] app_id application id to check
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] app_id The application ID to check
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND record not found
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER invalid app id
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND Record not found
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid app ID
+ * @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission
*
- * @pre This function requires an open connection to account service by account_connect().
+ * @pre This function requires an open connection to an account service by account_connect().
*
* @see account_type_query_by_app_id()
*/
-/* End of account type api */
+/* End of account provider API */
/**
- * @brief Creates a handle for account event subscription.
+ * @brief Creates a handle for the account event subscription.
*
- * @remarks @a account_subscribe handle must be released with account_unsubscribe_notification() by you. \n
+ * @since_tizen 2.3
+ * @remarks You must release @a account_subscribe handle using account_unsubscribe_notification().
*
- * @param[in] account_subscribe The account subscription handle
+ * @param[in] account_subscribe The account subscription handle
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
*
* @see account_unsubscribe_notification()
* @see account_subscribe_notification()
ACCOUNT_API int account_subscribe_create(account_subscribe_h* account_subscribe);
/**
- * @brief Start to subscribe account event through the given callback function
+ * @brief Starts to subscribe account event through the given callback function.
*
- * @param[in] account_subscribe The account subscription handle
- * @param[in] cb_func When an account is removed from account database. It will be called with event message and account id.
- * @param[in] user_data user_data will be delivered to cb_func
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @param[in] account_subscribe The account subscription handle
+ * @param[in] callback The callback function that is called when an account is removed and a data of account is updated from the account database \n
+ * It will be called with event message and account ID.
+ * @param[in] user_data The user_data that is delivered to callback
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL Subscription fail
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL Subscription fail
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @pre account_subscribe_create()
*
* @see account_unsubscribe_notification()
* @see account_subscribe_notification()
*/
-ACCOUNT_API int account_subscribe_notification(account_subscribe_h account_subscribe, account_event_cb cb_func, void* user_data);
+ACCOUNT_API int account_subscribe_notification(account_subscribe_h account_subscribe, account_event_cb callback, void* user_data);
/**
- * @brief Destroys the account subscribe handle and releases all its resources.
+ * @brief Destroys the account subscribe handle and releases all its resources.
*
- * @remarks @account_unsubscribe_notification must be called when you don't need to subscribe account event \n
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/account.read
+ * @remarks You must call @a account_unsubscribe_notification when you do not need to subscribe account event.
*
- * @param[in] account_subscribe The account subscription handle
+ * @param[in] account_subscribe The account subscription handle
*
- * @return 0 on success, otherwise a negative error value.
- * @retval #ACCOUNT_ERROR_NONE Successful
- * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL Unsubscription fail
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #ACCOUNT_ERROR_NONE Successful
+ * @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL Unsubscription failed
*
* @see account_create()
*/
ACCOUNT_API int account_unsubscribe_notification(account_subscribe_h account_subscribe);
-
/**
* @}
*/
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "Tarun Kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung electronics");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.twiter");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "URUSA inc.");
ret = account_set_user_text(account, i, "user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 888);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
return;
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return;
char* test_type = capability_type;
int test_value = capability_value;
- printf("_capability_get_callback test_type = : %s\n", test_type);
- printf("_capability_get_callback test_value = : %d\n", test_value);
+ SECURE_LOGD("_capability_get_callback test_type = : %s\n", test_type);
+ SECURE_LOGD("_capability_get_callback test_value = : %d\n", test_value);
return TRUE;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_query_account_by_account_id(account_id, &account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
char *test_text = NULL;
account_get_user_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_display_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_email_address(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_icon_path(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_source(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_package_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_domain_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_access_token(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
int i;
_account_free_text(test_text);
account_get_user_text(handle, i, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
}
int test_int = -1;
account_auth_type_e auth_type;
account_get_auth_type(handle, &auth_type);
- printf("account_get_auth_type : %d\n", auth_type);
+ SECURE_LOGD("account_get_auth_type : %d\n", auth_type);
account_secrecy_state_e secret;
account_get_secret(handle, &secret);
- printf("account_get_secret : %d\n", secret);
+ SECURE_LOGD("account_get_secret : %d\n", secret);
account_sync_state_e sync_support;
account_get_sync_support(handle, &sync_support);
- printf("account_get_sync_support : %d\n", sync_support);
+ SECURE_LOGD("account_get_sync_support : %d\n", sync_support);
for(i=0;i<USER_INT_CNT;i++)
{
test_int = -1;
account_get_user_int(handle, i, &test_int);
- printf("_account_get_callback : %d\n", test_int);
+ SECURE_LOGD("_account_get_callback : %d\n", test_int);
}
account_get_capability(handle, _capability_get_callback, NULL);
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
}
@endcode
bool _account_get_callback(account_h handle, void* user_data)
{
- printf("_account_get_callback\n");
+ SECURE_LOGD("_account_get_callback\n");
char *test_text = NULL;
account_get_user_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_display_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_email_address(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_icon_path(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_source(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_package_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_domain_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_access_token(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
int i;
_account_free_text(test_text);
account_get_user_text(handle, i, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
}
int test_int = -1;
account_auth_type_e auth_type;
account_get_auth_type(handle, &auth_type);
- printf("account_get_auth_type : %d\n", auth_type);
+ SECURE_LOGD("account_get_auth_type : %d\n", auth_type);
account_secrecy_state_e secret;
account_get_secret(handle, &secret);
- printf("account_get_secret : %d\n", secret);
+ SECURE_LOGD("account_get_secret : %d\n", secret);
account_sync_state_e sync_support;
account_get_sync_support(handle, &sync_support);
- printf("account_get_sync_support : %d\n", sync_support);
+ SECURE_LOGD("account_get_sync_support : %d\n", sync_support);
for(i=0;i<USER_INT_CNT;i++)
{
test_int = -1;
account_get_user_int(handle, i, &test_int);
- printf("_account_get_callback : %d\n", test_int);
+ SECURE_LOGD("_account_get_callback : %d\n", test_int);
}
account_get_capability(handle, _capability_get_callback, NULL);
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_account_by_user_name(_account_get_callback, user_name, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
}
@endcode
bool _account_get_callback(account_h handle, void* user_data)
{
- printf("_account_get_callback\n");
+ SECURE_LOGD("_account_get_callback\n");
char *test_text = NULL;
account_get_user_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_display_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_email_address(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_icon_path(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_source(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_package_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_domain_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_access_token(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
int i;
_account_free_text(test_text);
account_get_user_text(handle, i, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
}
int test_int = -1;
account_auth_type_e auth_type;
account_get_auth_type(handle, &auth_type);
- printf("account_get_auth_type : %d\n", auth_type);
+ SECURE_LOGD("account_get_auth_type : %d\n", auth_type);
account_secrecy_state_e secret;
account_get_secret(handle, &secret);
- printf("account_get_secret : %d\n", secret);
+ SECURE_LOGD("account_get_secret : %d\n", secret);
account_sync_state_e sync_support;
account_get_sync_support(handle, &sync_support);
- printf("account_get_sync_support : %d\n", sync_support);
+ SECURE_LOGD("account_get_sync_support : %d\n", sync_support);
for(i=0;i<USER_INT_CNT;i++)
{
test_int = -1;
account_get_user_int(handle, i, &test_int);
- printf("_account_get_callback : %d\n", test_int);
+ SECURE_LOGD("_account_get_callback : %d\n", test_int);
}
account_get_capability(handle, _capability_get_callback, NULL);
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_account_by_package_name(_account_get_callback, package_name, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
}
@endcode
bool _account_get_callback(account_h handle, void* user_data)
{
- printf("_account_get_callback\n");
+ SECURE_LOGD("_account_get_callback\n");
char *test_text = NULL;
account_get_user_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_display_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_email_address(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_icon_path(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_source(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_package_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_domain_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_access_token(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
int i;
_account_free_text(test_text);
account_get_user_text(handle, i, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ SECURE_LOGD("_account_get_callback : %s\n", test_text);
}
int test_int = -1;
account_auth_type_e auth_type;
account_get_auth_type(handle, &auth_type);
- printf("account_get_auth_type : %d\n", auth_type);
+ SECURE_LOGD("account_get_auth_type : %d\n", auth_type);
account_secrecy_state_e secret;
account_get_secret(handle, &secret);
- printf("account_get_secret : %d\n", secret);
+ SECURE_LOGD("account_get_secret : %d\n", secret);
account_sync_state_e sync_support;
account_get_sync_support(handle, &sync_support);
- printf("account_get_sync_support : %d\n", sync_support);
+ SECURE_LOGD("account_get_sync_support : %d\n", sync_support);
for(i=0;i<USER_INT_CNT;i++)
{
test_int = -1;
account_get_user_int(handle, i, &test_int);
- printf("_account_get_callback : %d\n", test_int);
+ SECURE_LOGD("_account_get_callback : %d\n", test_int);
}
account_get_capability(handle, _capability_get_callback, NULL);
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_foreach_account_from_db(_account_get_callback, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
}
@endcode
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "update-URUSA inc.");
ret = account_set_user_text(account, i, "update-user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 999);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
return;
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
}
@endcode
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ 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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
int i;
ret = account_set_user_text(account, i, "update-user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 999);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_update_to_db_by_user_name(account, user_name, package_name);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
return;
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ SECURE_LOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
}
@endcode
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_delete(account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_update_sync_status_by_id(account_id, sync_status);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_delete_from_db_by_user_name(user_name, package_name);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_delete_from_db_by_package_name(package_name);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return;
}
DBusConnection* conn;
DBusError err;
- printf("Listening for signals\n");
+ SECURE_LOGD("Listening for signals\n");
dbus_error_init(&err);
conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
if (dbus_error_is_set(&err)) {
- fprintf(stderr, "Connection Error (%s)\n", err.message);
dbus_error_free(&err);
}
if (NULL == conn) {
dbus_bus_add_match(conn, "type='signal',interface='account.signal.Type'", &err);
dbus_connection_flush(conn);
if (dbus_error_is_set(&err)) {
- fprintf(stderr, "Match Error (%s)\n", err.message);
exit(1);
}
- printf("Match rule sent\n");
+ SECURE_LOGD("Match rule sent\n");
while (true) {
}
if (dbus_message_is_signal(msg, ACCOUNT_DBUS_SIGNAL_INTERFACE, ACCOUNT_DBUS_NOTI_NAME_INSERT)) {
- printf("Got Signal with name insert\n");
+ SECURE_LOGD("Got Signal with name insert\n");
}
dbus_message_unref(msg);
DBusConnection* conn;
DBusError err;
- printf("Listening for signals\n");
+ SECURE_LOGD("Listening for signals\n");
dbus_error_init(&err);
conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
if (dbus_error_is_set(&err)) {
- fprintf(stderr, "Connection Error (%s)\n", err.message);
dbus_error_free(&err);
}
if (NULL == conn) {
dbus_bus_add_match(conn, "type='signal',interface='account.signal.Type'", &err);
dbus_connection_flush(conn);
if (dbus_error_is_set(&err)) {
- fprintf(stderr, "Match Error (%s)\n", err.message);
exit(1);
}
- printf("Match rule sent\n");
+ SECURE_LOGD("Match rule sent\n");
while (true) {
}
if (dbus_message_is_signal(msg, ACCOUNT_DBUS_SIGNAL_INTERFACE, ACCOUNT_DBUS_NOTI_NAME_UPDATE)) {
- printf("Got Signal with name update\n");
+ SECURE_LOGD("Got Signal with name update\n");
}
dbus_message_unref(msg);
DBusConnection* conn;
DBusError err;
- printf("Listening for signals\n");
+ SECURE_LOGD("Listening for signals\n");
dbus_error_init(&err);
conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
if (dbus_error_is_set(&err)) {
- fprintf(stderr, "Connection Error (%s)\n", err.message);
dbus_error_free(&err);
}
if (NULL == conn) {
dbus_bus_add_match(conn, "type='signal',interface='account.signal.Type'", &err);
dbus_connection_flush(conn);
if (dbus_error_is_set(&err)) {
- fprintf(stderr, "Match Error (%s)\n", err.message);
exit(1);
}
- printf("Match rule sent\n");
+ SECURE_LOGD("Match rule sent\n");
while (true) {
}
if (dbus_message_is_signal(msg, ACCOUNT_DBUS_SIGNAL_INTERFACE, ACCOUNT_DBUS_NOTI_NAME_DELETE)) {
- printf("Got Signal with name delete\n");
+ SECURE_LOGD("Got Signal with name delete\n");
}
dbus_message_unref(msg);
char* test_type = capability_type;
int test_value = capability_value;
- printf("_capability_get_callback test_type = : %s\n", test_type);
- printf("_capability_get_callback test_value = : %d\n", test_value);
+ SECURE_LOGD("_capability_get_callback test_type = : %s\n", test_type);
+ SECURE_LOGD("_capability_get_callback test_value = : %d\n", test_value);
return TRUE;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_capability_by_account_id(_capability_get_callback, account_id, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ SECURE_LOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return;
}
<domain name="libaccounts-svc"/>
<provide>
<label name="libaccounts-svc::db"/>
+ <label name="libaccounts-svc::check_read"/>
</provide>
<request>
<smack request="libaccounts-svc::db" type="rw" />
</request>
<assign>
<filesystem path="/usr/lib/libaccounts-svc.so.0" label="_" />
- <filesystem path="/usr/lib/libaccounts-svc.so.0.2.66" label="_" />
+ <filesystem path="/usr/lib/libaccounts-svc.so.0.2.97" label="_" />
</assign>
</manifest>
Name: libaccounts-svc
Summary: Account DB library
-Version: 0.2.66
+Version: 0.2.113
Release: 1
Group: TO_BE/FILLED_IN
-License: Apache-2.0
+License: TO BE FILLED IN
Source0: libaccounts-svc-%{version}.tar.gz
BuildRequires: cmake
+BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(db-util)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(aul)
+BuildRequires: pkgconfig(libsmack)
+
Requires(post): /sbin/ldconfig
Requires(post): /usr/bin/sqlite3
Requires(postun): /sbin/ldconfig
%setup -q
%build
+export CFLAGS+=" -Wextra -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wswitch-default"
+export CXXFLAGS+=" -Wextra -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wswitch-default -Wnon-virtual-dtor -Wno-c++0x-compat"
+#export CFLAGS+=" -Wno-array-bounds -Wno-ignored-qualifiers"
+export CFLAGS+=" -Wno-unused-parameter -Wno-empty-body"
+export CXXFLAGS+=" -Wno-unused-parameter -Wno-empty-body"
+
+export CFLAGS+=" -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow -fno-common"
+export CXXFLAGS+=" -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow"
+
export CFLAGS="${CFLAGS} -fPIC -fvisibility=hidden"
cmake . -DCMAKE_INSTALL_PREFIX=/usr
%make_install
rm -rf %{buildroot}/usr/lib/accounts-svc
-mkdir -p %{buildroot}/usr/share/license
-cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
%post
/sbin/ldconfig
-if [ ! -d /opt/dbspace ]
+if [ ! -d /opt/usr/dbspace ]
then
- mkdir -p /opt/dbspace
+ mkdir -p /opt/usr/dbspace
fi
-if [ ! -f /opt/dbspace/.account.db ]
-#rm -rf /opt/dbspace/.account.db*
+if [ ! -f /opt/usr/dbspace/.account.db ]
+#rm -rf /opt/usr/dbspace/.account.db*
then
- sqlite3 /opt/dbspace/.account.db 'PRAGMA journal_mode = PERSIST;
+ sqlite3 /opt/usr/dbspace/.account.db 'PRAGMA journal_mode = PERSIST;
CREATE TABLE if not exists label (AppId TEXT, Label TEXT, Locale TEXT);
CREATE TABLE if not exists account_type (_id INTEGER PRIMARY KEY AUTOINCREMENT, AppId TEXT,
ServiceProviderId TEXT, IconPath TEXT, SmallIconPath TEXT, MultipleAccountSupport INT);
int_custom0 INTEGER, int_custom1 INTEGER, int_custom2 INTEGER, int_custom3 INTEGER, int_custom4 INTEGER);
CREATE TABLE if not exists capability (_id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, value INTEGER,
package_name TEXT, user_name TEXT, account_id INTEGER, FOREIGN KEY (account_id) REFERENCES account(_id));
- CREATE TABLE if not exists provider_feature (app_id TEXT, key TEXT);'
+ CREATE TABLE if not exists provider_feature (app_id TEXT, key TEXT);
+'
fi
mkdir -p /opt/usr/share/account
-chown 5000:5000 /opt/dbspace/.account.db
-chown 5000:5000 /opt/dbspace/.account.db-journal
-chown 5000:5000 /opt/usr/share/account
+chown 0:5000 /opt/usr/dbspace/.account.db
+chown 0:5000 /opt/usr/dbspace/.account.db-journal
-chmod 660 /opt/dbspace/.account.db
-chmod 660 /opt/dbspace/.account.db-journal
-chmod 755 /opt/usr/share/account
+chmod 664 /opt/usr/dbspace/.account.db
+chmod 664 /opt/usr/dbspace/.account.db-journal
#set message key value to NULL
-vconftool set -t string db/account/msg '' -g 6514
+#vconftool set -t string db/account/msg '' -g 6514
+vconftool set -t string db/account/msg '' -s libaccounts-svc -g 6514
#smack labeling
if [ -f /usr/lib/rpm-plugins/msm.so ]
then
- chsmack -a 'libaccounts-svc::db' /opt/dbspace/.account.db-journal
- chsmack -a 'libaccounts-svc::db' /opt/dbspace/.account.db
+ chsmack -a 'libaccounts-svc::db' /opt/usr/dbspace/.account.db-journal
+ chsmack -a 'libaccounts-svc::db' /opt/usr/dbspace/.account.db
fi
+
%postun -p /sbin/ldconfig
+
+
%files
%manifest libaccounts-svc.manifest
%defattr(-,root,root,-)
%{_libdir}/*.so.*
-/usr/share/license/%{name}
%files devel
%defattr(-,root,root,-)
#include <glib.h>
#include <db-util.h>
#include <pthread.h>
-#include <assert.h>
#include <account-private.h>
#include <vconf.h>
+#define SAMSUNG_ACCOUNT_MANAGER
+
#include <pkgmgr-info.h>
#include <aul.h>
#include <unistd.h>
+#include <sys/types.h>
+#include <sys/smack.h>
#define EAS_CMDLINE "/usr/bin/eas-engine"
#define EMAIL_SERVICE_CMDLINE "/usr/bin/email-service"
+#define IMS_ENGINE_CMDLINE "/usr/bin/ims-srv"
+#define IMS_AGENT_CMDLINE "/usr/bin/ims-agent"
+#define MDM_SERVER_CMDLINE "/usr/bin/mdm-server"
+
+#define RCS_APPID "com.samsung.rcs-im"
+#define IMS_SERVICE_APPID "ims-service"
#define ACTIVESYNC_APPID "activesync-ui"
+#define EMAIL_APPID "email-setting-efl"
+#define SYNCHRONISE_APPID "setting-synchronise-efl"
+#define DS_AGENT_CMDLINE "/usr/bin/oma-ds-agent"
+
+#define FACEBOOK_SDK_APPID "com.samsung.facebook-service"
+#define FACEBOOK_APPID "com.samsung.facebook"
+
+#define ACCOUNT_DB_OPEN_READONLY 0
+#define ACCOUNT_DB_OPEN_READWRITE 1
static sqlite3* g_hAccountDB = NULL;
static int g_refCntDB = 0;
static char *_account_get_text(const char *text_data);
static int _account_gslist_free(GSList* list);
static int _account_glist_free(GList* list);
-static char *_account_query_table_column_text(account_stmt pStmt, int pos);
+static const char *_account_query_table_column_text(account_stmt pStmt, int pos);
static int _account_insert_custom(account_s *account, int account_id);
static int _account_update_custom(account_s *account, int account_id);
-static int _account_query_custom_by_account_id(account_custom_cb cb_func, int account_id, void *user_data );
+static int _account_query_custom_by_account_id(account_custom_cb callback, int account_id, void *user_data );
static int _account_type_update_provider_feature(account_type_s *account_type, const char* app_id);
int _account_get_current_appid_cb(const pkgmgrinfo_appinfo_h handle, void *user_data)
{
- int ret = -1;
char* appid = NULL;
char* item = NULL;
GSList** appid_list = (GSList**)user_data;
+ int pkgmgr_ret = -1;
+
+ pkgmgr_ret = pkgmgrinfo_appinfo_get_appid(handle, &appid);
+
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_appinfo_get_appid(%d)", pkgmgr_ret);
+ }
- ret = pkgmgrinfo_appinfo_get_appid(handle, &appid);
item = _account_get_text(appid);
*appid_list = g_slist_append(*appid_list, item);
ACCOUNT_SNPRINTF(buf, sizeof(buf), "/proc/%d/cmdline", pid);
ret = __read_proc(buf, buf, sizeof(buf));
if (ret <= 0) {
- ACCOUNT_INFO("No proc directory (%d)\n", pid);
+ ACCOUNT_DEBUG("No proc directory (%d)\n", pid);
return NULL;
}
static char* _account_get_current_appid()
{
- int pid=0, ret=-1;
+ int ret=0, pid=0;
char appid[128]={0,};
- pkgmgrinfo_appinfo_h ahandle=NULL;
char* appid_ret = NULL;
pid = getpid();
- ACCOUNT_INFO("pid (%d)\n", pid, ret);
ret = aul_app_get_appid_bypid(pid, appid, sizeof(appid));
- ACCOUNT_INFO("appid (%s) ret(%d)!!!!!!\n", appid, ret);
+
+ if(ret < 0){
+ ACCOUNT_ERROR("fail to get current appid\n");
+ }
/* SLP platform core exception */
if(strlen(appid) == 0){
char* cmdline = NULL;
cmdline = _account_get_proc_cmdline_bypid(pid);
- ACCOUNT_INFO("cmdline (%s)!!!!!!\n", cmdline);
- if(!strcmp(cmdline, EAS_CMDLINE)) {
+ ACCOUNT_SLOGD("cmdline (%s)!!!!!!\n", cmdline);
+ if(!g_strcmp0(cmdline, EAS_CMDLINE)) {
appid_ret = _account_get_text(ACTIVESYNC_APPID);
+ _ACCOUNT_FREE(cmdline);
+ return appid_ret;
+ } else if (!g_strcmp0(cmdline, EMAIL_SERVICE_CMDLINE) || !g_strcmp0(cmdline, MDM_SERVER_CMDLINE)) {
+ appid_ret = _account_get_text(EMAIL_APPID);
+ _ACCOUNT_FREE(cmdline);
+ return appid_ret;
+ } else if (!g_strcmp0(cmdline, IMS_ENGINE_CMDLINE) || !g_strcmp0(cmdline, IMS_AGENT_CMDLINE)) {
+ if(account_type_query_app_id_exist(RCS_APPID)==ACCOUNT_ERROR_NONE){
+ appid_ret = _account_get_text(RCS_APPID);
+ } else if(account_type_query_app_id_exist(IMS_SERVICE_APPID)==ACCOUNT_ERROR_NONE){
+ appid_ret = _account_get_text(IMS_SERVICE_APPID);
+ } else {
+ appid_ret = _account_get_text(RCS_APPID);
+ }
+ _ACCOUNT_FREE(cmdline);
+ return appid_ret;
+ } else if (!g_strcmp0(cmdline, DS_AGENT_CMDLINE)) {
+ appid_ret = _account_get_text(SYNCHRONISE_APPID);
+ _ACCOUNT_FREE(cmdline);
return appid_ret;
} else {
- ACCOUNT_ERROR("No app id\n");
+ ACCOUNT_DEBUG("No app id\n");
+ _ACCOUNT_FREE(cmdline);
return NULL;
}
}
- appid_ret = _account_get_text(appid);
+ /* temporary exception */
+ if(!g_strcmp0(appid, "com.samsung.gallery")){
+ appid_ret = _account_get_text("com.samsung.facebook");
+ } else if(!g_strcmp0(appid, FACEBOOK_SDK_APPID)){
+ appid_ret = _account_get_text(FACEBOOK_APPID);
+ } else {
+ appid_ret = _account_get_text(appid);
+ }
- pkgmgrinfo_appinfo_destroy_appinfo(ahandle);
return appid_ret;
}
static int _account_check_account_type_with_appid_group(const char* appid, char** verified_appid)
{
int error_code = ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER;
- int ret=-1;
pkgmgrinfo_appinfo_h ahandle=NULL;
pkgmgrinfo_pkginfo_h phandle=NULL;
- char* package_id;
+ char* package_id = NULL;
GSList* appid_list = NULL;
GSList* iter = NULL;
if(!appid){
- ACCOUNT_INFO("input param is null\n");
+ ACCOUNT_ERROR("input param is null\n");
return ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER;
}
if(!verified_appid){
- ACCOUNT_INFO("output param is null\n");
+ ACCOUNT_ERROR("output param is null\n");
return ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER;
}
return ACCOUNT_ERROR_NONE;
}
- /* Get app id family which is stored in account database */
- ret = pkgmgrinfo_appinfo_get_appinfo(appid, &ahandle);
- ACCOUNT_INFO("ahandle (%p), ret(%x)\n", ahandle, ret);
- ret = pkgmgrinfo_appinfo_get_pkgid(ahandle, &package_id);
- ACCOUNT_INFO("package_id (%s), ret(%x)\n", package_id, ret);
- ret = pkgmgrinfo_pkginfo_get_pkginfo(package_id, &phandle);
- ACCOUNT_INFO("phandle (%p), ret(%x)\n", package_id, ret);
+ if(!strcmp(appid, "com.samsung.samsung-account-front")){
+ ACCOUNT_DEBUG("Setting exception\n");
+ *verified_appid = _account_get_text("com.samsung.samsung-account-front");
+ return ACCOUNT_ERROR_NONE;
+ }
+
+ if(!strcmp(appid, IMS_SERVICE_APPID) || !strcmp(appid, RCS_APPID)){
+ ACCOUNT_DEBUG("ims service exception\n");
+ *verified_appid = _account_get_text(appid);
+ return ACCOUNT_ERROR_NONE;
+ }
- ret = pkgmgrinfo_appinfo_get_list(phandle, PMINFO_ALL_APP, _account_get_current_appid_cb, (void *)&appid_list); //==> pkgÇڵ鿡 ¼ÓÇÑ ui-appid ¸ðµÎ ãÀ½
- ACCOUNT_INFO("ret(%x)\n", ret);
+ /* Get app id family which is stored in account database */
+ int pkgmgr_ret = -1;
+ pkgmgr_ret = pkgmgrinfo_appinfo_get_appinfo(appid, &ahandle);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_appinfo_get_appinfo(%d)", pkgmgr_ret);
+ }
+ pkgmgr_ret = pkgmgrinfo_appinfo_get_pkgid(ahandle, &package_id);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_appinfo_get_pkgid(%d)", pkgmgr_ret);
+ }
+ pkgmgr_ret = pkgmgrinfo_pkginfo_get_pkginfo(package_id, &phandle);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_pkginfo_get_pkginfo(%d)", pkgmgr_ret);
+ }
+ pkgmgr_ret = pkgmgrinfo_appinfo_get_list(phandle, PMINFO_ALL_APP, _account_get_current_appid_cb, (void *)&appid_list);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_appinfo_get_list(%d)", pkgmgr_ret);
+ }
/* Compare current app id with the stored app id family */
for(iter=appid_list;iter!=NULL;iter=g_slist_next(iter)){
char* tmp = (char*)iter->data;
if(tmp) {
if(account_type_query_app_id_exist(tmp) == ACCOUNT_ERROR_NONE) {
- ACCOUNT_INFO("permission verified appid(%s), current appid(%s)\n", tmp, appid);
*verified_appid = _account_get_text(tmp);
error_code = ACCOUNT_ERROR_NONE;
_ACCOUNT_FREE(tmp);
break;
} else {
- ACCOUNT_DEBUG("not matched owner group app id(%s), current appid(%s)\n", tmp, appid);
+ ACCOUNT_SLOGD("not matched owner group app id(%s), current appid(%s)\n", tmp, appid);
+ }
+ }
+ _ACCOUNT_FREE(tmp);
+ }
+
+ g_slist_free(appid_list);
+ pkgmgr_ret = pkgmgrinfo_pkginfo_destroy_pkginfo(phandle);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_pkginfo_destroy_pkginfo(%d)", pkgmgr_ret);
+ }
+
+ pkgmgr_ret = pkgmgrinfo_appinfo_destroy_appinfo(ahandle);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_appinfo_destroy_appinfo(%d)", pkgmgr_ret);
+ }
+
+ return error_code;
+}
+
+static int _account_check_appid_group_with_package_name(const char* appid, char* package_name)
+{
+ int error_code = ACCOUNT_ERROR_PERMISSION_DENIED;
+ pkgmgrinfo_appinfo_h ahandle=NULL;
+ pkgmgrinfo_pkginfo_h phandle=NULL;
+ char* package_id = NULL;
+ GSList* appid_list = NULL;
+ GSList* iter = NULL;
+
+ if(!appid){
+ ACCOUNT_ERROR("input param -appid is null\n");
+ return ACCOUNT_ERROR_INVALID_PARAMETER;
+ }
+
+ if(!package_name){
+ ACCOUNT_ERROR("input param - package name is null\n");
+ return ACCOUNT_ERROR_INVALID_PARAMETER;
+ }
+
+ /* ims-service Exception */
+ if ( strcmp(appid, "ims-service") == 0 && strcmp(package_name, "ims-service") == 0 ) {
+ ACCOUNT_DEBUG("ims exception."); // TODO: NEED TO REMOVE, debug log.
+ return ACCOUNT_ERROR_NONE;
+ }
+
+ /* Get app id family which is stored in account database */
+ int pkgmgr_ret = -1;
+ pkgmgr_ret = pkgmgrinfo_appinfo_get_appinfo(appid, &ahandle);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_appinfo_get_appinfo(%d)", pkgmgr_ret);
+ }
+ pkgmgr_ret = pkgmgrinfo_appinfo_get_pkgid(ahandle, &package_id);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_appinfo_get_pkgid(%d)", pkgmgr_ret);
+ }
+ pkgmgr_ret = pkgmgrinfo_pkginfo_get_pkginfo(package_id, &phandle);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_pkginfo_get_pkginfo(%d)", pkgmgr_ret);
+ }
+ pkgmgr_ret = pkgmgrinfo_appinfo_get_list(phandle, PMINFO_ALL_APP, _account_get_current_appid_cb, (void *)&appid_list);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_appinfo_get_list(%d)", pkgmgr_ret);
+ }
+
+ /* Compare current app id with the stored app id family */
+ for(iter=appid_list;iter!=NULL;iter=g_slist_next(iter)){
+ char* tmp = (char*)iter->data;
+ if(tmp) {
+ //ACCOUNT_ERROR("tmp(%s)package_name(%s)\n\n", tmp, package_name); // TODO: NEED TO REMOVE, debug log.
+ if( strcmp(tmp, package_name) == 0) {
+ error_code = ACCOUNT_ERROR_NONE;
+ _ACCOUNT_FREE(tmp);
+ break;
+ } else if ( strcmp(tmp, SAMSUNGACCOUNTFRONT_PKG_NAME) == 0 &&
+ strcmp(package_name, SAMSUNGACCOUNT_PKG_NAME) == 0 ) {
+ /* Samung Account Exception */
+ error_code = ACCOUNT_ERROR_NONE;
+ _ACCOUNT_FREE(tmp);
+ break;
+ } else {
+ ACCOUNT_SLOGD("not matched owner group app id(%s), current appid(%s)\n", tmp, appid);
}
}
_ACCOUNT_FREE(tmp);
}
g_slist_free(appid_list);
- pkgmgrinfo_pkginfo_destroy_pkginfo(phandle);
- pkgmgrinfo_appinfo_destroy_appinfo(ahandle);
+ pkgmgr_ret = pkgmgrinfo_pkginfo_destroy_pkginfo(phandle);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_pkginfo_destroy_pkginfo(%d)", pkgmgr_ret);
+ }
+
+ pkgmgr_ret = pkgmgrinfo_appinfo_destroy_appinfo(ahandle);
+ if( pkgmgr_ret != PMINFO_R_OK ){
+ ACCOUNT_DEBUG("pkgmgrinfo_appinfo_destroy_appinfo(%d)", pkgmgr_ret);
+ }
return error_code;
}
static const char *_account_db_err_msg()
{
- assert(NULL != g_hAccountDB);
return sqlite3_errmsg(g_hAccountDB);
}
+static int _account_db_err_code()
+{
+ return sqlite3_errcode(g_hAccountDB);
+}
+
static void _account_insert_delete_update_notification_send(char *noti_name)
{
if (!noti_name) {
return;
}
- ACCOUNT_DEBUG("Sending notification with value %s\n", noti_name);
+ ACCOUNT_DEBUG("noti_type = %s", noti_name);
- if (vconf_set_str(VCONFKEY_ACCOUNT_MSG_STR, noti_name) == 0) {
- ACCOUNT_VERBOSE("Vconf MSG Str set SUCCESS !!!!!!\n");;
- } else {
+ if (vconf_set_str(VCONFKEY_ACCOUNT_MSG_STR, noti_name) != 0) {
ACCOUNT_ERROR("Vconf MSG Str set FAILED !!!!!!\n");;
}
}
int ncount = 0;
account_stmt pStmt = NULL;
- assert(NULL != query);
- assert(NULL != g_hAccountDB);
+ if(!query){
+ ACCOUNT_ERROR("NULL query\n");
+ return ACCOUNT_ERROR_QUERY_SYNTAX_ERROR;
+ }
+
+ if(!g_hAccountDB){
+ ACCOUNT_ERROR("DB is not opened\n");
+ return ACCOUNT_ERROR_DB_NOT_OPENED;
+ }
+
rc = sqlite3_prepare_v2(g_hAccountDB, query, strlen(query), &pStmt, NULL);
+ if (SQLITE_BUSY == rc){
+ ACCOUNT_ERROR("sqlite3_prepare_v2() failed(%d, %s).", rc, _account_db_err_msg());
+ sqlite3_finalize(pStmt);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ } else if (SQLITE_OK != rc) {
+ ACCOUNT_ERROR("sqlite3_prepare_v2() failed(%d, %s).", rc, _account_db_err_msg());
+ sqlite3_finalize(pStmt);
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
rc = sqlite3_step(pStmt);
- if (SQLITE_ROW != rc) {
+ if (SQLITE_BUSY == rc) {
+ ACCOUNT_ERROR("sqlite3_step() failed(%d, %s).", rc, _account_db_err_msg());
+ sqlite3_finalize(pStmt);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ } else if (SQLITE_ROW != rc) {
ACCOUNT_ERROR("sqlite3_step() failed(%d, %s).", rc, _account_db_err_msg());
sqlite3_finalize(pStmt);
return ACCOUNT_ERROR_DB_FAILED;
ncount = sqlite3_column_int(pStmt, 0);
- ACCOUNT_VERBOSE("count : %d, End", ncount);
sqlite3_finalize(pStmt);
return ncount;
}
-static int _account_execute_query(char *query)
+static int _account_execute_query(const char *query)
{
int rc = -1;
char* pszErrorMsg = NULL;
- assert(NULL != query);
- assert(NULL != g_hAccountDB);
+ if(!query){
+ ACCOUNT_ERROR("NULL query\n");
+ return ACCOUNT_ERROR_QUERY_SYNTAX_ERROR;
+ }
- ACCOUNT_INFO("query : %s", query);
+ if(!g_hAccountDB){
+ ACCOUNT_ERROR("DB is not opened\n");
+ return ACCOUNT_ERROR_DB_NOT_OPENED;
+ }
rc = sqlite3_exec(g_hAccountDB, query, NULL, NULL, &pszErrorMsg);
if (SQLITE_OK != rc) {
- ACCOUNT_FATAL("sqlite3_exec(%s) failed(%s).", query, pszErrorMsg);
+ ACCOUNT_ERROR("sqlite3_exec rc(%d) query(%s) failed(%s).", rc, query, pszErrorMsg);
sqlite3_free(pszErrorMsg);
}
ret = _account_execute_query("BEGIN IMMEDIATE TRANSACTION");
- if (ret != SQLITE_OK) {
- ACCOUNT_FATAL("_account_svc_begin_transaction fail :: %d", ret);
+ if (ret == SQLITE_BUSY){
+ ACCOUNT_ERROR(" sqlite3 busy = %d", ret);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ } else if(ret != SQLITE_OK) {
+ ACCOUNT_ERROR("_account_svc_begin_transaction fail :: %d", ret);
return ACCOUNT_ERROR_DB_FAILED;
}
ret = _account_execute_query("ROLLBACK TRANSACTION");
}
+ if(ret == SQLITE_PERM){
+ ACCOUNT_ERROR("Account permission denied :: %d", ret);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ if (ret == SQLITE_BUSY){
+ ACCOUNT_DEBUG(" sqlite3 busy = %d", ret);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }
+
if (ret != SQLITE_OK) {
- ACCOUNT_FATAL("_account_svc_end_transaction fail :: %d", ret);
+ ACCOUNT_ERROR("_account_svc_end_transaction fail :: %d", ret);
return ACCOUNT_ERROR_DB_FAILED;
}
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
- ACCOUNT_DEBUG("app id (%s)\n", app_id);
-
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT COUNT(*) FROM %s WHERE AppId = '%s' and MultipleAccountSupport = 1", ACCOUNT_TYPE_TABLE, app_id);
rc = _account_get_record_count(query);
- ACCOUNT_DEBUG("app id (%s) supports multiple account. rc(%d)\n", app_id, rc);
-
/* multiple account support case */
if(rc > 0) {
- ACCOUNT_DEBUG("app id (%s) supports multiple account. rc(%d)\n", app_id, rc);
+ ACCOUNT_SLOGD("app id (%s) supports multiple account. rc(%d)\n", app_id, rc);
return TRUE;
}
rc = _account_get_record_count(query);
if(rc <= 0) {
- ACCOUNT_DEBUG("app id (%s) supports single account. and there is no account of the app id\n", app_id);
+ ACCOUNT_SLOGD("app id (%s) supports single account. and there is no account of the app id\n", app_id);
return TRUE;
}
int error_code = ACCOUNT_ERROR_NONE;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
-
+ ACCOUNT_DEBUG("create all table - BEGIN");
ACCOUNT_MEMSET(query, 0, sizeof(query));
- ACCOUNT_VERBOSE("_account_create_all_tables begin");
-
/*Create the account table*/
ACCOUNT_SNPRINTF(query, sizeof(query), "select count(*) from sqlite_master where name in ('%s')", ACCOUNT_TABLE);
rc = _account_get_record_count(query);
if (rc <= 0) {
- ACCOUNT_MEMSET(query, 0, sizeof(query));
- ACCOUNT_SNPRINTF(query, sizeof(query), ACCOUNT_SCHEMA, ACCOUNT_TABLE);
- ACCOUNT_INFO("Create %s table", ACCOUNT_TABLE);
- rc = _account_execute_query(query);
- ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", query, rc, _account_db_err_msg()));
+ rc = _account_execute_query(ACCOUNT_SCHEMA);
+ if(rc == SQLITE_BUSY) return ACCOUNT_ERROR_DATABASE_BUSY;
+ ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", ACCOUNT_SCHEMA, rc, _account_db_err_msg()));
}
/*Create capability table*/
ACCOUNT_SNPRINTF(query, sizeof(query), "select count(*) from sqlite_master where name in ('%s')", CAPABILITY_TABLE);
rc = _account_get_record_count(query);
if (rc <= 0) {
- ACCOUNT_MEMSET(query, 0, sizeof(query));
- ACCOUNT_SNPRINTF(query, sizeof(query), CAPABILITY_SCHEMA, CAPABILITY_TABLE);
- ACCOUNT_INFO("Create %s table", CAPABILITY_TABLE);
- rc = _account_execute_query(query);
- ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", query, rc, _account_db_err_msg()));
+ rc = _account_execute_query(CAPABILITY_SCHEMA);
+ if(rc == SQLITE_BUSY) return ACCOUNT_ERROR_DATABASE_BUSY;
+ ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", CAPABILITY_SCHEMA, rc, _account_db_err_msg()));
}
/* Create account custom table */
ACCOUNT_SNPRINTF(query, sizeof(query), "select count(*) from sqlite_master where name in ('%s')", ACCOUNT_CUSTOM_TABLE);
rc = _account_get_record_count(query);
if (rc <= 0) {
- ACCOUNT_MEMSET(query, 0, sizeof(query));
- ACCOUNT_SNPRINTF(query, sizeof(query), ACCOUNT_CUSTOM_SCHEMA, ACCOUNT_CUSTOM_TABLE);
- ACCOUNT_INFO("Create %s table", ACCOUNT_CUSTOM_TABLE);
- rc = _account_execute_query(query);
+ rc = _account_execute_query(ACCOUNT_CUSTOM_SCHEMA);
+ if(rc == SQLITE_BUSY) return ACCOUNT_ERROR_DATABASE_BUSY;
ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", query, rc, _account_db_err_msg()));
}
ACCOUNT_SNPRINTF(query, sizeof(query), "select count(*) from sqlite_master where name in ('%s')", ACCOUNT_TYPE_TABLE);
rc = _account_get_record_count(query);
if (rc <= 0) {
- ACCOUNT_MEMSET(query, 0, sizeof(query));
- ACCOUNT_SNPRINTF(query, sizeof(query), ACCOUNT_TYPE_SCHEMA, ACCOUNT_TYPE_TABLE);
- ACCOUNT_INFO("Create %s table", ACCOUNT_TYPE_TABLE);
- rc = _account_execute_query(query);
- ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", query, rc, _account_db_err_msg()));
+ rc = _account_execute_query(ACCOUNT_TYPE_SCHEMA);
+ if(rc == SQLITE_BUSY) return ACCOUNT_ERROR_DATABASE_BUSY;
+ ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", ACCOUNT_TYPE_SCHEMA, rc, _account_db_err_msg()));
}
/* Create label table */
ACCOUNT_SNPRINTF(query, sizeof(query), "select count(*) from sqlite_master where name in ('%s')", LABEL_TABLE);
rc = _account_get_record_count(query);
if (rc <= 0) {
- ACCOUNT_MEMSET(query, 0, sizeof(query));
- ACCOUNT_SNPRINTF(query, sizeof(query), LABEL_SCHEMA, LABEL_TABLE);
- ACCOUNT_INFO("Create %s table", LABEL_TABLE);
- rc = _account_execute_query(query);
- ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", query, rc, _account_db_err_msg()));
+ rc = _account_execute_query(LABEL_SCHEMA);
+ if(rc == SQLITE_BUSY) return ACCOUNT_ERROR_DATABASE_BUSY;
+ ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", LABEL_SCHEMA, rc, _account_db_err_msg()));
}
/* Create account feature table */
ACCOUNT_SNPRINTF(query, sizeof(query), "select count(*) from sqlite_master where name in ('%s')", PROVIDER_FEATURE_TABLE);
rc = _account_get_record_count(query);
if (rc <= 0) {
- ACCOUNT_MEMSET(query, 0, sizeof(query));
- ACCOUNT_SNPRINTF(query, sizeof(query), PROVIDER_FEATURE_SCHEMA, PROVIDER_FEATURE_TABLE);
- ACCOUNT_INFO("Create %s table", PROVIDER_FEATURE_TABLE);
- rc = _account_execute_query(query);
- ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", query, rc, _account_db_err_msg()));
+ rc = _account_execute_query(PROVIDER_FEATURE_SCHEMA);
+ if(rc == SQLITE_BUSY) return ACCOUNT_ERROR_DATABASE_BUSY;
+ ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_execute_query(%s) failed(%d, %s).\n", PROVIDER_FEATURE_SCHEMA, rc, _account_db_err_msg()));
}
+ ACCOUNT_DEBUG("create all table - END");
return error_code;
}
-static bool _account_check_is_all_table_exists()
+static int _account_check_is_all_table_exists()
{
int rc = 0;
char query[ACCOUNT_SQL_LEN_MAX] = {0,};
ACCOUNT_MEMSET(query, 0, sizeof(query));
- ACCOUNT_VERBOSE("_account_check_is_all_table_exists");
-
ACCOUNT_SNPRINTF(query, sizeof(query), "select count(*) from sqlite_master where name in ('%s', '%s', '%s', '%s', '%s', '%s')",
ACCOUNT_TABLE, CAPABILITY_TABLE, ACCOUNT_CUSTOM_TABLE, ACCOUNT_TYPE_TABLE, LABEL_TABLE, PROVIDER_FEATURE_TABLE);
rc = _account_get_record_count(query);
- ACCOUNT_DEBUG("Table count = %d\n", rc);
-
if (rc != ACCOUNT_TABLE_TOTAL_COUNT) {
ACCOUNT_ERROR("Table count is not matched rc=%d\n", rc);
- return FALSE;
}
- ACCOUNT_VERBOSE("END of _account_check_is_all_table_exists\n");
-
- return TRUE;
+ return rc;
}
-static int _account_db_open(void)
+static int _account_db_open(int mode)
{
- int rc = 0;
+ int rc = 0;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
if (!g_hAccountDB) {
- rc = db_util_open(ACCOUNT_DB_NAME, &g_hAccountDB, DB_UTIL_REGISTER_HOOK_METHOD);
- ACCOUNT_RETURN_VAL((rc == SQLITE_OK), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected. rc : %d", rc));
+ if(mode == ACCOUNT_DB_OPEN_READWRITE)
+ rc = db_util_open(ACCOUNT_DB_NAME, &g_hAccountDB, DB_UTIL_REGISTER_HOOK_METHOD);
+ else if(mode == ACCOUNT_DB_OPEN_READONLY)
+ rc = db_util_open_with_options(ACCOUNT_DB_NAME, &g_hAccountDB, SQLITE_OPEN_READONLY, NULL);
+ else
+ return ACCOUNT_ERROR_DB_NOT_OPENED;
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ ACCOUNT_RETURN_VAL((rc != SQLITE_PERM), {}, ACCOUNT_ERROR_PERMISSION_DENIED, ("Account permission denied rc : %d", rc));
+ ACCOUNT_RETURN_VAL((rc == SQLITE_OK), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected. rc : %d", rc));
g_refCntDB++;
- ACCOUNT_INFO("_account_db_open: The database connected. refcnt=%d ", g_refCntDB);
} else {
g_refCntDB++;
- ACCOUNT_INFO("The database already connected. refcnt=%d ", g_refCntDB);
}
+ ACCOUNT_RETURN_VAL((rc == SQLITE_OK), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("busy handler fail. rc : %d", rc));
+
return ACCOUNT_ERROR_NONE;
}
static int _account_db_close(void)
{
- int rc = 0;
+ int rc = 0;
int ret = -1;
if (g_hAccountDB) {
if (g_refCntDB > 0) {
g_refCntDB--;
- ACCOUNT_INFO("_account_svc_db_close: The database disconnected. refcnt=%d ", g_refCntDB);
}
if (g_refCntDB == 0) {
rc = db_util_close(g_hAccountDB);
+ if( rc == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(SQLITE_PERM)");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ } else if ( rc == SQLITE_BUSY ){
+ ACCOUNT_ERROR( "database busy");
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }
ACCOUNT_RETURN_VAL((rc == SQLITE_OK), {}, ACCOUNT_ERROR_DB_FAILED, ("The database isn't connected. rc : %d", rc));
g_hAccountDB = NULL;
- ACCOUNT_INFO( "_account_svc_db_close: The database disconnected really. ");
}
ret = ACCOUNT_ERROR_NONE;
} else {
return ret;
}
-static int _account_connect(void)
+static int _account_connect(int mode)
{
int error_code = ACCOUNT_ERROR_NONE;
- pthread_mutex_lock(&account_mutex);
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
- ACCOUNT_VERBOSE("db path = %s\n", ACCOUNT_DB_NAME);
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
+ pthread_mutex_lock(&account_mutex);
- error_code = _account_db_open();
+ error_code = _account_db_open(mode);
if (ACCOUNT_ERROR_NONE != error_code) {
ACCOUNT_ERROR("The database isn't connected.\n");
pthread_mutex_unlock(&account_mutex);
- return ACCOUNT_ERROR_DB_NOT_OPENED;
+
+ if(error_code == ACCOUNT_ERROR_PERMISSION_DENIED)
+ return error_code;
+ else
+ return ACCOUNT_ERROR_DB_NOT_OPENED;
}
- if (FALSE == _account_check_is_all_table_exists())
+ int rc = _account_check_is_all_table_exists();
+
+ if ( rc < 0 ){
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR("rc(%d)", rc);
+ return rc;
+ } else if (rc == ACCOUNT_TABLE_TOTAL_COUNT){
+ // do nothing
+ ACCOUNT_DEBUG("Tables OK");
+ } else {
error_code = _account_create_all_tables();
+ }
pthread_mutex_unlock(&account_mutex);
return ACCOUNT_ERROR_NONE;
ACCOUNT_API int account_connect (void)
{
- return _account_connect();
+ return _account_connect(ACCOUNT_DB_OPEN_READWRITE);
+}
+
+ACCOUNT_API int account_connect_readonly (void)
+{
+ return _account_connect(ACCOUNT_DB_OPEN_READONLY);
}
static int _account_disconnect(void)
{
int error_code = ACCOUNT_ERROR_NONE;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
pthread_mutex_lock(&account_mutex);
- ACCOUNT_INFO("db path = %s have been closed!!!\n", ACCOUNT_DB_NAME);
error_code = _account_db_close();
pthread_mutex_unlock(&account_mutex);
static int _account_custom_gslist_free(GSList* list)
{
- ACCOUNT_RETURN_VAL((list != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("GSlist is NULL"));
+ if(!list){
+ return ACCOUNT_ERROR_INVALID_PARAMETER;
+ }
GSList* iter;
static int _account_gslist_free(GSList* list)
{
- ACCOUNT_RETURN_VAL((list != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("GSlist is NULL"));
+ if(!list){
+ return ACCOUNT_ERROR_INVALID_PARAMETER;
+ }
GSList* iter;
static int _account_glist_free(GList* list)
{
- ACCOUNT_RETURN_VAL((list != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("Glist is NULL"));
+ if(!list){
+ return ACCOUNT_ERROR_INVALID_PARAMETER;
+ }
GList* iter;
count = _account_get_record_count(query);
if (count > 0) {
- ACCOUNT_INFO("_account_check_duplicated : duplicated %d account(s) exist!, user_name=%s, domain_name=%s\n",
+ ACCOUNT_SLOGI("_account_check_duplicated : duplicated %d account(s) exist!, user_name=%s, domain_name=%s\n",
count, data->user_name, data->domain_name );
return TRUE;
}
#endif
-
return FALSE;
+
}
-static int _account_get_next_sequence(char *pszName)
+static int _account_get_next_sequence(const char *pszName)
{
int rc = 0;
account_stmt pStmt = NULL;
int max_seq = 0;
char szQuery[ACCOUNT_SQL_LEN_MAX] = {0,};
- ACCOUNT_VERBOSE( "[Enter] pszName:%s\n", pszName);
-
ACCOUNT_MEMSET(szQuery, 0x00, sizeof(szQuery));
ACCOUNT_SNPRINTF(szQuery, sizeof(szQuery), "SELECT max(seq) FROM %s where name = '%s' ", ACCOUNT_SQLITE_SEQ, pszName);
rc = sqlite3_prepare_v2(g_hAccountDB, szQuery, strlen(szQuery), &pStmt, NULL);
+ if (SQLITE_OK != rc) {
+ ACCOUNT_SLOGE("sqlite3_prepare_v2() failed(%d, %s).", rc, _account_db_err_msg());
+ sqlite3_finalize(pStmt);
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
rc = sqlite3_step(pStmt);
max_seq = sqlite3_column_int(pStmt, 0);
max_seq++;
- ACCOUNT_VERBOSE( "sqlite3_column_int, rc=%d, max_seq=%d\n", rc, max_seq);
-
/*Finalize Statement*/
rc = sqlite3_finalize(pStmt);
pStmt = NULL;
ACCOUNT_RETURN_VAL((query != NULL), {}, NULL, ("query is NULL"));
- ACCOUNT_INFO( "prepare query : %s", query);
-
rc = sqlite3_prepare_v2(g_hAccountDB, query, strlen(query), &pStmt, NULL);
+
ACCOUNT_RETURN_VAL((SQLITE_OK == rc), {}, NULL, ("sqlite3_prepare_v2(%s) failed(%s).", query, _account_db_err_msg()));
return pStmt;
static int _account_query_bind_int(account_stmt pStmt, int pos, int num)
{
- assert(NULL != pStmt);
- assert(pos > -1);
+ if(!pStmt){
+ ACCOUNT_ERROR("statement is null");
+ return -1;
+ }
+
+ if(pos < 0){
+ ACCOUNT_ERROR("invalid pos");
+ return -1;
+ }
+
return sqlite3_bind_int(pStmt, pos, num);
}
static int _account_query_bind_text(account_stmt pStmt, int pos, const char *str)
{
- assert(NULL != pStmt);
+ if(!pStmt){
+ ACCOUNT_ERROR("statement is null");
+ return -1;
+ }
if(str)
return sqlite3_bind_text(pStmt, pos, (const char*)str, strlen(str), SQLITE_STATIC);
static int _account_convert_account_to_sql(account_s *account, account_stmt hstmt, char *sql_value)
{
- ACCOUNT_VERBOSE( "_account_convert_account_to_sql");
int count = 1;
/*Caution : Keep insert query orders.*/
return count;
}
-static void _account_query_finalize(account_stmt pStmt)
+static int _account_query_finalize(account_stmt pStmt)
{
int rc = -1;
if (!pStmt) {
- ACCOUNT_FATAL( "pStmt is NULL");
- return;
+ ACCOUNT_ERROR( "pStmt is NULL");
+ return ACCOUNT_ERROR_INVALID_PARAMETER;
}
rc = sqlite3_finalize(pStmt);
- if (rc != SQLITE_OK) {
- ACCOUNT_FATAL( "sqlite3_finalize fail, rc : %d, db_error : %s\n", rc, _account_db_err_msg());
+ if (rc == SQLITE_BUSY){
+ ACCOUNT_ERROR(" sqlite3 busy = %d", rc);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ } else if (rc != SQLITE_OK) {
+ ACCOUNT_ERROR( "sqlite3_finalize fail, rc : %d, db_error : %s\n", rc, _account_db_err_msg());
+ return ACCOUNT_ERROR_DB_FAILED;
}
- ACCOUNT_VERBOSE( "sqlite3_finalize finish");
+ return ACCOUNT_ERROR_NONE;
}
static int _account_query_step(account_stmt pStmt)
{
- assert(NULL != pStmt);
+ if(!pStmt){
+ ACCOUNT_ERROR( "pStmt is NULL");
+ return -1;
+ }
+
return sqlite3_step(pStmt);
}
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
- /* Check account own icon existence */
- if(!account->icon_path) {
- char* temptxt = NULL;
- account_type_h account_type = NULL;
- error_code = account_type_create(&account_type);
- error_code = account_type_query_by_app_id((const char*)account->package_name, &account_type);
- error_code = account_type_get_icon_path(account_type, &temptxt);
- if (error_code != ACCOUNT_ERROR_NONE) {
- ACCOUNT_ERROR("account_type_get_icon_path: Failed \n");
- } else if (temptxt && strlen(temptxt)) {
- ACCOUNT_DEBUG("icon path (%s) app_id(%s) \n", temptxt, account->package_name);
- account->icon_path = _account_get_text(temptxt);
- } else {
- ACCOUNT_DEBUG("account_get_icon_path: returned NULL \n");
- }
- _ACCOUNT_FREE(temptxt);
- error_code = account_type_destroy(account_type);
- }
-
- /* End of Check account own icon existence */
-
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "INSERT INTO %s( user_name, email_address , display_name , icon_path , source , package_name , "
"access_token , domain_name , auth_type , secret , sync_support , txt_custom0, txt_custom1, txt_custom2, txt_custom3, txt_custom4, "
- "int_custom0, int_custom1, int_custom2, int_custom3, int_custom4, txt_custom0 ) values "
+ "int_custom0, int_custom1, int_custom2, int_custom3, int_custom4, txt_custom0 ) values " // to do urusa
"(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?)", ACCOUNT_TABLE);
hstmt = _account_prepare_query(query);
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
- error_code = ACCOUNT_ERROR_DB_FAILED;
+ ACCOUNT_ERROR( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+
+ if( _account_db_err_code() == SQLITE_PERM )
+ error_code = ACCOUNT_ERROR_PERMISSION_DENIED;
+ else
+ error_code = ACCOUNT_ERROR_DB_FAILED;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
return error_code;
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
if (g_slist_length( account->capablity_list)==0) {
- ACCOUNT_ERROR( "_account_insert_capability, no capability\n");
+ ACCOUNT_DEBUG( "_account_insert_capability, no capability\n");
return ACCOUNT_ERROR_NONE;
}
rc = _account_get_record_count(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
if (rc <= 0) {
- ACCOUNT_WARNING( "_account_insert_capability : related account item is not existed rc=%d , %s", rc, _account_db_err_msg());
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
GSList *iter;
for (iter = account->capablity_list; iter != NULL; iter = g_slist_next(iter)) {
- int rc, ret;
+ int ret;
count = 1;
account_capability_s* cap_data = NULL;
cap_data = (account_capability_s*)iter->data;
- ACCOUNT_VERBOSE("cap_data->type = %s, cap_data->value = %d \n", cap_data->type, cap_data->value);
+ ACCOUNT_SLOGD("cap_data->type = %s, cap_data->value = %d \n", cap_data->type, cap_data->value);
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "INSERT INTO %s(key, value, package_name, user_name, account_id) VALUES "
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
break;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
- ACCOUNT_VERBOSE( "_account_insert_capability() DONE\n");
-
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
if (g_slist_length( account->capablity_list)==0) {
- ACCOUNT_ERROR( "_account_insert_capability, no capability\n");
+ ACCOUNT_ERROR( "_account_update_capability, no capability\n");
return ACCOUNT_ERROR_NONE;
}
rc = _account_get_record_count(query);
if (rc <= 0) {
- ACCOUNT_WARNING( "_account_insert_capability : related account item is not existed rc=%d , %s", rc, _account_db_err_msg());
+ ACCOUNT_SLOGI( "_account_update_capability : related account item is not existed rc=%d , %s", rc, _account_db_err_msg());
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
return ACCOUNT_ERROR_DB_FAILED;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
GSList *iter;
for (iter = account->capablity_list; iter != NULL; iter = g_slist_next(iter)) {
- int rc, ret;
+ int ret;
count = 1;
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "INSERT INTO %s(key, value, package_name, user_name, account_id) VALUES "
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
break;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
- ACCOUNT_DEBUG( "_account_insert_capability() DONE\n");
-
return ACCOUNT_ERROR_NONE;
}
-static int _account_update_capability_by_user_name(account_s *account, char *user_name, char *package_name )
+static int _account_update_capability_by_user_name(account_s *account, const char *user_name, const char *package_name )
{
int rc, count = 1;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
if (g_slist_length( account->capablity_list)==0) {
- ACCOUNT_ERROR( "_account_insert_capability, no capability\n");
+ ACCOUNT_ERROR( "_account_update_capability_by_user_name, no capability\n");
return ACCOUNT_ERROR_NONE;
}
- ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT COUNT(*) from %s where package_name=%s and user_name=%s", ACCOUNT_TABLE, package_name, user_name);
+ ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT COUNT(*) from %s where package_name= '%s' and user_name='%s'", ACCOUNT_TABLE, package_name, user_name);
rc = _account_get_record_count(query);
if (rc <= 0) {
- ACCOUNT_WARNING( "_account_insert_capability : related account item is not existed rc=%d , %s ", rc, _account_db_err_msg());
+ ACCOUNT_SLOGI( "_account_update_capability_by_user_name : related account item is not existed rc=%d , %s ", rc, _account_db_err_msg());
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
_account_query_bind_text(hstmt, count++, (char*)account->user_name);
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
return ACCOUNT_ERROR_DB_FAILED;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
GSList* iter;
for (iter = account->capablity_list; iter != NULL; iter = g_slist_next(iter)) {
- int rc, ret;
+ int ret;
count = 1;
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "INSERT INTO %s(key, value, package_name, user_name, account_id) VALUES "
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
break;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
- ACCOUNT_VERBOSE( "_account_insert_capability() DONE\n");
-
return ACCOUNT_ERROR_NONE;
}
static int _account_query_table_column_int(account_stmt pStmt, int pos)
{
- assert(NULL != pStmt);
- assert(pos > -1);
+ if(!pStmt){
+ ACCOUNT_ERROR("statement is null");
+ return -1;
+ }
+
+ if(pos < 0){
+ ACCOUNT_ERROR("invalid pos");
+ return -1;
+ }
+
return sqlite3_column_int(pStmt, pos);
}
-static char *_account_query_table_column_text(account_stmt pStmt, int pos)
+static const char *_account_query_table_column_text(account_stmt pStmt, int pos)
{
- assert(NULL != pStmt);
- assert(pos > -1);
- return (char *)sqlite3_column_text(pStmt, pos);
+ if(!pStmt){
+ ACCOUNT_ERROR("statement is null");
+ return NULL;
+ }
+
+ if(pos < 0){
+ ACCOUNT_ERROR("invalid pos");
+ return NULL;
+ }
+
+ return (const char *)sqlite3_column_text(pStmt, pos);
}
static void _account_db_data_to_text(const char *textbuf, char **output)
static void _account_convert_column_to_account(account_stmt hstmt, account_s *account_record)
{
- char *textbuf = NULL;
+ const char *textbuf = NULL;
account_record->id = _account_query_table_column_int(hstmt, ACCOUNT_FIELD_ID);
account_record->user_data_int[2] = _account_query_table_column_int(hstmt, ACCOUNT_FIELD_USER_INT_2);
account_record->user_data_int[3] = _account_query_table_column_int(hstmt, ACCOUNT_FIELD_USER_INT_3);
account_record->user_data_int[4] = _account_query_table_column_int(hstmt, ACCOUNT_FIELD_USER_INT_4);
-
- ACCOUNT_VERBOSE("END _account_convert_column_to_account");
}
static void _account_convert_column_to_capability(account_stmt hstmt, account_capability_s *capability_record)
{
- char *textbuf = NULL;
+ const char *textbuf = NULL;
capability_record->id = _account_query_table_column_int(hstmt, CAPABILITY_FIELD_ID);
_account_db_data_to_text(textbuf, &(capability_record->user_name));
capability_record->account_id = _account_query_table_column_int(hstmt, CAPABILITY_FIELD_ACCOUNT_ID);
-
- ACCOUNT_VERBOSE("END _account_convert_column_to_capability");
}
static void _account_convert_column_to_custom(account_stmt hstmt, account_custom_s *custom_record)
{
- char *textbuf = NULL;
+ const char *textbuf = NULL;
custom_record->account_id = _account_query_table_column_int(hstmt, ACCOUNT_CUSTOM_FIELD_ACCOUNT_ID);
textbuf = _account_query_table_column_text(hstmt, ACCOUNT_CUSTOM_FIELD_VALUE);
_account_db_data_to_text(textbuf, &(custom_record->value));
-
- ACCOUNT_VERBOSE("END _account_convert_column_to_custom");
}
bool _account_get_capability_text_cb(const char* capability_type, account_capability_state_e capability_value, void *user_data)
data->capablity_list = g_slist_append(data->capablity_list, (gpointer)cap_data);
- ACCOUNT_VERBOSE("_account_get_capability_text_cb :: %s\n", capability_type);
-
return TRUE;
}
if (text_data != NULL) {
text_value = strdup(text_data);
- ACCOUNT_VERBOSE("text_value = %s", text_value);
}
return text_value;
}
while (rc == SQLITE_ROW) {
_account_convert_column_to_account(hstmt, old_account);
- ACCOUNT_VERBOSE("get account info by id %p\n", old_account);
rc = _account_query_step(hstmt);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_CATCH_ERROR((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
// get capability
CATCH:
- if (hstmt != NULL) {
- _account_query_finalize(hstmt);
- hstmt = NULL;
- }
+ if (old_account) {
+ _account_free_account_items(old_account);
+ _ACCOUNT_FREE(old_account);
+ }
- if (old_account) {
- _account_free_account_items(old_account);
- _ACCOUNT_FREE(old_account);
- }
+ if (hstmt != NULL) {
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
+ hstmt = NULL;
+ }
return ACCOUNT_ERROR_NONE;
}
-static int _account_update_account_by_user_name(account_s *account, char *user_name, char *package_name)
+static int _account_update_account_by_user_name(account_s *account, const char *user_name, const char *package_name)
{
int rc = 0, binding_count = 0, count = 0;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
_account_compare_old_record_by_user_name(account, user_name, package_name);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (!account->package_name) {
ACCOUNT_ERROR("Package name is mandetory field, it can not be NULL!!!!\n");
return ACCOUNT_ERROR_INVALID_PARAMETER;
, ACCOUNT_TABLE, user_name, package_name);
count = _account_get_record_count(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (count <= 0) {
- ACCOUNT_INFO("_account_update_account_by_user_name : The account not exist!, count = %d, user_name=%s, package_name=%s\n",
+ ACCOUNT_SLOGI("_account_update_account_by_user_name : The account not exist!, count = %d, user_name=%s, package_name=%s\n",
count, user_name, package_name);
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
"int_custom0=?, int_custom1=?, int_custom2=?, int_custom3=?, int_custom4=? WHERE user_name=? and package_name=? ", ACCOUNT_TABLE);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ _account_end_transaction(FALSE);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
ACCOUNT_RETURN_VAL((hstmt != NULL), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_svc_query_prepare() failed(%s).\n", _account_db_err_msg()));
binding_count = _account_convert_account_to_sql(account, hstmt, query);
_account_query_bind_text(hstmt, binding_count++, package_name);
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
/*update capability*/
int error_code = ACCOUNT_ERROR_NONE;
int ret_transaction = 0;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
ACCOUNT_RETURN_VAL((account_id != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT ID POINTER IS NULL"));
account_s *data = (account_s*)account;
+ ACCOUNT_SLOGD("(%s)-(%d) account_insert_to_db: begin_transaction.\n", __FUNCTION__, __LINE__);
pthread_mutex_lock(&account_mutex);
/* transaction control required*/
ret_transaction = _account_begin_transaction();
- if (ret_transaction != ACCOUNT_ERROR_NONE) {
- ACCOUNT_ERROR("account_delete:_account_begin_transaction fail %d\n", ret_transaction);
+ if(_account_db_err_code() == SQLITE_PERM){
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ if (ret_transaction == ACCOUNT_ERROR_DATABASE_BUSY) {
+ ACCOUNT_ERROR("account insert:_account_begin_transaction fail %d\n", ret_transaction);
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }else if (ret_transaction != ACCOUNT_ERROR_NONE) {
+ ACCOUNT_ERROR("account insert:_account_begin_transaction fail %d\n", ret_transaction);
pthread_mutex_unlock(&account_mutex);
return ret_transaction;
}
if (_account_check_duplicated(data)) {
ret_transaction = _account_end_transaction(FALSE);
- ACCOUNT_ERROR("Duplicated, rollback insert query(%x)!!!!\n", ret_transaction);
+ ACCOUNT_DEBUG("Duplicated, rollback insert query(%x)!!!!\n", ret_transaction);
*account_id = -1;
pthread_mutex_unlock(&account_mutex);
return ACCOUNT_ERROR_DUPLICATED;
} else {
*account_id = _account_get_next_sequence(ACCOUNT_TABLE);
- char* appid = NULL;
+ char* appid = NULL;
appid = _account_get_current_appid();
if(!appid){
// API caller cannot be recognized
- ACCOUNT_ERROR("APP ID not detectable!\n");
ret_transaction = _account_end_transaction(FALSE);
ACCOUNT_ERROR("App id is not registered in account type DB, transaction ret (%x)!!!!\n", ret_transaction);
pthread_mutex_unlock(&account_mutex);
_ACCOUNT_FREE(verified_appid);
}
+#ifdef SAMSUNG_ACCOUNT_MANAGER
+ if(!strcmp(data->package_name,SAMSUNGACCOUNT_PKG_NAME)){
+ //temporary feature for samsung account domain
+ int ret = -1;
+ ret = account_set_domain_name(account, "Samsung");
+ if(ret != ACCOUNT_ERROR_NONE) {
+ ACCOUNT_DEBUG("set_domain error(%x)!!!!\n", ret);
+ }
+ }
+#endif
+
+ if(!_account_check_add_more_account(data->package_name)) {
+ ret_transaction = _account_end_transaction(FALSE);
+ ACCOUNT_ERROR("No more account cannot be added, transaction ret (%x)!!!!\n", ret_transaction);
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE;
+ }
+
error_code = _account_execute_insert_query(data);
if (error_code != ACCOUNT_ERROR_NONE) {
}
}
- ACCOUNT_VERBOSE( "_account_execute_insert_query, insert error_code : %d", error_code);
-
error_code = _account_insert_capability(data, *account_id);
if (error_code != ACCOUNT_ERROR_NONE) {
ret_transaction = _account_end_transaction(FALSE);
pthread_mutex_unlock(&account_mutex);
_account_end_transaction(TRUE);
+ ACCOUNT_SLOGD("(%s)-(%d) account _end_transaction.\n", __FUNCTION__, __LINE__);
char buf[64]={0,};
ACCOUNT_SNPRINTF(buf, sizeof(buf), "%s:%d", ACCOUNT_NOTI_NAME_INSERT, *account_id);
_account_insert_delete_update_notification_send(buf);
+ ACCOUNT_SLOGD("(%s)-(%d) account _notification_send.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_NONE;
ACCOUNT_API int account_create(account_h *account)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
}
ACCOUNT_MEMSET(data, 0, sizeof(account_s));
- ACCOUNT_VERBOSE("create handle=%p\n", *account);
-
/*Setting account as visible by default*/
data->secret = ACCOUNT_SECRECY_VISIBLE;
ACCOUNT_API int account_set_user_name(account_h account, const char *user_name)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!user_name) {
- ACCOUNT_ERROR("(%s)-(%d) user_name is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) user_name is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
_ACCOUNT_FREE(data->user_name);
data->user_name = _account_get_text(user_name);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->user_name, user_name);
-
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_set_display_name(account_h account, const char *display_name)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!display_name) {
- ACCOUNT_ERROR("(%s)-(%d) display_name is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) display_name is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
_ACCOUNT_FREE(data->display_name);
data->display_name = _account_get_text(display_name);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->display_name, display_name);
-
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_set_email_address(account_h account, const char *email_address)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!email_address) {
- ACCOUNT_ERROR("(%s)-(%d) email_address is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) email_address is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
_ACCOUNT_FREE(data->email_address);
data->email_address = _account_get_text(email_address);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->email_address, email_address);
-
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_set_icon_path(account_h account, const char *icon_path)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!icon_path) {
- ACCOUNT_ERROR("(%s)-(%d) icon_path is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) icon_path is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
_ACCOUNT_FREE(data->icon_path);
data->icon_path = _account_get_text(icon_path);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->icon_path, icon_path);
-
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_set_source(account_h account, const char *source)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!source) {
- ACCOUNT_ERROR("(%s)-(%d) source is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) source is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
account_s *data = (account_s*)account;
_ACCOUNT_FREE(data->source);
data->source = _account_get_text(source);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->source, source);
-
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_set_package_name(account_h account, const char *package_name)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!package_name) {
- ACCOUNT_ERROR("(%s)-(%d) package_name is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) package_name is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
_ACCOUNT_FREE(data->package_name);
data->package_name = _account_get_text(package_name);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->package_name, package_name);
-
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_set_domain_name(account_h account, const char *domain_name)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!domain_name) {
- ACCOUNT_ERROR("(%s)-(%d) domain_name is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) domain_name is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
account_s *data = (account_s*)account;
_ACCOUNT_FREE(data->domain_name);
data->domain_name = _account_get_text(domain_name);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->domain_name, domain_name);
-
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_set_access_token(account_h account, const char *access_token)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!access_token) {
- ACCOUNT_ERROR("(%s)-(%d) access_token is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) access_token is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
_ACCOUNT_FREE(data->access_token);
data->access_token = _account_get_text(access_token);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->access_token, access_token);
-
return ACCOUNT_ERROR_NONE;
}
-ACCOUNT_API int account_set_user_text(account_h account, int index, const char *user_txt)
+ACCOUNT_API int account_set_user_text(account_h account, int idx, const char *user_txt)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!user_txt) {
- ACCOUNT_ERROR("(%s)-(%d) user_txt is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) user_txt is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
- if (index >= USER_TXT_CNT || index < 0) {
- ACCOUNT_ERROR("(%s)-(%d) index rage should be between 0-4.\n", __FUNCTION__, __LINE__);
+ if (idx >= USER_TXT_CNT || idx < 0) {
+ ACCOUNT_SLOGE("(%s)-(%d) index rage should be between 0-4.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
account_s *data = (account_s*)account;
- _ACCOUNT_FREE(data->user_data_txt[index]);
- data->user_data_txt[index] = _account_get_text(user_txt);
-
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->user_data_txt[index], user_txt);
+ _ACCOUNT_FREE(data->user_data_txt[idx]);
+ data->user_data_txt[idx] = _account_get_text(user_txt);
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_set_custom(account_h account, const char* key, const char* value)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!key) {
- ACCOUNT_ERROR("(%s)-(%d) key is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) key is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!value) {
- ACCOUNT_ERROR("(%s)-(%d) value is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) value is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
account_custom_s* custom_data = NULL;
custom_data = (account_custom_s*)iter->data;
- ACCOUNT_VERBOSE( "account_custom_s->key = %s, account_custom_s->value = %s \n", custom_data->key, custom_data->value);
+ ACCOUNT_SLOGD( "account_custom_s->key = %s, account_custom_s->value = %s \n", custom_data->key, custom_data->value);
if(!strcmp(custom_data->key, key)) {
_ACCOUNT_FREE(custom_data->value);
account_custom_s* custom_data = (account_custom_s*)malloc(sizeof(account_custom_s));
if (custom_data == NULL) {
- ACCOUNT_FATAL("(%s)-(%d) MALLOC FAIL\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
ACCOUNT_MEMSET(custom_data, 0, sizeof(account_custom_s));
{
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__));
- if ( (auth_type < 0) || (auth_type > ACCOUNT_AUTH_TYPE_CLIENT_LOGIN)) {
- ACCOUNT_ERROR("(%s)-(%d) auth_type is less than 1 or more than enum max.\n", __FUNCTION__, __LINE__);
+ if ( ((int)auth_type < 0) || (auth_type > ACCOUNT_AUTH_TYPE_MAX) ) {
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
{
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__));
- if ( (secret < 0) || (secret > ACCOUNT_SECRECY_VISIBLE)) {
- ACCOUNT_ERROR("(%s)-(%d) auth_type is less than 1 or more than enum max.\n", __FUNCTION__, __LINE__);
+ if ( ((int)secret < 0) || (secret > ACCOUNT_SECRECY_MAX)) {
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
{
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__));
- if ( (sync_support < 0) || (sync_support > ACCOUNT_SUPPORTS_SYNC)) {
- ACCOUNT_ERROR("(%s)-(%d) sync_support is less than 1 or more than enum max.\n", __FUNCTION__, __LINE__);
+ if ( ((int)sync_support < 0) || (sync_support > ACCOUNT_SYNC_MAX)) {
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
return ACCOUNT_ERROR_NONE;
}
-ACCOUNT_API int account_set_user_int(account_h account, int index, const int user_int)
+ACCOUNT_API int account_set_user_int(account_h account, int idx, const int user_int)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
- if (index >= USER_INT_CNT ||index < 0) {
- ACCOUNT_ERROR("(%s)-(%d) index rage should be between 0-4.\n", __FUNCTION__, __LINE__);
+ if (idx >= USER_INT_CNT ||idx < 0) {
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
account_s *data = (account_s*)account;
- data->user_data_int[index] = user_int;
+ data->user_data_int[idx] = user_int;
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_RETURN_VAL((capability_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_type is null"));
if ((capability_value != ACCOUNT_CAPABILITY_DISABLED) && (capability_value != ACCOUNT_CAPABILITY_ENABLED)) {
- ACCOUNT_ERROR("(%s)-(%d) capability_value is not equal to 0 or 1.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_user_name(account_h account, char **user_name)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!user_name) {
- ACCOUNT_ERROR("(%s)-(%d) user name is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_display_name(account_h account, char **display_name)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!display_name) {
- ACCOUNT_ERROR("(%s)-(%d) display name is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_email_address(account_h account,char **email_address)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!email_address) {
- ACCOUNT_ERROR("(%s)-(%d) email address is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_icon_path(account_h account, char **icon_path)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!icon_path) {
- ACCOUNT_ERROR("(%s)-(%d) icon path is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_source(account_h account, char **source)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!source) {
- ACCOUNT_ERROR("(%s)-(%d) source is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_package_name(account_h account, char **package_name)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!package_name) {
- ACCOUNT_ERROR("(%s)-(%d) package name is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_domain_name(account_h account, char **domain_name)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!domain_name) {
- ACCOUNT_ERROR("(%s)-(%d) domain name is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_access_token(account_h account, char **access_token)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!access_token) {
- ACCOUNT_ERROR("(%s)-(%d) access token is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_user_text(account_h account, int user_text_index, char **text)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!text) {
- ACCOUNT_ERROR("(%s)-(%d) text is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_RETURN_VAL((user_text_index >=0 && user_text_index < USER_TXT_CNT ), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("INVALID USER TEXT INDEX"));
ACCOUNT_API int account_get_auth_type(account_h account, account_auth_type_e *auth_type)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!auth_type) {
- ACCOUNT_ERROR("(%s)-(%d) auth_type is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_secret(account_h account, account_secrecy_state_e *secret)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!secret) {
- ACCOUNT_ERROR("(%s)-(%d) secret is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_sync_support(account_h account, account_sync_state_e *sync_support)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!sync_support) {
- ACCOUNT_ERROR("(%s)-(%d) sync_support is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_account_id(account_h account, int *account_id)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!account_id) {
- ACCOUNT_ERROR("(%s)-(%d) account_id is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_get_user_int(account_h account, int user_int_index, int *integer)
{
if (!account) {
- ACCOUNT_ERROR("(%s)-(%d) account handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_RETURN_VAL((user_int_index >=0 && user_int_index < USER_TXT_CNT ), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("INVALID USER TEXT INDEX"));
if (!integer) {
- ACCOUNT_ERROR("(%s)-(%d) integer is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
cap_data = (account_capability_s*)iter->data;
- ACCOUNT_VERBOSE("account_get_capability :: type = %d, value = %d", cap_data->type, cap_data->value);
-
if(!strcmp(capability_type, cap_data->type)) {
*capability_value = cap_data->value;
return ACCOUNT_ERROR_NONE;
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
-ACCOUNT_API int account_get_capability_all(account_h account, capability_cb cb_func, void *user_data)
+ACCOUNT_API int account_get_capability_all(account_h account, capability_cb callback, void *user_data)
{
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
GSList *iter;
account_s *data = (account_s*)account;
cap_data = (account_capability_s*)iter->data;
- ACCOUNT_VERBOSE("account_get_capability :: type = %d, value = %d", cap_data->type, cap_data->value);
-
- //cb_func(cap_data->type, cap_data->value, user_data);
- if(cb_func(cap_data->type, cap_data->value, user_data)!=TRUE){
- ACCOUNT_VERBOSE("account_get_capability :: cb_func returns false, it is stopped\n");
+ if(callback(cap_data->type, cap_data->value, user_data)!=TRUE){
return ACCOUNT_ERROR_NONE;
}
}
custom_data = (account_custom_s*)iter->data;
- ACCOUNT_VERBOSE("account_get_custom :: key = %s, value = %s", custom_data->key, custom_data->value);
-
if(!strcmp(key, custom_data->key)) {
(*value) = NULL;
*value = _account_get_text(custom_data->value);
}
}
- ACCOUNT_INFO("key is not found %s", key);
-
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
-ACCOUNT_API int account_get_custom_all(account_h account, account_custom_cb cb_func, void* user_data)
+ACCOUNT_API int account_get_custom_all(account_h account, account_custom_cb callback, void* user_data)
{
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
GSList *iter;
account_s *data = (account_s*)account;
custom_data = (account_custom_s*)iter->data;
- ACCOUNT_VERBOSE("account_get_custom :: key = %s, value = %s", custom_data->key, custom_data->value);
-
- cb_ret = cb_func(custom_data->key, custom_data->value, user_data);
+ cb_ret = callback(custom_data->key, custom_data->value, user_data);
if(!cb_ret) {
- ACCOUNT_INFO("account_get_custom_all callback func ret = %d", cb_ret);
break;
- }
+ }
}
return ACCOUNT_ERROR_NONE;
}
-ACCOUNT_API int account_query_capability_by_account_id(capability_cb cb_func, int account_id, void *user_data )
+ACCOUNT_API int account_query_capability_by_account_id(capability_cb callback, int account_id, void *user_data )
{
int error_code = ACCOUNT_ERROR_NONE;
account_stmt hstmt = NULL;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((account_id > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT INDEX IS LESS THAN 0"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE account_id = %d", CAPABILITY_TABLE, account_id);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_ROW, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
_account_convert_column_to_capability(hstmt, capability_record);
- cb_ret = cb_func(capability_record->type, capability_record->value, user_data);
+ cb_ret = callback(capability_record->type, capability_record->value, user_data);
_account_free_capability_items(capability_record);
_ACCOUNT_FREE(capability_record);
rc = _account_query_step(hstmt);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
error_code = ACCOUNT_ERROR_NONE;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
while (rc == SQLITE_ROW) {
_account_convert_column_to_account(hstmt, old_account);
- ACCOUNT_VERBOSE("get account info by id %p\n", old_account);
rc = _account_query_step(hstmt);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_CATCH_ERROR((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
// get capability
CATCH:
+ if (old_account) {
+ _account_free_account_items(old_account);
+ _ACCOUNT_FREE(old_account);
+ }
+
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
+ return ACCOUNT_ERROR_NONE;
+}
+
+static int _account_get_package_name_from_account_id(int account_id, char **package_name)
+{
+ int error_code = ACCOUNT_ERROR_NONE;
+ account_stmt hstmt = NULL;
+ char query[ACCOUNT_SQL_LEN_MAX] = {0, };
+ int rc = 0;
+ account_s *old_account = NULL;
+
+ ACCOUNT_RETURN_VAL((account_id > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT INDEX IS LESS THAN 0"));
+ ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
+
+ old_account = (account_s*)calloc(1, sizeof(account_s));
+
+ ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
+
+ ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE _id = %d", ACCOUNT_TABLE, account_id);
+ hstmt = _account_prepare_query(query);
+
+ rc = _account_query_step(hstmt);
+ ACCOUNT_CATCH_ERROR(rc == SQLITE_ROW, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
+
+ while (rc == SQLITE_ROW) {
+ _account_convert_column_to_account(hstmt, old_account);
+ rc = _account_query_step(hstmt);
+ }
+
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_CATCH_ERROR((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
+ hstmt = NULL;
+
+ // get package name.
+ *package_name = _account_get_text(old_account->package_name);
+
+
+ CATCH:
if (old_account) {
_account_free_account_items(old_account);
_ACCOUNT_FREE(old_account);
}
- return ACCOUNT_ERROR_NONE;
+ if (hstmt != NULL) {
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
+ hstmt = NULL;
+ }
+
+ return error_code;
+
}
static int _account_update_account(account_s *account, int account_id)
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
+ /* Check permission of requested appid */
char* current_appid = NULL;
- char* verified_appid = NULL;
+ char *package_name = NULL;
current_appid = _account_get_current_appid();
- error_code = _account_check_account_type_with_appid_group(current_appid, &verified_appid);
+ error_code = _account_get_package_name_from_account_id(account_id, &package_name);
+
+ if(error_code != ACCOUNT_ERROR_NONE || package_name == NULL){
+ ACCOUNT_ERROR("No package name with account_id\n");
+ _ACCOUNT_FREE(current_appid);
+ _ACCOUNT_FREE(package_name);
+ return ACCOUNT_ERROR_RECORD_NOT_FOUND;
+ }
+
+ error_code = _account_check_appid_group_with_package_name(current_appid, package_name);
+ ACCOUNT_DEBUG( "UPDATE:account_id[%d],current_appid[%s]package_name[%s]", account_id, current_appid, package_name); // TODO: remove the log later.
_ACCOUNT_FREE(current_appid);
- _ACCOUNT_FREE(verified_appid);
+ _ACCOUNT_FREE(package_name);
if(error_code != ACCOUNT_ERROR_NONE){
ACCOUNT_ERROR("No permission to update\n");
_account_compare_old_record(account, account_id);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ } else if( _account_db_err_code() == SQLITE_BUSY ){
+ ACCOUNT_ERROR( "database busy(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }
+
if (!account->user_name && !account->display_name && !account->email_address) {
ACCOUNT_ERROR("One field should be set among user name, display name, email address\n");
return ACCOUNT_ERROR_INVALID_PARAMETER;
count = _account_get_record_count(query);
if (count <= 0) {
- ACCOUNT_WARNING(" Account record not found, count = %d\n", count);
+ ACCOUNT_DEBUG(" Account record not found, count = %d\n", count);
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
/* transaction control required*/
ret_transaction = _account_begin_transaction();
+ if( ret_transaction == ACCOUNT_ERROR_DATABASE_BUSY ){
+ ACCOUNT_ERROR( "database busy(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "UPDATE %s SET user_name=?, email_address =?, display_name =?, "
"int_custom0=?, int_custom1=?, int_custom2=?, int_custom3=?, int_custom4=? WHERE _id=? ", ACCOUNT_TABLE);
hstmt = _account_prepare_query(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ret_transaction = _account_end_transaction(FALSE);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
ACCOUNT_RETURN_VAL((hstmt != NULL), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_svc_query_prepare() failed(%s)(%x).\n", _account_db_err_msg(), _account_end_transaction(FALSE)));
binding_count = _account_convert_account_to_sql(account, hstmt, query);
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_DEBUG( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_SLOGE( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
/*update capability*/
}
ret_transaction = _account_end_transaction(TRUE);
- ACCOUNT_DEBUG("update capability success, trying to commit(%x) !!!\n", ret_transaction);
return error_code;
}
+
static int _account_update_account_ex(account_s *account, int account_id)
{
int rc = 0, binding_count =0;
_account_compare_old_record(account, account_id);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (!account->user_name && !account->display_name && !account->email_address) {
ACCOUNT_ERROR("One field should be set among user name, display name, email address\n");
return ACCOUNT_ERROR_INVALID_PARAMETER;
count = _account_get_record_count(query);
if (count <= 0) {
- ACCOUNT_WARNING(" Account record not found, count = %d\n", count);
+ ACCOUNT_DEBUG(" Account record not found, count = %d\n", count);
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
/* transaction control required*/
ret_transaction = _account_begin_transaction();
+ if( ret_transaction == ACCOUNT_ERROR_DATABASE_BUSY ){
+ ACCOUNT_ERROR( "database busy(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "UPDATE %s SET user_name=?, email_address =?, display_name =?, "
"int_custom0=?, int_custom1=?, int_custom2=?, int_custom3=?, int_custom4=? WHERE _id=? ", ACCOUNT_TABLE);
hstmt = _account_prepare_query(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ret_transaction = _account_end_transaction(FALSE);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
ACCOUNT_RETURN_VAL((hstmt != NULL), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_svc_query_prepare() failed(%s)(%x).\n", _account_db_err_msg(), _account_end_transaction(FALSE)));
binding_count = _account_convert_account_to_sql(account, hstmt, query);
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_DEBUG( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_SLOGE( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
/*update capability*/
}
ret_transaction = _account_end_transaction(TRUE);
- ACCOUNT_DEBUG("update capability success, trying to commit(%x) !!!\n", ret_transaction);
return error_code;
}
+
ACCOUNT_API int account_update_to_db_by_id(const account_h account, int account_id)
{
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("DATA IS NULL"));
ACCOUNT_RETURN_VAL((account_id > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("Account id is not valid"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_API int account_update_to_db_by_id_ex(const account_h account, int account_id)
{
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("DATA IS NULL"));
ACCOUNT_RETURN_VAL((account_id > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("Account id is not valid"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
return ACCOUNT_ERROR_NONE;
}
+
ACCOUNT_API int account_update_to_db_by_user_name(account_h account, const char *user_name, const char *package_name)
{
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("DATA IS NULL"));
ACCOUNT_RETURN_VAL((user_name != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("USER NAME IS NULL"));
ACCOUNT_RETURN_VAL((package_name != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("PACKAGE NAME IS NULL"));
pthread_mutex_lock(&account_mutex);
- error_code = _account_update_account_by_user_name(data, (char*)user_name, (char*)package_name);
+ error_code = _account_update_account_by_user_name(data, user_name, package_name);
pthread_mutex_unlock(&account_mutex);
int rc = 0;
GList *account_list = NULL;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT INFO IS NULL"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s ", ACCOUNT_TABLE);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
rc = _account_query_step(hstmt);
account_s *account_record = NULL;
k++;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {_account_glist_free(account_list);}, rc, ("finalize error"));
hstmt = NULL;
GList* iter;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
if (account_list) {
int rc = 0;
int count =1;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((account_db_id > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT INDEX IS LESS THAN 0"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
- if ( (sync_status < 0) || (sync_status > ACCOUNT_SYNC_STATUS_RUNNING)) {
- ACCOUNT_ERROR("(%s)-(%d) sync_status is less than 0 or more than enum max.\n", __FUNCTION__, __LINE__);
+ if ( ((int)sync_status < 0) || (sync_status > ACCOUNT_SYNC_MAX) ) {
+ ACCOUNT_SLOGE("(%s)-(%d) sync_status is less than 0 or more than enum max.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
rc = _account_get_record_count(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (rc <= 0) {
- ACCOUNT_ERROR( "account_update_sync_status_by_id : related account item is not existed rc=%d , %s", rc, _account_db_err_msg());
+ ACCOUNT_SLOGE( "account_update_sync_status_by_id : related account item is not existed rc=%d , %s", rc, _account_db_err_msg());
pthread_mutex_unlock(&account_mutex);
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
rc = _account_query_step(hstmt);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_DB_FAILED,
("account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg()));
- _account_query_finalize(hstmt);
-
+ rc = _account_query_finalize(hstmt);
+ if (rc != ACCOUNT_ERROR_NONE) {
+ ACCOUNT_ERROR("_account_query_finalize error");
+ pthread_mutex_unlock(&account_mutex);
+ return rc;
+ }
char buf[64]={0,};
ACCOUNT_SNPRINTF(buf, sizeof(buf), "%s:%d", ACCOUNT_NOTI_NAME_SYNC_UPDATE, account_db_id);
_account_insert_delete_update_notification_send(buf);
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((account_db_id > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT INDEX IS LESS THAN 0"));
ACCOUNT_RETURN_VAL((*account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT IS NULL"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE _id = %d", ACCOUNT_TABLE, account_db_id);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_ROW, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
while (rc == SQLITE_ROW) {
_account_convert_column_to_account(hstmt, account_record);
- ACCOUNT_VERBOSE("get account info by id %p\n", account_record);
rc = _account_query_step(hstmt);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
+
account_query_capability_by_account_id(_account_get_capability_text_cb, account_record->id, (void*)account_record);
_account_query_custom_by_account_id(_account_get_custom_text_cb, account_record->id, (void*)account_record);
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
return error_code;
}
-ACCOUNT_API int account_query_account_by_user_name(account_cb cb_func, const char *user_name, void *user_data)
+ACCOUNT_API int account_query_account_by_user_name(account_cb callback, const char *user_name, void *user_data)
{
int error_code = ACCOUNT_ERROR_NONE;
account_stmt hstmt = NULL;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((user_name != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("USER NAME IS NULL"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("CALL BACK IS NULL"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("CALL BACK IS NULL"));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
int binding_count = 1;
_account_query_bind_text(hstmt, binding_count++, user_name);
if (account_head == NULL) {
ACCOUNT_FATAL("malloc Failed");
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
return ACCOUNT_ERROR_OUT_OF_MEMORY;
rc = _account_query_step(hstmt);
tmp++;
- ACCOUNT_DEBUG("DETECTED COUNT %d\n", tmp);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_CATCH_ERROR((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
GList *iter;
tmp = g_list_length(account_head->account_list);
- ACCOUNT_VERBOSE("GLIST LEN %d\n", tmp);
for (iter = account_head->account_list; iter != NULL; iter = g_list_next(iter)) {
account_h account;
account_s *testaccount = (account_s*)account;
- ACCOUNT_VERBOSE("id = %d", testaccount->id);
- ACCOUNT_VERBOSE("user_name = %s", testaccount->user_name);
- ACCOUNT_VERBOSE("email_address = %s", testaccount->email_address);
- ACCOUNT_VERBOSE("display_name = %s", testaccount->display_name);
- ACCOUNT_VERBOSE("icon_path = %s", testaccount->icon_path);
- ACCOUNT_VERBOSE("source = %s", testaccount->source);
- ACCOUNT_VERBOSE("package_name = %s", testaccount->package_name);
- ACCOUNT_VERBOSE("access_token = %s", testaccount->access_token);
- ACCOUNT_VERBOSE("domain_name = %s", testaccount->domain_name);
- ACCOUNT_VERBOSE("auth_type = %d", testaccount->auth_type);
- ACCOUNT_VERBOSE("secret = %d", testaccount->secret);
- ACCOUNT_VERBOSE("sync_support = %d", testaccount->sync_support);
-
account_query_capability_by_account_id(_account_get_capability_text_cb, testaccount->id, (void*)testaccount);
_account_query_custom_by_account_id(_account_get_custom_text_cb, testaccount->id, (void*)testaccount);
- ACCOUNT_VERBOSE("capability_list address = %p", testaccount->capablity_list);
-
- //cb_func(account, user_data);
- ACCOUNT_CATCH_ERROR(cb_func(account, user_data) == TRUE, {}, ACCOUNT_ERROR_NONE, ("cb_func returns false, it is stopped.\n"));
-
+ ACCOUNT_CATCH_ERROR(callback(account, user_data) == TRUE, {}, ACCOUNT_ERROR_NONE, ("callback returns false, it is stopped.\n"));
}
error_code = ACCOUNT_ERROR_NONE;
CATCH:
- if (hstmt != NULL) {
- _account_query_finalize(hstmt);
- hstmt = NULL;
- }
if (account_head) {
if (account_head->account_list) {
_account_glist_free(account_head->account_list);
}
_ACCOUNT_FREE(account_head);
}
+ if (hstmt != NULL) {
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
+ hstmt = NULL;
+ }
pthread_mutex_unlock(&account_mutex);
return error_code;
}
-ACCOUNT_API int account_query_account_by_capability(account_cb cb_func, const char* capability_type, account_capability_state_e capability_value, void* user_data)
+ACCOUNT_API int account_query_account_by_capability(account_cb callback, const char* capability_type, account_capability_state_e capability_value, void* user_data)
{
int error_code = ACCOUNT_ERROR_NONE;
account_stmt hstmt = NULL;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((capability_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_type IS NULL"));
- if ((capability_value < 0) || (capability_value > ACCOUNT_CAPABILITY_ENABLED)) {
- ACCOUNT_ERROR("(%s)-(%d) capability_value is not equal to 0 or 1.\n", __FUNCTION__, __LINE__);
+ if (((int)capability_value < 0) || (capability_value > ACCOUNT_CAPABILITY_STATE_MAX)) {
+ ACCOUNT_SLOGE("(%s)-(%d) capability_value is not equal to 0 or 1.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("CALL BACK IS NULL"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("CALL BACK IS NULL"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
int binding_count = 1;
- _account_query_bind_text(hstmt, binding_count++, (char*)capability_type);
+ _account_query_bind_text(hstmt, binding_count++, capability_type);
_account_query_bind_int(hstmt, binding_count++, (int)capability_value);
rc = _account_query_step(hstmt);
if (account_head == NULL) {
ACCOUNT_FATAL("malloc Failed");
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
return ACCOUNT_ERROR_OUT_OF_MEMORY;
rc = _account_query_step(hstmt);
tmp++;
- ACCOUNT_VERBOSE("DETECTED COUNT %d\n", tmp);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_CATCH_ERROR((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
GList *iter;
tmp = g_list_length(account_head->account_list);
- ACCOUNT_VERBOSE("GLIST LEN %d\n", tmp);
for (iter = account_head->account_list; iter != NULL; iter = g_list_next(iter)) {
account_h account = NULL;
account_query_capability_by_account_id(_account_get_capability_text_cb, testaccount->id, (void*)testaccount);
_account_query_custom_by_account_id(_account_get_custom_text_cb, testaccount->id, (void*)testaccount);
- ACCOUNT_VERBOSE("capability_list address = %p", testaccount->capablity_list);
-
- //cb_func(account, user_data);
- ACCOUNT_CATCH_ERROR(cb_func(account, user_data) == TRUE, {}, ACCOUNT_ERROR_NONE, ("cb_func returns false, it is stopped.\n"));
+ ACCOUNT_CATCH_ERROR(callback(account, user_data) == TRUE, {}, ACCOUNT_ERROR_NONE, ("callback returns false, it is stopped.\n"));
}
error_code = ACCOUNT_ERROR_NONE;
CATCH:
- if (hstmt != NULL) {
- _account_query_finalize(hstmt);
- hstmt = NULL;
- }
if (account_head) {
if (account_head->account_list) {
_account_glist_free(account_head->account_list);
_ACCOUNT_FREE(account_head);
}
+ if (hstmt != NULL) {
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
+ hstmt = NULL;
+ }
+
pthread_mutex_unlock(&account_mutex);
return error_code;
}
-ACCOUNT_API int account_query_account_by_capability_type(account_cb cb_func, const char* capability_type, void* user_data)
+ACCOUNT_API int account_query_account_by_capability_type(account_cb callback, const char* capability_type, void* user_data)
{
int error_code = ACCOUNT_ERROR_NONE;
account_stmt hstmt = NULL;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((capability_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_type IS NULL"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("CALL BACK IS NULL"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("CALL BACK IS NULL"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
int binding_count = 1;
- _account_query_bind_text(hstmt, binding_count++, (char*)capability_type);
+ _account_query_bind_text(hstmt, binding_count++, capability_type);
rc = _account_query_step(hstmt);
if (account_head == NULL) {
ACCOUNT_FATAL("malloc Failed");
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
return ACCOUNT_ERROR_OUT_OF_MEMORY;
rc = _account_query_step(hstmt);
tmp++;
- ACCOUNT_VERBOSE("DETECTED COUNT %d\n", tmp);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_CATCH_ERROR((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
GList *iter;
tmp = g_list_length(account_head->account_list);
- ACCOUNT_VERBOSE("GLIST LEN %d\n", tmp);
for (iter = account_head->account_list; iter != NULL; iter = g_list_next(iter)) {
account_h account = NULL;
account_query_capability_by_account_id(_account_get_capability_text_cb, testaccount->id, (void*)testaccount);
_account_query_custom_by_account_id(_account_get_custom_text_cb, testaccount->id, (void*)testaccount);
- ACCOUNT_VERBOSE("capability_list address = %p", testaccount->capablity_list);
-
- //cb_func(account, user_data);
- ACCOUNT_CATCH_ERROR(cb_func(account, user_data) == TRUE, {}, ACCOUNT_ERROR_NONE, ("The record isn't found.\n"));
+ ACCOUNT_CATCH_ERROR(callback(account, user_data) == TRUE, {}, ACCOUNT_ERROR_NONE, ("The record isn't found.\n"));
}
error_code = ACCOUNT_ERROR_NONE;
CATCH:
- if (hstmt != NULL) {
- _account_query_finalize(hstmt);
- hstmt = NULL;
- }
if (account_head) {
if (account_head->account_list) {
_account_glist_free(account_head->account_list);
_ACCOUNT_FREE(account_head);
}
+ if (hstmt != NULL) {
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
+ hstmt = NULL;
+ }
+
pthread_mutex_unlock(&account_mutex);
return error_code;
}
-ACCOUNT_API int account_query_account_by_package_name(account_cb cb_func, const char* package_name, void* user_data)
+ACCOUNT_API int account_query_account_by_package_name(account_cb callback, const char* package_name, void* user_data)
{
int error_code = ACCOUNT_ERROR_NONE;
account_stmt hstmt = NULL;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((package_name != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("PACKAGE NAME IS NULL"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("CALL BACK IS NULL"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("CALL BACK IS NULL"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
int binding_count = 1;
_account_query_bind_text(hstmt, binding_count++, package_name);
if (account_head == NULL) {
ACCOUNT_FATAL("malloc Failed");
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
return ACCOUNT_ERROR_OUT_OF_MEMORY;
rc = _account_query_step(hstmt);
tmp++;
- ACCOUNT_VERBOSE("DETECTED COUNT %d\n", tmp);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_CATCH_ERROR((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
GList *iter;
tmp = g_list_length(account_head->account_list);
- ACCOUNT_DEBUG("GLIST LEN %d\n", tmp);
for (iter = account_head->account_list; iter != NULL; iter = g_list_next(iter)) {
account_h account = NULL;
account_s* testaccount = (account_s*)account;
- ACCOUNT_VERBOSE("id = %d", testaccount->id);
- ACCOUNT_VERBOSE("user_name = %s", testaccount->user_name);
- ACCOUNT_VERBOSE("email_address = %s", testaccount->email_address);
- ACCOUNT_VERBOSE("display_name = %s", testaccount->display_name);
- ACCOUNT_VERBOSE("icon_path = %s", testaccount->icon_path);
- ACCOUNT_VERBOSE("source = %s", testaccount->source);
- ACCOUNT_VERBOSE("package_name = %s", testaccount->package_name);
- ACCOUNT_VERBOSE("access_token = %s", testaccount->access_token);
- ACCOUNT_VERBOSE("domain_name = %s", testaccount->domain_name);
- ACCOUNT_VERBOSE("auth_type = %d", testaccount->auth_type);
- ACCOUNT_VERBOSE("secret = %d", testaccount->secret);
- ACCOUNT_VERBOSE("sync_support = %d", testaccount->sync_support);
-
account_query_capability_by_account_id(_account_get_capability_text_cb, testaccount->id, (void*)testaccount);
_account_query_custom_by_account_id(_account_get_custom_text_cb, testaccount->id, (void*)testaccount);
- ACCOUNT_VERBOSE("capability_list address = %p", testaccount->capablity_list);
-
- //cb_func(account, user_data);
- ACCOUNT_CATCH_ERROR(cb_func(account, user_data) == TRUE, {}, ACCOUNT_ERROR_NONE, ("The record isn't found.\n"));
+ ACCOUNT_CATCH_ERROR(callback(account, user_data) == TRUE, {}, ACCOUNT_ERROR_NONE, ("The record isn't found.\n"));
}
error_code = ACCOUNT_ERROR_NONE;
CATCH:
- if (hstmt != NULL) {
- _account_query_finalize(hstmt);
- hstmt = NULL;
- }
if (account_head) {
if (account_head->account_list) {
_account_glist_free(account_head->account_list);
_ACCOUNT_FREE(account_head);
}
+ if (hstmt != NULL) {
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
+ hstmt = NULL;
+ }
+
pthread_mutex_unlock(&account_mutex);
return error_code;
}
int ret_transaction = 0;
bool is_success = FALSE;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
int count = -1;
- account_h account = NULL;
/* Check requested ID to delete */
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT COUNT(*) FROM %s WHERE _id=%d", ACCOUNT_TABLE, account_id);
count = _account_get_record_count(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (count <= 0) {
ACCOUNT_ERROR("account id(%d) is not exist. count(%d)\n", account_id, count);
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
/* Check permission of requested appid */
- account_create(&account);
- account_query_account_by_account_id(account_id, &account);
-
char* current_appid = NULL;
- char* verified_appid = NULL;
+ char *package_name = NULL;
current_appid = _account_get_current_appid();
- error_code = _account_check_account_type_with_appid_group(current_appid, &verified_appid);
+
+ error_code = _account_get_package_name_from_account_id(account_id, &package_name);
+
+ if(error_code != ACCOUNT_ERROR_NONE){
+ ACCOUNT_ERROR("No package name with account_id\n");
+ _ACCOUNT_FREE(current_appid);
+ _ACCOUNT_FREE(package_name);
+ return ACCOUNT_ERROR_RECORD_NOT_FOUND;
+ }
+ ACCOUNT_DEBUG( "DELETE:account_id[%d],current_appid[%s]package_name[%s]", account_id, current_appid, package_name);
+
+ error_code = _account_check_appid_group_with_package_name(current_appid, package_name);
_ACCOUNT_FREE(current_appid);
- _ACCOUNT_FREE(verified_appid);
+ _ACCOUNT_FREE(package_name);
if(error_code != ACCOUNT_ERROR_NONE){
ACCOUNT_ERROR("No permission to delete\n");
- account_destroy(account);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
- account_destroy(account);
-
/* transaction control required*/
ret_transaction = _account_begin_transaction();
+ if( _account_db_err_code() == SQLITE_PERM ){
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ if( ret_transaction == ACCOUNT_ERROR_DATABASE_BUSY ){
+ ACCOUNT_ERROR( "database busy(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }
+
if (ret_transaction != ACCOUNT_ERROR_NONE) {
ACCOUNT_ERROR("account_delete:_account_begin_transaction fail %d\n", ret_transaction);
pthread_mutex_unlock(&account_mutex);
ACCOUNT_SNPRINTF(query, sizeof(query), "DELETE FROM %s WHERE account_id = %d", CAPABILITY_TABLE, account_id);
hstmt = _account_prepare_query(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
ACCOUNT_CATCH_ERROR(hstmt != NULL, {}, ACCOUNT_ERROR_DB_FAILED,
("_account_svc_query_prepare(%s) failed(%s).\n", query, _account_db_err_msg()));
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
ACCOUNT_MEMSET(query, 0, sizeof(query));
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found. id=%d, rc=%d\n", account_id, rc));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
/* delete custom data */
ACCOUNT_SNPRINTF(query, sizeof(query), "DELETE FROM %s WHERE AccountId = %d", ACCOUNT_CUSTOM_TABLE, account_id);
hstmt = _account_prepare_query(query);
+
ACCOUNT_CATCH_ERROR(hstmt != NULL, {}, ACCOUNT_ERROR_DB_FAILED,
("_account_svc_query_prepare(%s) failed(%s).\n", query, _account_db_err_msg()));
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found. id=%d, rc=%d\n", account_id, rc));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_CATCH_ERROR(rc == ACCOUNT_ERROR_NONE, {}, rc, ("finalize error", account_id, rc));
+ hstmt = NULL;
is_success = TRUE;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ if(rc != ACCOUNT_ERROR_NONE ){
+ ACCOUNT_ERROR("rc (%d)", rc);
+ is_success = FALSE;
+ }
+
hstmt = NULL;
}
ret_transaction = _account_end_transaction(is_success);
if (ret_transaction != ACCOUNT_ERROR_NONE) {
- ACCOUNT_ERROR("account_svc_delete:_account_svc_end_transaction fail %d, is_success=%d\n", ret_transaction, is_success);
+ ACCOUNT_ERROR("account_delete:_account_end_transaction fail %d, is_success=%d\n", ret_transaction, is_success);
} else {
if (is_success == true) {
char buf[64]={0,};
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE user_name = ? and package_name = ?", ACCOUNT_TABLE);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
_account_query_bind_text(hstmt, binding_count++, username);
_account_query_bind_text(hstmt, binding_count++, package_name);
while (rc == SQLITE_ROW) {
_account_convert_column_to_account(hstmt, account_record);
- ACCOUNT_VERBOSE("get account info by id %p\n", account_record);
rc = _account_query_step(hstmt);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
account_query_capability_by_account_id(_account_get_capability_text_cb, account_record->id, (void*)account_record);
_account_query_custom_by_account_id(_account_get_custom_text_cb, account_record->id, (void*)account_record);
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
int binding_count = 1;
int account_id = -1;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((user_name != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("user_name is null!"));
ACCOUNT_RETURN_VAL((package_name != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("package_name is null!"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
rc = account_create(&account);
rc = _account_query_account_by_username_and_package(user_name, package_name, &account);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ account_destroy(account);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
rc = account_get_account_id(account, &account_id);
rc = account_destroy(account);
/* transaction control required*/
ret_transaction = _account_begin_transaction();
- if (ret_transaction != ACCOUNT_ERROR_NONE) {
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ if( ret_transaction == ACCOUNT_ERROR_DATABASE_BUSY ){
+ ACCOUNT_ERROR( "database busy(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }else if (ret_transaction != ACCOUNT_ERROR_NONE) {
ACCOUNT_ERROR("account_delete:_account_begin_transaction fail %d\n", ret_transaction);
pthread_mutex_unlock(&account_mutex);
return ret_transaction;
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ _account_end_transaction(FALSE);
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
ACCOUNT_CATCH_ERROR(hstmt != NULL, {}, ACCOUNT_ERROR_DB_FAILED,
("_account_svc_query_prepare(%s) failed(%s).\n", query, _account_db_err_msg()));
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
/* delete capability */
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
ACCOUNT_MEMSET(query, 0, sizeof(query));
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found. user_name=%s, package_name=%s, rc=%d\n", user_name, package_name, rc));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
is_success = TRUE;
hstmt = NULL;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
tmp_ptr = strdup(id_buf);
+ ACCOUNT_SLOGD("id = %s", id_buf);
+
*account_id_list = g_slist_append(*account_id_list, tmp_ptr);
return TRUE;
bool is_success = FALSE;
int binding_count = 1;
GSList *account_id_list = NULL;
+ int ret = -1;
+
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
ACCOUNT_RETURN_VAL((package_name != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("package_name is null!"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
- account_query_account_by_package_name(_account_delete_from_db_by_package_name_cb, package_name, (void*)&account_id_list);
+ ret = account_query_account_by_package_name(_account_delete_from_db_by_package_name_cb, package_name, (void*)&account_id_list);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ if(ret != ACCOUNT_ERROR_NONE){
+ return ret;
+ }
/* transaction control required*/
ret_transaction = _account_begin_transaction();
- if (ret_transaction != ACCOUNT_ERROR_NONE) {
+ if( _account_db_err_code() == SQLITE_PERM ){
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ if( ret_transaction == ACCOUNT_ERROR_DATABASE_BUSY ){
+ ACCOUNT_ERROR( "database busy(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }else if (ret_transaction != ACCOUNT_ERROR_NONE) {
ACCOUNT_ERROR("account_delete:_account_begin_transaction fail %d\n", ret_transaction);
pthread_mutex_unlock(&account_mutex);
return ret_transaction;
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ _account_end_transaction(FALSE);
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
ACCOUNT_CATCH_ERROR(hstmt != NULL, {}, ACCOUNT_ERROR_DB_FAILED,
("_account_svc_query_prepare(%s) failed(%s).\n", query, _account_db_err_msg()));
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
/* delete capability table */
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
/* delete account table */
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found. package_name=%s, rc=%d\n", package_name, rc));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
is_success = TRUE;
hstmt = NULL;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
ret_transaction = _account_end_transaction(is_success);
if (ret_transaction != ACCOUNT_ERROR_NONE) {
- ACCOUNT_ERROR("account_svc_delete:_account_svc_end_transaction fail %d, is_success=%d\n", ret_transaction, is_success);
+ ACCOUNT_ERROR("account_delete:_account_end_transaction fail %d, is_success=%d\n", ret_transaction, is_success);
} else {
if (is_success == true) {
GSList* iter;
for (iter = account_id_list; iter != NULL; iter = g_slist_next(iter)) {
char* p_tmpid = NULL;
p_tmpid = (char*)iter->data;
- char buf[64]={0,};
+ char buf[64]={0,};
ACCOUNT_SNPRINTF(buf, sizeof(buf), "%s:%s", ACCOUNT_NOTI_NAME_DELETE, p_tmpid);
- ACCOUNT_VERBOSE("%s", buf);
- _account_insert_delete_update_notification_send(buf);
+ ACCOUNT_SLOGD("%s", buf);
+ _account_insert_delete_update_notification_send(buf);
_ACCOUNT_FREE(p_tmpid);
}
g_slist_free(account_id_list);
pthread_mutex_unlock(&account_mutex);
- return error_code;
-}
+ return error_code;
+}
+
+ACCOUNT_API int account_get_total_count_from_db(int *count)
+{
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
-ACCOUNT_API int account_get_total_count_from_db(int *count)
-{
if (!count) {
- ACCOUNT_ERROR("(%s)-(%d) count is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) count is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
+
+ if(!g_hAccountDB){
+ ACCOUNT_ERROR("DB is not opened\n");
+ return ACCOUNT_ERROR_DB_NOT_OPENED;
+ }
+
char query[1024] = {0, };
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "select count(*) from %s", ACCOUNT_TABLE);
*count = _account_get_record_count(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
int rc = -1;
int ncount = 0;
account_stmt pStmt = NULL;
- assert(NULL != g_hAccountDB);
rc = sqlite3_prepare_v2(g_hAccountDB, query, strlen(query), &pStmt, NULL);
+ if (SQLITE_OK != rc) {
+ ACCOUNT_SLOGE("sqlite3_prepare_v2() failed(%d, %s).", rc, _account_db_err_msg());
+ sqlite3_finalize(pStmt);
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
rc = sqlite3_step(pStmt);
if (SQLITE_ROW != rc) {
*count = ncount;
- ACCOUNT_VERBOSE("Number of account : %d", ncount);
sqlite3_finalize(pStmt);
if (ncount < 0) {
ACCOUNT_RETURN_VAL((data != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("Account handle is null!"));
- ACCOUNT_INFO("destroy handle=%p\n", data);
-
_account_free_account_items(data);
_ACCOUNT_FREE(data);
ACCOUNT_API int account_type_create(account_type_h *account_type)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account type handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_MEMSET(data, 0, sizeof(account_type_s));
- ACCOUNT_VERBOSE("create handle=%p\n", *account_type);
-
*account_type = (account_type_h)data;
return ACCOUNT_ERROR_NONE;
ACCOUNT_RETURN_VAL((data != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("Account type handle is null!"));
- ACCOUNT_VERBOSE("destroy handle=%p\n", data);
-
_account_type_free_account_type_items(data);
_ACCOUNT_FREE(data);
ACCOUNT_API int account_type_set_app_id(account_type_h account_type, const char *app_id)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account_type handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account_type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!app_id) {
- ACCOUNT_ERROR("(%s)-(%d) app_id is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) app_id is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
_ACCOUNT_FREE(data->app_id);
data->app_id = _account_get_text(app_id);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->app_id, app_id);
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_type_set_service_provider_id(account_type_h account_type, const char *service_provider_id)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account_type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!service_provider_id) {
- ACCOUNT_ERROR("(%s)-(%d) service_provider_id is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
_ACCOUNT_FREE(data->service_provider_id);
data->service_provider_id = _account_get_text(service_provider_id);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->service_provider_id, service_provider_id);
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_type_set_icon_path(account_type_h account_type, const char *icon_path)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account_type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!icon_path) {
- ACCOUNT_ERROR("(%s)-(%d) icon_path is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
_ACCOUNT_FREE(data->icon_path);
data->icon_path = _account_get_text(icon_path);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->icon_path, icon_path);
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_type_set_small_icon_path(account_type_h account_type, const char *small_icon_path)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account_type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!small_icon_path) {
- ACCOUNT_ERROR("(%s)-(%d) small_icon_path is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
_ACCOUNT_FREE(data->small_icon_path);
data->small_icon_path = _account_get_text(small_icon_path);
- ACCOUNT_VERBOSE("(%s)-(%d) %s, %s\n", __FUNCTION__, __LINE__ , data->small_icon_path, small_icon_path);
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_type_set_label(account_type_h account_type, const char* label, const char* locale)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account_type handle is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("(%s)-(%d) account_type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if(!label || !locale) {
- ACCOUNT_ERROR("(%s)-(%d) label(%p) or locale(%p) is NULL.\n", __FUNCTION__, __LINE__, label, locale);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
label_s *label_data = (label_s*)malloc(sizeof(label_s));
if (label_data == NULL) {
- ACCOUNT_FATAL("(%s)-(%d) Malloc fail. label_data is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
ACCOUNT_MEMSET(label_data, 0, sizeof(label_s));
ACCOUNT_API int account_type_get_app_id(account_type_h account_type, char **app_id)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!app_id) {
- ACCOUNT_ERROR("(%s)-(%d) app id is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_type_get_service_provider_id(account_type_h account_type, char **service_provider_id)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!service_provider_id) {
- ACCOUNT_ERROR("(%s)-(%d) service provider id is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_type_get_icon_path(account_type_h account_type, char **icon_path)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!icon_path) {
- ACCOUNT_ERROR("(%s)-(%d) icon path is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_type_get_small_icon_path(account_type_h account_type, char **small_icon_path)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!small_icon_path) {
- ACCOUNT_ERROR("(%s)-(%d) icon path is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
ACCOUNT_API int account_type_get_multiple_account_support(account_type_h account_type, int *multiple_account_support)
{
if (!account_type) {
- ACCOUNT_ERROR("(%s)-(%d) account_type handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!multiple_account_support) {
- ACCOUNT_ERROR("(%s)-(%d) multiple_account_support is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
label_data = (label_s*)iter->data;
- ACCOUNT_VERBOSE("account_type_get_label :: app_id=%s, label=%s, locale=%s", label_data->app_id, label_data->label, label_data->locale);
-
*label = NULL;
if(!strcmp(locale, label_data->locale)) {
*label = _account_get_text(label_data->label);
return ACCOUNT_ERROR_NONE;
}
+ gchar** tokens = g_strsplit(locale, "-", 2);
+ if(tokens != NULL) {
+ if((char*)(tokens[1]) != NULL) {
+ char* upper_token = g_ascii_strup(tokens[1], strlen(tokens[1]));
+ if(upper_token != NULL) {
+ char* converted_locale = g_strdup_printf("%s_%s", tokens[0], upper_token);
+ if(!strcmp(converted_locale, label_data->locale)) {
+ _ACCOUNT_FREE(converted_locale);
+ _ACCOUNT_FREE(upper_token);
+ g_strfreev(tokens);
+ *label = _account_get_text(label_data->label);
+ return ACCOUNT_ERROR_NONE;
+ }
+ _ACCOUNT_FREE(converted_locale);
+ }
+ _ACCOUNT_FREE(upper_token);
+ }
+ }
+ g_strfreev(tokens);
}
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
-ACCOUNT_API int account_type_get_label(account_type_h account_type, account_label_cb cb_func, void *user_data)
+ACCOUNT_API int account_type_get_label(account_type_h account_type, account_label_cb callback, void *user_data)
{
ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
GSList *iter;
account_type_s *data = (account_type_s*)account_type;
label_data = (label_s*)iter->data;
- ACCOUNT_VERBOSE("account_type_get_label :: app_id=%s, label=%s, locale=%s", label_data->app_id, label_data->label, label_data->locale);
-
- //cb_func(label_data->app_id, label_data->label, label_data->locale, user_data);
- if(cb_func(label_data->app_id, label_data->label, label_data->locale, user_data)!=TRUE) {
+ if(callback(label_data->app_id, label_data->label, label_data->locale, user_data)!=TRUE) {
ACCOUNT_DEBUG("Callback func returs FALSE, its iteration is stopped!!!!\n");
return ACCOUNT_ERROR_NONE;
}
count = _account_get_record_count(query);
if (count > 0) {
- ACCOUNT_VERBOSE("_account_type_check_duplicated : duplicated %d account type(s) exist!, app_id=%s, service_provider_id=%s\n",
- count, data->app_id, data->service_provider_id);
return TRUE;
}
/* check mandatory field */
// app id & service provider id
if (!account_type->app_id) {
- ACCOUNT_ERROR("App id is mandetory field, it can not be NULL!!!!\n");
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
"(?, ?, ?, ?, ?)", ACCOUNT_TYPE_TABLE);
hstmt = _account_prepare_query(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ } else if( _account_db_err_code() == SQLITE_BUSY ){
+ ACCOUNT_ERROR( "Database Busy(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }
+
ACCOUNT_RETURN_VAL((hstmt != NULL), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_prepare_query() failed(%s).\n", _account_db_err_msg()));
_account_type_convert_account_to_sql(account_type, hstmt, query);
rc = _account_query_step(hstmt);
- if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ if (rc == SQLITE_BUSY) {
+ ACCOUNT_ERROR( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ error_code = ACCOUNT_ERROR_DATABASE_BUSY;
+ } else if (rc != SQLITE_DONE) {
+ ACCOUNT_ERROR( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
error_code = ACCOUNT_ERROR_DB_FAILED;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
return error_code;
rc = _account_get_record_count(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (rc <= 0) {
- ACCOUNT_ERROR( "_account_insert_label : related account item is not existed rc=%d , %s", rc, _account_db_err_msg());
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
GSList *iter;
for (iter = account_type->label_list; iter != NULL; iter = g_slist_next(iter)) {
- int rc, ret;
+ int ret;
count = 1;
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "INSERT INTO %s(AppId, Label, Locale) VALUES "
label_s* label_data = NULL;
label_data = (label_s*)iter->data;
- ACCOUNT_VERBOSE( "label_data->appid = %s, label_data->label = %s, label_data->locale \n", label_data->app_id, label_data->label, label_data->locale);
ret = _account_query_bind_text(hstmt, count++, account_type->app_id);
ACCOUNT_RETURN_VAL((ret == ACCOUNT_ERROR_NONE), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("Text binding fail"));
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
break;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
- ACCOUNT_VERBOSE( "_account_type_insert_label() DONE\n");
-
return ACCOUNT_ERROR_NONE;
}
static void _account_type_convert_column_to_provider_feature(account_stmt hstmt, provider_feature_s *feature_record)
{
- char *textbuf = NULL;
+ const char *textbuf = NULL;
textbuf = _account_query_table_column_text(hstmt, PROVIDER_FEATURE_FIELD_APP_ID);
_account_db_data_to_text(textbuf, &(feature_record->app_id));
textbuf = _account_query_table_column_text(hstmt, PROVIDER_FEATURE_FIELD_KEY);
_account_db_data_to_text(textbuf, &(feature_record->key));
- ACCOUNT_VERBOSE("END _account_type_convert_column_to_provider_feature");
}
-ACCOUNT_API int account_type_query_provider_feature_by_app_id(provider_feature_cb cb_func, const char* app_id, void *user_data )
+ACCOUNT_API int account_type_query_provider_feature_by_app_id(provider_feature_cb callback, const char* app_id, void *user_data )
{
int error_code = ACCOUNT_ERROR_NONE;
account_stmt hstmt = NULL;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0, binding_count = 1;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((app_id != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("APP ID IS NULL"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
- ACCOUNT_VERBOSE("app_id = %s", app_id);
-
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE app_id = ?", PROVIDER_FEATURE_TABLE);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
_account_query_bind_text(hstmt, binding_count++, app_id);
rc = _account_query_step(hstmt);
_account_type_convert_column_to_provider_feature(hstmt, feature_record);
- cb_ret = cb_func(feature_record->app_id, feature_record->key, user_data);
+ cb_ret = callback(feature_record->app_id, feature_record->key, user_data);
_account_type_free_feature_items(feature_record);
_ACCOUNT_FREE(feature_record);
rc = _account_query_step(hstmt);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
error_code = ACCOUNT_ERROR_NONE;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int record_count = 0;
- ACCOUNT_RETURN_VAL((app_id != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("APP ID IS NULL"));
- ACCOUNT_RETURN_VAL((capability != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CAPABILITY"));
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
+ if (app_id == NULL || capability == NULL) {
+ set_last_result(ACCOUNT_ERROR_INVALID_PARAMETER);
+ return ACCOUNT_ERROR_INVALID_PARAMETER;
+ }
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT COUNT(*) FROM %s where app_id='%s' and key='%s'", PROVIDER_FEATURE_TABLE, app_id, capability);
record_count = _account_get_record_count(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ set_last_result(ACCOUNT_ERROR_PERMISSION_DENIED);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (record_count <= 0) {
- ACCOUNT_WARNING( "related capability type item is not existed rc=%d , %s", record_count, _account_db_err_msg());
+ set_last_result(ACCOUNT_ERROR_RECORD_NOT_FOUND);
return FALSE;
}
+ set_last_result(ACCOUNT_ERROR_NONE);
return TRUE;
}
-ACCOUNT_API int account_type_get_provider_feature_all(account_type_h account_type, provider_feature_cb cb_func, void* user_data)
+ACCOUNT_API int account_type_get_provider_feature_all(account_type_h account_type, provider_feature_cb callback, void* user_data)
{
ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
GSList *iter;
account_type_s *data = (account_type_s*)account_type;
feature_data = (provider_feature_s*)iter->data;
- ACCOUNT_VERBOSE("appid = %s, key = %s", feature_data->key, feature_data->app_id);
-
- //cb_func(feature_data->app_id, feature_data->key, user_data);
- if(cb_func(feature_data->app_id, feature_data->key, user_data)!=TRUE) {
+ if(callback(feature_data->app_id, feature_data->key, user_data)!=TRUE) {
ACCOUNT_DEBUG("Callback func returs FALSE, its iteration is stopped!!!!\n");
return ACCOUNT_ERROR_NONE;
}
rc = _account_get_record_count(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (rc <= 0) {
- ACCOUNT_WARNING( "related account type item is not existed rc=%d , %s", rc, _account_db_err_msg());
+ ACCOUNT_SLOGI( "related account type item is not existed rc=%d , %s", rc, _account_db_err_msg());
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
GSList *iter;
for (iter = account_type->provider_feature_list; iter != NULL; iter = g_slist_next(iter)) {
- int rc, ret;
+ int ret;
count = 1;
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "INSERT INTO %s(app_id, key) VALUES "
provider_feature_s* feature_data = NULL;
feature_data = (provider_feature_s*)iter->data;
- ACCOUNT_VERBOSE("key = %s, app_id = %s \n", feature_data->key, app_id);
ret = _account_query_bind_text(hstmt, count++, app_id);
ACCOUNT_RETURN_VAL((ret == ACCOUNT_ERROR_NONE), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("Text binding fail"));
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
break;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
- ACCOUNT_VERBOSE( "_account_type_insert_provider_feature() DONE\n");
-
return ACCOUNT_ERROR_NONE;
}
{
int error_code = ACCOUNT_ERROR_NONE, ret_transaction = 0;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT TYPE HANDLE IS NULL"));
ACCOUNT_RETURN_VAL((account_type_id != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT TYPE ID POINTER IS NULL"));
/* transaction control required*/
ret_transaction = _account_begin_transaction();
- if (ret_transaction != ACCOUNT_ERROR_NONE) {
+ if( _account_db_err_code() == SQLITE_PERM ){
+ pthread_mutex_unlock(&account_mutex);
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ if( ret_transaction == ACCOUNT_ERROR_DATABASE_BUSY ){
+ ACCOUNT_ERROR( "database busy(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ } else if (ret_transaction != ACCOUNT_ERROR_NONE) {
ACCOUNT_ERROR("_account_begin_transaction fail %d\n", ret_transaction);
pthread_mutex_unlock(&account_mutex);
return ret_transaction;
}
}
- ACCOUNT_INFO( "_account_type_execute_insert_query, insert error_code : %d", error_code);
-
error_code = _account_type_insert_provider_feature(data, data->app_id);
if(error_code != ACCOUNT_ERROR_NONE) {
ret_transaction = _account_end_transaction(FALSE);
}
ret_transaction = _account_end_transaction(TRUE);
- ACCOUNT_DEBUG("Insert success(%x), commit insert query(%x)!!!!\n", error_code, ret_transaction);
pthread_mutex_unlock(&account_mutex);
ACCOUNT_SNPRINTF(query, sizeof(query), "DELETE FROM %s WHERE app_id=? ", PROVIDER_FEATURE_TABLE);
hstmt = _account_prepare_query(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
count = 1;
_account_query_bind_text(hstmt, count++, app_id);
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
return ACCOUNT_ERROR_DB_FAILED;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
GSList *iter;
for (iter = account_type->provider_feature_list; iter != NULL; iter = g_slist_next(iter)) {
- int rc, ret;
+ int ret;
count = 1;
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "INSERT INTO %s(app_id, key) VALUES "
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
break;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
- ACCOUNT_VERBOSE( "_account_type_update_label() DONE\n");
-
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
if (g_slist_length( account_type->label_list)==0) {
- ACCOUNT_ERROR( "_account_type_update_label, no label\n");
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_SNPRINTF(query, sizeof(query), "DELETE FROM %s WHERE AppId=? ", LABEL_TABLE);
hstmt = _account_prepare_query(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
count = 1;
_account_query_bind_text(hstmt, count++, app_id);
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
return ACCOUNT_ERROR_DB_FAILED;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
GSList *iter;
for (iter = account_type->label_list; iter != NULL; iter = g_slist_next(iter)) {
- int rc, ret;
+ int ret;
count = 1;
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "INSERT INTO %s(AppId, Label, Locale) VALUES "
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
break;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
- ACCOUNT_VERBOSE( "_account_type_update_label() DONE\n");
-
return ACCOUNT_ERROR_NONE;
}
"SmallIconPath=?, MultipleAccountSupport=? WHERE AppId=? ", ACCOUNT_TYPE_TABLE);
hstmt = _account_prepare_query(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ } else if (_account_db_err_code() == SQLITE_BUSY){
+ ACCOUNT_ERROR( "database busy(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }
+
ACCOUNT_RETURN_VAL((hstmt != NULL), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_svc_query_prepare() failed(%s).\n", _account_db_err_msg()));
binding_count = _account_type_convert_account_to_sql(account_type, hstmt, query);
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "account_db_query_step() failed(%d, %s)", rc, _account_db_err_msg());
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
/*update label*/
ACCOUNT_API int account_type_update_to_db_by_app_id(account_type_h account_type, const char* app_id)
{
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("DATA IS NULL"));
ACCOUNT_RETURN_VAL((app_id != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("APP ID IS NULL"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
int binding_count = 1;
bool is_success = FALSE;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_RETURN_VAL((app_id != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("The database isn't connected."));
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT COUNT(*) FROM %s WHERE AppId = '%s'", ACCOUNT_TYPE_TABLE, app_id);
count = _account_get_record_count(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (count <= 0) {
- ACCOUNT_ERROR("app id(%s) is not exist. count(%d)\n", app_id, count);
+ ACCOUNT_SLOGE("app id(%s) is not exist. count(%d)\n", app_id, count);
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
/* transaction control required*/
ret_transaction = _account_begin_transaction();
- if (ret_transaction != ACCOUNT_ERROR_NONE) {
- ACCOUNT_FATAL("account_delete:_account_begin_transaction fail %d\n", ret_transaction);
+ if( ret_transaction == ACCOUNT_ERROR_DATABASE_BUSY ){
+ ACCOUNT_ERROR( "database busy(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }else if (ret_transaction != ACCOUNT_ERROR_NONE) {
+ ACCOUNT_ERROR("account_delete:_account_begin_transaction fail %d\n", ret_transaction);
pthread_mutex_unlock(&account_mutex);
return ret_transaction;
}
ACCOUNT_SNPRINTF(query, sizeof(query), "DELETE FROM %s WHERE AppId = ?", LABEL_TABLE);
hstmt = _account_prepare_query(query);
+
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
ACCOUNT_CATCH_ERROR(hstmt != NULL, {}, ACCOUNT_ERROR_DB_FAILED,
("_account_svc_query_prepare(%s) failed(%s).\n", query, _account_db_err_msg()));
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
binding_count = 1;
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found. AppId=%s, rc=%d\n", app_id, rc));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
is_success = TRUE;
hstmt = NULL;
rc = _account_query_step(hstmt);
ACCOUNT_CATCH_ERROR(rc == SQLITE_DONE, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found. AppId=%s, rc=%d\n", app_id, rc));
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
is_success = TRUE;
hstmt = NULL;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
ret_transaction = _account_end_transaction(is_success);
if (ret_transaction != ACCOUNT_ERROR_NONE) {
- ACCOUNT_FATAL("account_svc_delete:_account_svc_end_transaction fail %d, is_success=%d\n", ret_transaction, is_success);
+ ACCOUNT_ERROR("account_svc_delete:_account_svc_end_transaction fail %d, is_success=%d\n", ret_transaction, is_success);
}
pthread_mutex_unlock(&account_mutex);
static void _account_type_convert_column_to_account_type(account_stmt hstmt, account_type_s *account_type_record)
{
- char *textbuf = NULL;
+ const char *textbuf = NULL;
account_type_record->id = _account_query_table_column_int(hstmt, ACCOUNT_TYPE_FIELD_ID);
account_type_record->multiple_account_support = _account_query_table_column_int(hstmt, ACCOUNT_TYPE_FIELD_MULTIPLE_ACCOUNT_SUPPORT);
- ACCOUNT_VERBOSE("END _account_type_convert_column_to_account_type");
}
static void _account_type_convert_column_to_label(account_stmt hstmt, label_s *label_record)
{
- char *textbuf = NULL;
+ const char *textbuf = NULL;
textbuf = _account_query_table_column_text(hstmt, LABEL_FIELD_APP_ID);
_account_db_data_to_text(textbuf, &(label_record->app_id));
textbuf = _account_query_table_column_text(hstmt, LABEL_FIELD_LOCALE);
_account_db_data_to_text(textbuf, &(label_record->locale));
- ACCOUNT_VERBOSE("END _account_type_convert_column_to_label");
}
-ACCOUNT_API int account_type_query_label_by_app_id(account_label_cb cb_func, const char* app_id, void *user_data )
+ACCOUNT_API int account_type_query_label_by_app_id(account_label_cb callback, const char* app_id, void *user_data )
{
int error_code = ACCOUNT_ERROR_NONE;
account_stmt hstmt = NULL;
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0, binding_count = 1;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((app_id != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("APP ID IS NULL"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE AppId = ?", LABEL_TABLE);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
_account_query_bind_text(hstmt, binding_count++, app_id);
rc = _account_query_step(hstmt);
_account_type_convert_column_to_label(hstmt, label_record);
- cb_ret = cb_func(label_record->app_id, label_record->label , label_record->locale, user_data);
+ cb_ret = callback(label_record->app_id, label_record->label , label_record->locale, user_data);
_account_type_free_label_items(label_record);
_ACCOUNT_FREE(label_record);
rc = _account_query_step(hstmt);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
error_code = ACCOUNT_ERROR_NONE;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
int _account_type_label_get_app_id(label_h label, char **app_id)
{
if (!label) {
- ACCOUNT_ERROR("(%s)-(%d) label handle is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
if (!app_id) {
- ACCOUNT_ERROR("(%s)-(%d) app_id is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
data->label_list = g_slist_append(data->label_list, (gpointer)label_data);
- ACCOUNT_VERBOSE("_account_get_label_text_cb :: appid=%s, label=%s\n", label_data->app_id, label_data->label);
-
return TRUE;
}
data->provider_feature_list = g_slist_append(data->provider_feature_list, (gpointer)feature_data);
- ACCOUNT_VERBOSE("appid=%s, key=%s\n", feature_data->app_id, feature_data->key);
-
return TRUE;
}
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0, binding_count = 1;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((app_id != 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("APP ID IS NULL"));
ACCOUNT_RETURN_VAL((*account_type != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT TYPE IS NULL"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
- ACCOUNT_DEBUG("app id (%s)\n", app_id);
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE AppId = ?", ACCOUNT_TYPE_TABLE);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
_account_query_bind_text(hstmt, binding_count++, app_id);
rc = _account_query_step(hstmt);
while (rc == SQLITE_ROW) {
_account_type_convert_column_to_account_type(hstmt, account_type_record);
- ACCOUNT_DEBUG("get account info by id %p\n", account_type_record);
rc = _account_query_step(hstmt);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
account_type_query_label_by_app_id(_account_get_label_text_cb, app_id, (void*)account_type_record);
account_type_query_provider_feature_by_app_id(_account_get_provider_feature_cb, app_id,(void*)account_type_record);
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((app_id != 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("APP ID IS NULL"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
- ACCOUNT_DEBUG("app id (%s)\n", app_id);
-
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT COUNT(*) FROM %s WHERE AppId = '%s'", ACCOUNT_TYPE_TABLE, app_id);
rc = _account_get_record_count(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (rc <= 0) {
- ACCOUNT_DEBUG("(%s) not exist in account type db");
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
return ACCOUNT_ERROR_NONE;
}
-ACCOUNT_API int account_type_query_by_provider_feature(account_type_cb cb_func, const char* key, void* user_data)
+ACCOUNT_API int account_type_query_by_provider_feature(account_type_cb callback, const char* key, void* user_data)
{
int error_code = ACCOUNT_ERROR_NONE;
account_stmt hstmt = NULL;
int rc = 0;
GList *account_type_list = NULL;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((key != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("capability_type IS NULL"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("CALL BACK IS NULL"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("CALL BACK IS NULL"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
int binding_count = 1;
- _account_query_bind_text(hstmt, binding_count++, (char*)key);
+ _account_query_bind_text(hstmt, binding_count++, key);
rc = _account_query_step(hstmt);
k++;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {_account_type_glist_free(account_type_list);}, rc, ("finalize error"));
hstmt = NULL;
GList* iter;
account_type_query_label_by_app_id(_account_get_label_text_cb,account_type->app_id,(void*)account_type);
account_type_query_provider_feature_by_app_id(_account_get_provider_feature_cb, account_type->app_id,(void*)account_type);
//cb_func((account_type_h)account_type, user_data);
- ACCOUNT_CATCH_ERROR(cb_func((account_type_h)account_type, user_data) == TRUE, {}, ACCOUNT_ERROR_NONE, ("Callback func returs FALSE, its iteration is stopped!!!!\n"));
+ ACCOUNT_CATCH_ERROR(callback((account_type_h)account_type, user_data) == TRUE, {}, ACCOUNT_ERROR_NONE, ("Callback func returs FALSE, its iteration is stopped!!!!\n"));
k++;
}
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
if (account_type_list) {
int rc = 0;
GList *account_type_list = NULL;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT INFO IS NULL"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
rc = _account_query_step(hstmt);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
account_type_s *account_type_record = NULL;
ACCOUNT_CATCH_ERROR(rc == SQLITE_ROW, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
k++;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {_account_type_glist_free(account_type_list);}, rc, ("finalize error"));
hstmt = NULL;
GList* iter;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
if (account_type_list) {
char query[ACCOUNT_SQL_LEN_MAX] = {0, };
int rc = 0, binding_count = 1;
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+ char* converted_locale = NULL;
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((app_id != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO APP ID"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_RETURN_VAL((label != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("label char is null"));
+ ACCOUNT_RETURN_VAL((locale != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("locale char is null"));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
- ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE AppId = ? AND Locale = '%s' ", LABEL_TABLE, locale);
+ converted_locale = _account_get_text(locale);
+ gchar** tokens = g_strsplit(converted_locale, "-", 2);
+
+ if(tokens != NULL) {
+ if((char*)(tokens[1]) != NULL) {
+ char* upper_token = g_ascii_strup(tokens[1], strlen(tokens[1]));
+ if(upper_token != NULL) {
+ _ACCOUNT_FREE(converted_locale);
+ converted_locale = g_strdup_printf("%s_%s", tokens[0], upper_token);
+ }
+ _ACCOUNT_FREE(upper_token);
+ }
+ }
+ g_strfreev(tokens);
+
+ ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE AppId = ? AND Locale = '%s' ", LABEL_TABLE, converted_locale);
+ _ACCOUNT_FREE(converted_locale);
+
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
_account_query_bind_text(hstmt, binding_count++, app_id);
rc = _account_query_step(hstmt);
_account_type_convert_column_to_label(hstmt,label_record);
+ _ACCOUNT_FREE(*label);
*label = _account_get_text(label_record->label);
_account_type_free_label_items(label_record);
rc = _account_query_step(hstmt);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
error_code = ACCOUNT_ERROR_NONE;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
if (g_slist_length( account->custom_list)==0) {
- ACCOUNT_ERROR( "_account_insert_custom, no custom data\n");
+ ACCOUNT_DEBUG( "_account_insert_custom, no custom data\n");
return ACCOUNT_ERROR_NONE;
}
rc = _account_get_record_count(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%d, %s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
if (rc <= 0) {
- ACCOUNT_ERROR( "_account_insert_custom : related account item is not existed rc=%d , %s", rc, _account_db_err_msg());
+ ACCOUNT_SLOGE( "_account_insert_custom : related account item is not existed rc=%d , %s", rc, _account_db_err_msg());
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
GSList *iter;
for (iter = account->custom_list; iter != NULL; iter = g_slist_next(iter)) {
- int rc, ret;
+ int ret;
count = 1;
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "INSERT INTO %s (AccountId, AppId, Key, Value) VALUES "
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
ACCOUNT_RETURN_VAL((hstmt != NULL), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_prepare_query() failed(%s).\n", _account_db_err_msg()));
account_custom_s* custom_data = NULL;
custom_data = (account_custom_s*)iter->data;
- ACCOUNT_VERBOSE( "account_custom_s->key = %s, account_custom_s->value = %s \n", custom_data->key, custom_data->value);
ret = _account_query_bind_int(hstmt, count++, account_id);
ACCOUNT_RETURN_VAL((ret == ACCOUNT_ERROR_NONE), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("Int binding fail"));
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
break;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
- ACCOUNT_VERBOSE( "_account_insert_custom() DONE\n");
-
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_RETURN_VAL((account != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT HANDLE IS NULL"));
- ACCOUNT_INFO( "account handle=%p, account_id=%d", account, account_id);
-
if (g_slist_length( account->custom_list)==0) {
- ACCOUNT_ERROR( "_account_update_custom, no custom data\n");
+ ACCOUNT_DEBUG( "_account_update_custom, no custom data\n");
return ACCOUNT_ERROR_NONE;
}
rc = _account_get_record_count(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ } else if( _account_db_err_code() == SQLITE_BUSY ){
+ ACCOUNT_ERROR( "database busy(%s)", _account_db_err_msg());
+ pthread_mutex_unlock(&account_mutex);
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ }
+
if (rc <= 0) {
- ACCOUNT_ERROR( "_account_update_custom : related account item is not existed rc=%d , %s", rc, _account_db_err_msg());
+ ACCOUNT_SLOGE( "_account_update_custom : related account item is not existed rc=%d , %s", rc, _account_db_err_msg());
return ACCOUNT_ERROR_RECORD_NOT_FOUND;
}
_account_query_bind_int(hstmt, count++, (int)account_id);
rc = _account_query_step(hstmt);
- if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ if (rc == SQLITE_BUSY) {
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ return ACCOUNT_ERROR_DATABASE_BUSY;
+ } else if (rc != SQLITE_DONE) {
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
return ACCOUNT_ERROR_DB_FAILED;
}
- _account_query_finalize(hstmt);
+
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
GSList *iter;
for (iter = account->custom_list; iter != NULL; iter = g_slist_next(iter)) {
- int rc, ret;
+ int ret;
count = 1;
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
ACCOUNT_SNPRINTF(query, sizeof(query), "INSERT INTO %s(AccountId, AppId, Key, Value) VALUES "
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
ACCOUNT_RETURN_VAL((hstmt != NULL), {}, ACCOUNT_ERROR_DB_FAILED, ("_account_prepare_query() failed(%s).\n", _account_db_err_msg()));
account_custom_s* custom_data = NULL;
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
- ACCOUNT_FATAL( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
+ ACCOUNT_ERROR( "_account_query_step() failed(%d, %s)", rc, _account_db_err_msg());
break;
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
- ACCOUNT_VERBOSE( "_account_update_custom() DONE\n");
-
return ACCOUNT_ERROR_NONE;
}
-static int _account_query_custom_by_account_id(account_custom_cb cb_func, int account_id, void *user_data )
+static int _account_query_custom_by_account_id(account_custom_cb callback, int account_id, void *user_data )
{
int error_code = ACCOUNT_ERROR_NONE;
account_stmt hstmt = NULL;
int rc = 0;
ACCOUNT_RETURN_VAL((account_id > 0), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("ACCOUNT INDEX IS LESS THAN 0"));
- ACCOUNT_RETURN_VAL((cb_func != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
+ ACCOUNT_RETURN_VAL((callback != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("NO CALLBACK FUNCTION"));
ACCOUNT_RETURN_VAL((g_hAccountDB != NULL), {}, ACCOUNT_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
ACCOUNT_MEMSET(query, 0x00, ACCOUNT_SQL_LEN_MAX);
ACCOUNT_SNPRINTF(query, sizeof(query), "SELECT * FROM %s WHERE AccountId = %d", ACCOUNT_CUSTOM_TABLE, account_id);
hstmt = _account_prepare_query(query);
+ if( _account_db_err_code() == SQLITE_PERM ){
+ ACCOUNT_ERROR( "Access failed(%s)", _account_db_err_msg());
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
rc = _account_query_step(hstmt);
+
ACCOUNT_CATCH_ERROR(rc == SQLITE_ROW, {}, ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
account_custom_s* custom_record = NULL;
_account_convert_column_to_custom(hstmt, custom_record);
- cb_ret = cb_func(custom_record->key, custom_record->value, user_data);
+ cb_ret = callback(custom_record->key, custom_record->value, user_data);
_account_custom_item_free(custom_record);
_ACCOUNT_FREE(custom_record);
rc = _account_query_step(hstmt);
}
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
error_code = ACCOUNT_ERROR_NONE;
CATCH:
if (hstmt != NULL) {
- _account_query_finalize(hstmt);
+ rc = _account_query_finalize(hstmt);
+ ACCOUNT_RETURN_VAL((rc == ACCOUNT_ERROR_NONE), {}, rc, ("finalize error"));
hstmt = NULL;
}
char event_msg[256] ={0, };
int account_id = -1;
- ACCOUNT_DEBUG("START\n");
-
if(!key) {
ACCOUNT_ERROR("No subscribtion msg !!!!!\n");
return;
if(!memcmp(vconf_keynode_get_name(key), VCONFKEY_ACCOUNT_MSG_STR, strlen(VCONFKEY_ACCOUNT_MSG_STR)))
{
vconf_key = vconf_keynode_get_str(key);
+
+ if( vconf_key == NULL){
+ ACCOUNT_ERROR("vconf key is NULL.\n");
+ return;
+ }
msg = strdup(vconf_key);
char* event_type = NULL;
event_type = strtok_r(msg, ":", &ptr);
id = strtok_r(NULL, ":", &ptr);
- ACCOUNT_DEBUG("msg(%s), event_type(%s), id(%s)\n", msg, event_type, id);
+ ACCOUNT_SLOGD("msg(%s), event_type(%s), id(%s)", msg, event_type, id);
ACCOUNT_SNPRINTF(event_msg,sizeof(event_msg),"%s", event_type);
_ACCOUNT_FREE(msg);
- ACCOUNT_DEBUG("END\n");
}
ACCOUNT_API int account_subscribe_create(account_subscribe_h* account_subscribe)
{
if (!account_subscribe) {
- ACCOUNT_ERROR("(%s)-(%d) account is NULL.\n", __FUNCTION__, __LINE__);
+ ACCOUNT_SLOGE("account is NULL.\n", __FUNCTION__, __LINE__);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
- ACCOUNT_VERBOSE("create handle=%p\n", *data);
-
*account_subscribe = (account_subscribe_h)data;
return ACCOUNT_ERROR_NONE;
}
-ACCOUNT_API int account_subscribe_notification(account_subscribe_h account_subscribe, account_event_cb cb_func, void* user_data)
+ACCOUNT_API int account_subscribe_notification(account_subscribe_h account_subscribe, account_event_cb callback, void* user_data)
{
- ACCOUNT_DEBUG("START\n");
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
ACCOUNT_RETURN_VAL((account_subscribe != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account subscribe handle is NULL.\n", __FUNCTION__, __LINE__));
account_subscribe_s* tmp =(account_subscribe_s*)account_subscribe;
- tmp->account_subscription_callback = cb_func;
+ tmp->account_subscription_callback = callback;
tmp->user_data = user_data;
- if (vconf_notify_key_changed(VCONFKEY_ACCOUNT_MSG_STR,
+ int ret = -1;
+ ret = vconf_notify_key_changed(VCONFKEY_ACCOUNT_MSG_STR,
(vconf_callback_fn)_account_subscribe_vconf_callback,
- (void*)tmp) != 0) {
- ACCOUNT_FATAL("Vconf Subscription Failed !!!!!\n");
+ (void*)tmp);
+
+ ACCOUNT_SLOGI("vconf_notify_key_changed ret = %d", ret);
+
+ if(ret != VCONF_OK) {
+ ACCOUNT_ERROR("Vconf Subscription Failed ret = %d", ret);
return ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL;
}
- ACCOUNT_DEBUG("Vconf Subscription Success!!!!\n");
return ACCOUNT_ERROR_NONE;
}
ACCOUNT_API int account_unsubscribe_notification(account_subscribe_h account_subscribe)
{
+ int res;
+ int process_uid = getuid();
+ char subject_label[SMACK_LABEL_LEN + 1] = {0,};
+
+ if(process_uid != 0) {
+ int fd = open("/proc/self/attr/current", O_RDONLY);
+ if(fd < 0)
+ {
+ ACCOUNT_ERROR("file open fail :: /proc/self/attr/current");
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = read(fd, subject_label, SMACK_LABEL_LEN);
+ if(res < 0)
+ {
+ ACCOUNT_ERROR("file read fail :: /proc/self/attr/current");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+
+ res = smack_have_access(subject_label, "libaccounts-svc::check_read", "r");
+ if(res != 1) {
+ ACCOUNT_ERROR("Account permission denied :: This API can not be used without account.read privilege");
+ close(fd);
+ return ACCOUNT_ERROR_PERMISSION_DENIED;
+ }
+ close(fd);
+ }
+
ACCOUNT_RETURN_VAL((account_subscribe != NULL), {}, ACCOUNT_ERROR_INVALID_PARAMETER, ("(%s)-(%d) account subscribe handle is NULL.\n", __FUNCTION__, __LINE__));
account_subscribe_s* tmp =(account_subscribe_s*)account_subscribe;
if (vconf_ignore_key_changed(VCONFKEY_ACCOUNT_MSG_STR,
(vconf_callback_fn)_account_subscribe_vconf_callback) != 0) {
- ACCOUNT_FATAL("Vconf Subscription Failed !!!!!\n");
+ ACCOUNT_ERROR("Vconf Subscription Failed !!!!!\n");
return ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL;
}
- ACCOUNT_DEBUG("Vconf Unsubscription Success!!!!\n");
return ACCOUNT_ERROR_NONE;
}
-
#include <stdio.h>
#include "account.h"
+#include "account-private.h"
#include <string.h>
//#include <dbus/dbus.h>
char* test_type = (char*)capability_type;
int test_value = capability_value;
- printf("_capability_get_callback test_type = : %s\n", test_type);
- printf("_capability_get_callback test_value = : %d\n", test_value);
+ ACCOUNT_SLOGD("_capability_get_callback test_type = : %s\n", test_type);
+ ACCOUNT_SLOGD("_capability_get_callback test_value = : %d\n", test_value);
return TRUE;
}
int _account_get_account_info(account_h handle)
{
- printf("_account_get_callback\n");
+ ACCOUNT_SLOGD("_account_get_callback\n");
char *test_text = NULL;
account_get_user_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_display_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_email_address(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_icon_path(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_source(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_package_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_domain_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_access_token(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
int i;
_account_free_text(test_text);
account_get_user_text(handle, i, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
}
int test_int = -1;
account_auth_type_e auth_type;
account_get_auth_type(handle, &auth_type);
- printf("account_get_auth_type : %d\n", auth_type);
+ ACCOUNT_SLOGD("account_get_auth_type : %d\n", auth_type);
account_secrecy_state_e secret;
account_get_secret(handle, &secret);
- printf("account_get_secret : %d\n", secret);
+ ACCOUNT_SLOGD("account_get_secret : %d\n", secret);
account_sync_state_e sync_support;
account_get_sync_support(handle, &sync_support);
- printf("account_get_sync_support : %d\n", sync_support);
+ ACCOUNT_SLOGD("account_get_sync_support : %d\n", sync_support);
for(i=0;i<USER_INT_CNT;i++)
{
test_int = -1;
account_get_user_int(handle, i, &test_int);
- printf("_account_get_callback : %d\n", test_int);
+ ACCOUNT_SLOGD("_account_get_callback : %d\n", test_int);
}
account_get_capability_all(handle, _capability_get_callback, NULL);
bool _account_get_callback(account_h handle, void* user_data)
{
- printf("_account_get_callback\n");
+ ACCOUNT_SLOGD("_account_get_callback\n");
char *test_text = NULL;
account_get_user_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_display_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_email_address(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_icon_path(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_source(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_package_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_domain_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_access_token(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
int i;
_account_free_text(test_text);
account_get_user_text(handle, i, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
}
int test_int = -1;
account_auth_type_e auth_type;
account_get_auth_type(handle, &auth_type);
- printf("account_get_auth_type : %d\n", auth_type);
+ ACCOUNT_SLOGD("account_get_auth_type : %d\n", auth_type);
account_secrecy_state_e secret;
account_get_secret(handle, &secret);
- printf("account_get_secret : %d\n", secret);
+ ACCOUNT_SLOGD("account_get_secret : %d\n", secret);
account_sync_state_e sync_support;
account_get_sync_support(handle, &sync_support);
- printf("account_get_sync_support : %d\n", sync_support);
+ ACCOUNT_SLOGD("account_get_sync_support : %d\n", sync_support);
for(i=0;i<USER_INT_CNT;i++)
{
test_int = -1;
account_get_user_int(handle, i, &test_int);
- printf("_account_get_callback : %d\n", test_int);
+ ACCOUNT_SLOGD("_account_get_callback : %d\n", test_int);
}
account_get_capability_all(handle, _capability_get_callback, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
char temp[128];
memset(temp, 0x00, sizeof(temp));
ret = account_create(&account);
- printf("account_set_user_name: Enter User Name to be set \n");
+ ACCOUNT_SLOGD("account_set_user_name: Enter User Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_display_name: Enter display Name to be set \n");
+ ACCOUNT_SLOGD("account_set_display_name: Enter display Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_domain_name: Enter domain Name to be set \n");
+ ACCOUNT_SLOGD("account_set_domain_name: Enter domain Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_domain_name(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_email_address: Enter email Name to be set \n");
+ ACCOUNT_SLOGD("account_set_email_address: Enter email Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_email_address(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_package_name: Enter package Name to be set \n");
+ ACCOUNT_SLOGD("account_set_package_name: Enter package Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_package_name(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_icon_path: Enter icon path to be set \n");
+ ACCOUNT_SLOGD("account_set_icon_path: Enter icon path to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_icon_path(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_access_token: Enter access token to be set \n");
+ ACCOUNT_SLOGD("account_set_access_token: Enter access token to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_access_token(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_auth_type: Enter auth type to be set \n");
+ ACCOUNT_SLOGD("account_set_auth_type: Enter auth type to be set \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_auth_type( account, temp_int );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
temp_int = -1;
- printf("account_set_secret: Enter secret to be set \n");
+ ACCOUNT_SLOGD("account_set_secret: Enter secret to be set \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_secret( account, temp_int );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
temp_int = -1;
- printf("account_set_sync_support: Enter sync support state \n");
+ ACCOUNT_SLOGD("account_set_sync_support: Enter sync support state \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_sync_support( account, temp_int );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_source: Enter source to be set \n");
+ ACCOUNT_SLOGD("account_set_source: Enter source to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
for(i=0;i<USER_TXT_CNT;i++)
{
memset(temp, 0x00, sizeof(temp));
- printf("account_set_user_text [%d]: Enter user text to be set \n", i);
+ ACCOUNT_SLOGD("account_set_user_text [%d]: Enter user text to be set \n", i);
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_user_text(account, i, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
for(i=0;i<USER_INT_CNT;i++)
{
temp_int = -1;
- printf("account_set_user_int [%d]: Enter user int to be set \n", i);
+ ACCOUNT_SLOGD("account_set_user_int [%d]: Enter user int to be set \n", i);
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_user_int(account, i, temp_int);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
int cap_value = -1;
int want_to_enter_more_cap = 1;
while (want_to_enter_more_cap){
- printf("account_set_capability: Enter capability key to set \n");
+ ACCOUNT_SLOGD("account_set_capability: Enter capability key to set \n");
if (scanf("%d", &cap_key) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
- printf("account_set_capability: Enter capability value to set \n");
+ ACCOUNT_SLOGD("account_set_capability: Enter capability value to set \n");
if (scanf("%d", &cap_value) != 1 ) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL, cap_value);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
- printf("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
+ ACCOUNT_SLOGD("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return -1;
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return account_id;
}
account_h account = NULL;
- printf("account_connect returns %d\n", ret);
+ ACCOUNT_SLOGD("account_connect returns %d\n", ret);
ret = account_create(&account);
- printf("account = %p\n", account);
+ ACCOUNT_SLOGD("account = %p\n", account);
ret = account_set_user_name(account, "wy1115.lee");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "Wonyoung Lee");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung electronics");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "URUSA inc.");
ret = account_set_user_text(account, i, "user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 888);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
return -1;
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
account=NULL;
- printf("account_connect returns %d\n", ret);
+ ACCOUNT_SLOGD("account_connect returns %d\n", ret);
ret = account_create(&account);
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
account=NULL;
- printf("account_connect returns %d\n", ret);
+ ACCOUNT_SLOGD("account_connect returns %d\n", ret);
ret = account_create(&account);
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return account_id;
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_create(&account);
- printf("account_set_user_name: Enter User Name to be set \n");
+ ACCOUNT_SLOGD("account_set_user_name: Enter User Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_display_name: Enter display Name to be set \n");
+ ACCOUNT_SLOGD("account_set_display_name: Enter display Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_domain_name: Enter domain Name to be set \n");
+ ACCOUNT_SLOGD("account_set_domain_name: Enter domain Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_domain_name(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_email_address: Enter email Name to be set \n");
+ ACCOUNT_SLOGD("account_set_email_address: Enter email Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_email_address(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_package_name: Enter package Name to be set \n");
+ ACCOUNT_SLOGD("account_set_package_name: Enter package Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_package_name(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_icon_path: Enter icon path to be set \n");
+ ACCOUNT_SLOGD("account_set_icon_path: Enter icon path to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_icon_path(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_access_token: Enter access token to be set \n");
+ ACCOUNT_SLOGD("account_set_access_token: Enter access token to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_access_token(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_auth_type: Enter auth type to be set \n");
+ ACCOUNT_SLOGD("account_set_auth_type: Enter auth type to be set \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_auth_type( account, temp_int );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
temp_int = -1;
- printf("account_set_secret: Enter secret to be set \n");
+ ACCOUNT_SLOGD("account_set_secret: Enter secret to be set \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_secret( account, temp_int );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
temp_int = -1;
- printf("account_set_sync_support: Enter sync support state \n");
+ ACCOUNT_SLOGD("account_set_sync_support: Enter sync support state \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_sync_support( account, temp_int );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_source: Enter source to be set \n");
+ ACCOUNT_SLOGD("account_set_source: Enter source to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
{
memset(temp, 0x00, sizeof(temp));
- printf("account_set_user_text [%d]: Enter user text to be set \n", i);
+ ACCOUNT_SLOGD("account_set_user_text [%d]: Enter user text to be set \n", i);
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_user_text(account, i, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
for(i=0;i<USER_INT_CNT;i++)
{
temp_int = -1;
- printf("account_set_user_int [%d]: Enter user int to be set \n", i);
+ ACCOUNT_SLOGD("account_set_user_int [%d]: Enter user int to be set \n", i);
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_user_int(account, i, temp_int);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
int cap_value = -1;
int want_to_enter_more_cap = 1;
while (want_to_enter_more_cap){
- printf("account_set_capability: Enter capability key to set \n");
+ ACCOUNT_SLOGD("account_set_capability: Enter capability key to set \n");
if (scanf("%d", &cap_key) != 1 ) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
- printf("account_set_capability: Enter capability value to set \n");
+ ACCOUNT_SLOGD("account_set_capability: Enter capability value to set \n");
if (scanf("%d", &cap_value) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL, cap_value);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
- printf("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
+ ACCOUNT_SLOGD("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_create(&account);
- printf("account_set_user_name: Enter User Name to be set \n");
+ ACCOUNT_SLOGD("account_set_user_name: Enter User Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_display_name: Enter display Name to be set \n");
+ ACCOUNT_SLOGD("account_set_display_name: Enter display Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_domain_name: Enter domain Name to be set \n");
+ ACCOUNT_SLOGD("account_set_domain_name: Enter domain Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_domain_name(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_email_address: Enter email Name to be set \n");
+ ACCOUNT_SLOGD("account_set_email_address: Enter email Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_email_address(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_package_name: Enter package Name to be set \n");
+ ACCOUNT_SLOGD("account_set_package_name: Enter package Name to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_package_name(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_icon_path: Enter icon path to be set \n");
+ ACCOUNT_SLOGD("account_set_icon_path: Enter icon path to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_icon_path(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_access_token: Enter access token to be set \n");
+ ACCOUNT_SLOGD("account_set_access_token: Enter access token to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_access_token(account, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_auth_type: Enter auth type to be set \n");
+ ACCOUNT_SLOGD("account_set_auth_type: Enter auth type to be set \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_auth_type( account, temp_int );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
temp_int = -1;
- printf("account_set_secret: Enter secret to be set \n");
+ ACCOUNT_SLOGD("account_set_secret: Enter secret to be set \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_secret( account, temp_int );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
temp_int = -1;
- printf("account_set_sync_support: Enter sync support state \n");
+ ACCOUNT_SLOGD("account_set_sync_support: Enter sync support state \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_sync_support( account, temp_int );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
memset(temp, 0x00, sizeof(temp));
- printf("account_set_source: Enter source to be set \n");
+ ACCOUNT_SLOGD("account_set_source: Enter source to be set \n");
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
{
memset(temp, 0x00, sizeof(temp));
- printf("account_set_user_text [%d]: Enter user text to be set \n", i);
+ ACCOUNT_SLOGD("account_set_user_text [%d]: Enter user text to be set \n", i);
if (scanf("%s", temp) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_user_text(account, i, temp);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
for(i=0;i<USER_INT_CNT;i++)
{
temp_int = -1;
- printf("account_set_user_int [%d]: Enter user int to be set \n", i);
+ ACCOUNT_SLOGD("account_set_user_int [%d]: Enter user int to be set \n", i);
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
ret = account_set_user_int(account, i, temp_int);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
int cap_value = -1;
int want_to_enter_more_cap = 1;
while (want_to_enter_more_cap){
- printf("account_set_capability: Enter capability key to set \n");
+ ACCOUNT_SLOGD("account_set_capability: Enter capability key to set \n");
if (scanf("%d", &cap_key) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
- printf("account_set_capability: Enter capability value to set \n");
+ ACCOUNT_SLOGD("account_set_capability: Enter capability value to set \n");
if (scanf("%d", &cap_value) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_TIZEN_EMAIL, cap_value);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
- printf("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
+ ACCOUNT_SLOGD("account_set_capability: Want to set more capabilitiy key value then enter 1 else 0 \n");
if (scanf("%d", &temp_int) != 1) {
- printf("scanf Failed !!!! \n");
+ ACCOUNT_SLOGD("scanf Failed !!!! \n");
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-Wonyoung Lee");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "updated-URUSA inc.");
ret = account_set_user_text(account, i, "updated-user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 111);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "usernamed-Wonyoung Lee");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "usernamed-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "usernamed-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "usernamed-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "usernamed-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "usernamed-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%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)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "updated-URUSA inc.");
ret = account_set_user_text(account, i, "usernamed-user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 111);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
return ret;
binding_buf[binding_buf_index++]='(';
- printf("(%d)Binding buf = %s\n", __LINE__,binding_buf);
+ ACCOUNT_SLOGD("(%d)Binding buf = %s\n", __LINE__,binding_buf);
int i;
binding_buf[binding_buf_index++]='?';
if(i != capability_count -1)
binding_buf[binding_buf_index++]=',';
- printf("(%d)Binding buf = %s\n", __LINE__,binding_buf);
+ ACCOUNT_SLOGD("(%d)Binding buf = %s\n", __LINE__,binding_buf);
}
binding_buf[binding_buf_index]=')';
- printf("(%d)Binding buf = %s\n", __LINE__,binding_buf);
+ ACCOUNT_SLOGD("(%d)Binding buf = %s\n", __LINE__,binding_buf);
- printf("Length %d\n", glist_len);
+ ACCOUNT_SLOGD("Length %d\n", glist_len);
for (iter = list; iter != NULL; iter = g_slist_next(iter))
{
char* capa;
capa = (char *)iter->data;
- printf("%s\n", (char *)iter->data);
+ ACCOUNT_SLOGD("%s\n", (char *)iter->data);
g_free(capa);
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "11111111111111111111111111111111111 \
2222222222222222222222222222222222222222222222222 \
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
int i;
ret = account_set_user_text(account, i, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%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)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
int i;
ret = account_set_user_text(account, i, "user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
int i;
ret = account_set_user_text(account, i, "user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 000);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
int i;
ret = account_set_user_text(account, i, "user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 888);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
- printf("account = %p, ret = %d \n", account, ret);
+ ACCOUNT_SLOGD("account = %p, ret = %d \n", account, ret);
ret = account_set_user_name(account, "tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "Samsung");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "tarun.kr@samsung.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "com.samsung.accounts");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "/test/test.jpg");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "xxxx/yyyy/zzzz/-&abc");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
int i;
ret = account_set_user_text(account, i, "user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 888);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_ENABLED);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_POST, ACCOUNT_CAPABILITY_ENABLED);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_insert_to_db(account, &account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p , account_id = %d\n", __LINE__, ret, account, account_id);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return account_id;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, 0);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, -999);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, 555);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_auth_type( account, ACCOUNT_AUTH_TYPE_OAUTH );
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_secret( account, ACCOUNT_SECRECY_INVISIBLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "updated-URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_update_to_db_by_id(account, account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "updated-URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
int i;
ret = account_set_user_text(account, i, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "updated-URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] 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, "updated-user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "updated-URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] 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, "updated-user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, -111);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "updated-URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] 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, "updated-user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 0);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "updated-URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] 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, "updated-user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 111);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "updated-URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] 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, "updated-user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 111);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
account_set_user_name(account, "updated-tarun.kr");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_display_name(account, "updated-tarun kumar");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_domain_name(account, "updated-Samsung Facebook");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_email_address(account, "updated-urusa77@gmail.com");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_package_name(account, "updated-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_icon_path(account, "updated-icon-path");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_access_token(account, "updated-ACCESSTOKEN");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_set_source(account, "updated-URUSA inc.");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] 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, "updated-user txt");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_user_int(account, i, 111);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p, i=%d\n", __LINE__, ret, account, i);
}
}
ret = account_set_capability(account, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT, ACCOUNT_CAPABILITY_ENABLED);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
bool _utc1_account_get_callback(account_h handle, void* user_data)
{
- printf("_account_get_callback handle = %s , user_data = %s \n", (char *)handle, (char *)user_data);
+ ACCOUNT_SLOGD("_account_get_callback handle = %s , user_data = %s \n", (char *)handle, (char *)user_data);
char *test_text = NULL;
account_get_user_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_display_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_email_address(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_icon_path(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_source(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_package_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_domain_name(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
account_get_access_token(handle, &test_text);
- printf("_account_get_callback : %s\n", test_text);
+ ACCOUNT_SLOGD("_account_get_callback : %s\n", test_text);
_account_free_text(test_text);
int i=0, test_int=0;
account_auth_type_e auth_type;
account_get_auth_type(handle, &auth_type);
- printf("account_get_auth_type : %d\n", auth_type);
+ ACCOUNT_SLOGD("account_get_auth_type : %d\n", auth_type);
account_secrecy_state_e secret;
account_get_secret(handle, &secret);
- printf("account_get_secret : %d\n", secret);
+ ACCOUNT_SLOGD("account_get_secret : %d\n", secret);
account_sync_state_e sync_support;
account_get_sync_support(handle, &sync_support);
- printf("account_get_sync_support : %d\n", sync_support);
+ ACCOUNT_SLOGD("account_get_sync_support : %d\n", sync_support);
for(i=0;i<USER_INT_CNT;i++)
{
account_get_user_int(handle, i, &test_int);
- printf("_account_get_callback : %d\n", test_int);
+ ACCOUNT_SLOGD("_account_get_callback : %d\n", test_int);
}
account_get_capability_all(handle, _capability_get_callback, NULL);
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_query_account_by_account_id(account_id, &account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
_account_get_account_info(account);
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_create(&account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_query_account_by_account_id(account_id, &account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_destroy(account);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_account_by_user_name(_account_get_callback, "usernamed-wy1115", NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
char *user_data = "test user_data";
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_ENABLED, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_DISABLED, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, -1, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, ACCOUNT_CAPABILITY_DISABLED, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, -1, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, account=%p\n", __LINE__, ret, account);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, account=%p\n", __LINE__, ret, account);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_foreach_account_from_db(_account_get_callback, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
char *user_data = "test user_data";
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d \n", __LINE__, ret);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
char* test_type = (char*)capability_type;
int test_value = capability_value;
- printf("_capability_get_callback test_type = : %s\n", test_type);
- printf("_capability_get_callback test_value = : %d\n", test_value);
+ ACCOUNT_SLOGD("_capability_get_callback test_type = : %s\n", test_type);
+ ACCOUNT_SLOGD("_capability_get_callback test_value = : %d\n", test_value);
return TRUE;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_capability_by_account_id(_utc_capability_get_callback, account_id, NULL);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d,\n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d,\n", __LINE__, ret);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_query_capability_by_account_id(_utc_capability_get_callback, account_id, (void *)user_data);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_delete_from_db_by_id(account_id);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d, \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_delete_from_db_by_user_name("usernamed-wy1115", "usernamed-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d \n", __LINE__, ret);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_delete_from_db_by_package_name("usernamed-com.samsung.account");
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d\n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d\n", __LINE__, ret);
}
else
{
- printf("(%d)-[Account-else loop] ret = %d\n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account-else loop] ret = %d\n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return 1;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_update_sync_status_by_id(account_id, ACCOUNT_SYNC_STATUS_IDLE);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return ret;
}
ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_get_application_capability_support("com.samsung.facebook", ACCOUNT_SUPPORTS_CAPABILITY_CONTACT, &test);
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
return ret;
}
account_h account = NULL;
ret = account_connect();
- printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
+ ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
ret = account_create(&account);
- printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
+ ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
ret = account_query_account_by_account_id( 2, &account);
- printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
+ ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
ret = account_set_access_token(account, "ACCESSSSSSSSSSSSSSSSSSSFASFASDGDSFFASDFASFDSDGAASDFASDGDFDFGAFASDFASFASDFASASGSGASDFASFSADDSGASGASGGASDFASDFASGSAASDFAAAG");
- printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
+ ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
ret = account_update_to_db_by_id( account, 2);
- printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
+ ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
ret = account_destroy(account);
- printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
+ ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
ret = account_disconnect();
- printf("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
+ ACCOUNT_SLOGD("%s(%d) ret=%x\n", __FUNCTION__, __LINE__, ret);
return 1;
}
-#if 0
-
-static int utc_account_type_test()
-{
- int ret;
- account_connect();
- ret = account_type_create(&account_type);
- MYACCOUNT_DBUG("account_type_create %d ret = %d", __LINE__, ret);
-
- ret = account_type_set_app_id(account_type, "com.samsung.urusa");
- ret = account_type_set_icon_path(account_type, "urusa/iconpath");
- ret = account_type_set_small_icon_path(account_type, "urusa/smalliconpath");
- ret = account_type_set_service_provider_id(account_type,"http://org.tizen.urusa.com");
- ret = account_type_set_multiple_account_support(account_type, 1);
-
- ret = account_type_set_label(account_type, "urusa", "en_US");
- ret = account_type_set_label(account_type, "urusa-fr_FR", "fr_FR");
- ret = account_type_set_label(account_type, "urusa-ge_GE", "ge_GE");
-
- ret = account_type_insert_to_db(account_type,&account_type_id);
- MYACCOUNT_DBUG("account_type_insert_to_db ret = %d", ret);
-
- ret = account_type_destroy(account_type);
-
- ret = account_type_create(&account_type);
- ret = account_type_set_app_id(account_type, "com.tizen.urusa");
- ret = account_type_set_icon_path(account_type, "1111urusa/iconpath");
- ret = account_type_set_small_icon_path(account_type, "1111urusa/smalliconpath");
- ret = account_type_set_service_provider_id(account_type,"1111http://org.tizen.urusa.com");
- ret = account_type_set_multiple_account_support(account_type, 0);
-
- ret = account_type_set_label(account_type, "1111urusa", "en_US");
- ret = account_type_set_label(account_type, "1111urusa-fr_FR", "fr_FR");
- ret = account_type_set_label(account_type, "1111urusa-ge_GE", "ge_GE");
-
- ret = account_type_update_to_db_by_app_id(account_type, "com.samsung.urusa");
- MYACCOUNT_DBUG("account_type_update_to_db_by_app_id ret = %d", ret);
- ret = account_type_destroy(account_type);
-
- ret = account_type_create(&account_type);
- ret = account_type_query_by_app_id("com.tizen.urusa", &account_type);
- MYACCOUNT_DBUG("account_type_update_to_db_by_app_id ret = %d", ret);
-
- char* tmptxt = NULL;
- int tmpint = -1 ;
- ret = account_type_get_app_id(account_type, &tmptxt);
- MYACCOUNT_DBUG("account_type_get ret = %d, %s", ret, tmptxt);
- free(tmptxt);
-
- ret = account_type_get_icon_path(account_type, &tmptxt);
- MYACCOUNT_DBUG("account_type_get ret = %d, %s", ret, tmptxt);
- free(tmptxt);
-
- ret = account_type_get_small_icon_path(account_type, &tmptxt);
- MYACCOUNT_DBUG("account_type_get ret = %d, %s", ret, tmptxt);
- free(tmptxt);
-
- ret = account_type_get_service_provider_id(account_type, &tmptxt);
- MYACCOUNT_DBUG("account_type_get ret = %d, %s", ret, tmptxt);
- free(tmptxt);
-
- ret = account_type_get_multiple_account_support(account_type, &tmpint);
- MYACCOUNT_DBUG("account_type_get ret = %d, %d", ret, tmpint);
-
- ret = account_type_get_label(account_type, label_cb_func, NULL);
-
- ret = account_type_destroy(account_type);
-
-
- ret = account_type_foreach_account_type_from_db( account_type_callback,NULL);
-
- ret = account_type_delete_by_app_id("com.tizen.urusa");
- MYACCOUNT_DBUG("account_type_delete_by_app_id ret = %d", ret);
- account_disconnect();
-
- return ret;
-}
-
-static int utc_notify_account_insert_update_delete()
-{
- DBusMessage* msg;
- DBusConnection* conn;
- DBusError err;
-
- printf("Listening for signals\n");
-
- /*initialise the errors */
- dbus_error_init(&err);
-
- /* connect to the bus and check for errors*/
- conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
- if (dbus_error_is_set(&err)) {
- fprintf(stderr, "Connection Error (%s)\n", err.message);
- dbus_error_free(&err);
- }
- if (NULL == conn) {
- exit(1);
- }
-
- /* add a rule for which messages we want to see*/
- dbus_bus_add_match(conn, "type='signal',interface='account.signal.Type'", &err); /* see signals from the given interface*/
- dbus_connection_flush(conn);
- if (dbus_error_is_set(&err)) {
- fprintf(stderr, "Match Error (%s)\n", err.message);
- exit(1);
- }
- printf("Match rule sent\n");
-
- /* loop listening for signals being emmitted*/
- while (true) {
-
- /* non blocking read of the next available message*/
- dbus_connection_read_write(conn, 0);
- msg = dbus_connection_pop_message(conn);
-
- /* loop again if we haven't read a message*/
- if (NULL == msg) {
- sleep(1);
- continue;
- }
-
- /* check if the message is a signal from the correct interface and with the correct name*/
- if (dbus_message_is_signal(msg, ACCOUNT_DBUS_SIGNAL_INTERFACE, ACCOUNT_DBUS_NOTI_NAME_INSERT)) {
- printf("Got Signal with name insert\n");
- }
-
- if (dbus_message_is_signal(msg, ACCOUNT_DBUS_SIGNAL_INTERFACE, ACCOUNT_DBUS_NOTI_NAME_UPDATE)) {
- printf("Got Signal with name update\n");
- }
-
- if (dbus_message_is_signal(msg, ACCOUNT_DBUS_SIGNAL_INTERFACE, ACCOUNT_DBUS_NOTI_NAME_DELETE)) {
- printf("Got Signal with name delete\n");
- }
- /* free the message*/
- dbus_message_unref(msg);
- }
- /*close the connection*/
- dbus_connection_close(conn);
-}
-#endif
-
int main(int argc, char** argv)
{
#if 0
char temp[128];
memset(temp, 0x00, sizeof(temp));
- printf("\n\n**************************** Account Unit Test case Execution Suite ************************************ \n\n");
- printf("1. Press 1 for account insert test \n");
- printf("2. Press 2 for account update test \n");
- printf("3. Press 3 for account delete test \n");
- printf("4. Press 4 for query account test \n");
+ ACCOUNT_SLOGD("\n\n**************************** Account Unit Test case Execution Suite ************************************ \n\n");
+ ACCOUNT_SLOGD("1. Press 1 for account insert test \n");
+ ACCOUNT_SLOGD("2. Press 2 for account update test \n");
+ ACCOUNT_SLOGD("3. Press 3 for account delete test \n");
+ ACCOUNT_SLOGD("4. Press 4 for query account test \n");
if (scanf("%d", &user_resp) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
if (user_resp == 1) {
- printf("In Account Insert Test Mode \n");
+ ACCOUNT_SLOGD("In Account Insert Test Mode \n");
account_id = _account_insert_test_new();
if(account_id > 0)
{
- printf("(%d)-[Account] account insert test Success!! account id = %d\n", __LINE__, account_id);
+ ACCOUNT_SLOGD("(%d)-[Account] account insert test Success!! account id = %d\n", __LINE__, account_id);
}
utc_account_get_and_update();
} else if (user_resp == 2) {
- printf("In Account Update Test Mode \n");
- printf("1. Press 1 to upadte account by id test \n");
- printf("2. Press 2 for update account by user name test \n");
+ ACCOUNT_SLOGD("In Account Update Test Mode \n");
+ ACCOUNT_SLOGD("1. Press 1 to upadte account by id test \n");
+ ACCOUNT_SLOGD("2. Press 2 for update account by user name test \n");
if (scanf("%d", &user_resp) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
if (user_resp == 1) {
- printf("Enter Account Id to be Updated \n");
+ ACCOUNT_SLOGD("Enter Account Id to be Updated \n");
if (scanf("%d", &account_id) != 1){
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
if (_account_update_test_new(account_id) == ACCOUNT_ERROR_NONE)
- printf("Account update Success \n");
+ ACCOUNT_SLOGD("Account update Success \n");
else
- printf("Account update Failed \n");
+ ACCOUNT_SLOGD("Account update Failed \n");
} else if (user_resp == 2) {
- printf("Enter Account user name to be Updated \n");
+ ACCOUNT_SLOGD("Enter Account user name to be Updated \n");
memset(temp, 0x00, sizeof(temp));
if (scanf("%s", temp) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
char temp2[128];
memset(temp2, 0x00, sizeof(temp2));
- printf("Enter Account package name to be Updated \n");
+ ACCOUNT_SLOGD("Enter Account package name to be Updated \n");
if (scanf("%s", temp2) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
if (_account_update_test_new_by_user_name(temp, temp2) == ACCOUNT_ERROR_NONE)
- printf("Account update Success \n");
+ ACCOUNT_SLOGD("Account update Success \n");
else
- printf("Account update Failed \n");
+ ACCOUNT_SLOGD("Account update Failed \n");
} else {
- printf("Wrong info entered \n");
+ ACCOUNT_SLOGD("Wrong info entered \n");
exit(0);
}
} else if (user_resp == 3) {
- printf("In Account Delete Test Mode \n");
- printf("1. Press 1 to delete account by id test \n");
- printf("2. Press 2 to delete account by user name test \n");
- printf("3. Press 3 to delete account by package name test \n");
+ ACCOUNT_SLOGD("In Account Delete Test Mode \n");
+ ACCOUNT_SLOGD("1. Press 1 to delete account by id test \n");
+ ACCOUNT_SLOGD("2. Press 2 to delete account by user name test \n");
+ ACCOUNT_SLOGD("3. Press 3 to delete account by package name test \n");
if (scanf("%d", &user_resp) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
if (user_resp == 1) {
- printf("Enter Account Id to be Deleted \n");
+ ACCOUNT_SLOGD("Enter Account Id to be Deleted \n");
if (scanf("%d", &account_id) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
int ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
if (account_delete_from_db_by_id(account_id) == ACCOUNT_ERROR_NONE)
- printf("Account delete Success \n");
+ ACCOUNT_SLOGD("Account delete Success \n");
else
- printf("Account delete Failed \n");
+ ACCOUNT_SLOGD("Account delete Failed \n");
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
} else if (user_resp == 2) {
- printf("Enter Account user name to be Deleted \n");
+ ACCOUNT_SLOGD("Enter Account user name to be Deleted \n");
memset(temp, 0x00, sizeof(temp));
if (scanf("%s", temp) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
char temp2[128];
memset(temp2, 0x00, sizeof(temp2));
- printf("Enter Account package name to be Deleted \n");
+ ACCOUNT_SLOGD("Enter Account package name to be Deleted \n");
if (scanf("%s", temp2) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
int ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
if (account_delete_from_db_by_user_name(temp, temp2) == ACCOUNT_ERROR_NONE)
- printf("Account delete Success \n");
+ ACCOUNT_SLOGD("Account delete Success \n");
else
- printf("Account delete Failed \n");
+ ACCOUNT_SLOGD("Account delete Failed \n");
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
} else if (user_resp == 3) {
- printf("Enter Account package name to be Deleted \n");
+ ACCOUNT_SLOGD("Enter Account package name to be Deleted \n");
memset(temp, 0x00, sizeof(temp));
if (scanf("%s", temp) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
int ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
if (account_delete_from_db_by_package_name(temp) == ACCOUNT_ERROR_NONE )
- printf("Account delete Success \n");
+ ACCOUNT_SLOGD("Account delete Success \n");
else
- printf("Account delete Failed \n");
+ ACCOUNT_SLOGD("Account delete Failed \n");
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
} else {
- printf("Wrong info entered \n");
+ ACCOUNT_SLOGD("Wrong info entered \n");
exit(0);
}
} else if (user_resp == 4) {
- printf("In Account Query Test Mode \n");
- printf("1. Press 1 to Query account by id test \n");
- printf("2. Press 2 to Query account by user name test \n");
- printf("3. Press 3 to Query account by package name test \n");
- printf("4. Press 4 to Query account by capability test \n");
+ ACCOUNT_SLOGD("In Account Query Test Mode \n");
+ ACCOUNT_SLOGD("1. Press 1 to Query account by id test \n");
+ ACCOUNT_SLOGD("2. Press 2 to Query account by user name test \n");
+ ACCOUNT_SLOGD("3. Press 3 to Query account by package name test \n");
+ ACCOUNT_SLOGD("4. Press 4 to Query account by capability test \n");
if (scanf("%d", &user_resp) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
if (user_resp == 1) {
- printf("Enter Account Id to be Queried \n");
+ ACCOUNT_SLOGD("Enter Account Id to be Queried \n");
if (scanf("%d", &account_id) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
account_h account = NULL;
account_connect();
account_create(&account);
if (account_query_account_by_account_id(account_id, &account) == ACCOUNT_ERROR_NONE)
- printf("Account Queried Successfully \n");
+ ACCOUNT_SLOGD("Account Queried Successfully \n");
else
- printf("Account Queried failed \n");
+ ACCOUNT_SLOGD("Account Queried failed \n");
account_destroy(account);
account_disconnect();
} else if (user_resp == 2) {
- printf("Enter Account user name to be Queried \n");
+ ACCOUNT_SLOGD("Enter Account user name to be Queried \n");
if (scanf("%s", temp) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
int ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
if (account_query_account_by_user_name(_account_get_callback, temp, NULL) == ACCOUNT_ERROR_NONE)
- printf("Account Queried Successfully \n");
+ ACCOUNT_SLOGD("Account Queried Successfully \n");
else
- printf("Account Queried failed \n");
+ ACCOUNT_SLOGD("Account Queried failed \n");
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
} else if (user_resp == 3) {
- printf("Enter Account package name to be Queried \n");
+ ACCOUNT_SLOGD("Enter Account package name to be Queried \n");
if (scanf("%s", temp) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
int ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d\n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d\n", __LINE__, ret);
}
if (account_query_account_by_package_name(_account_get_callback, temp, NULL) == ACCOUNT_ERROR_NONE)
- printf("Account Queried Successfully \n");
+ ACCOUNT_SLOGD("Account Queried Successfully \n");
else
- printf("Account Queried failed \n");
+ ACCOUNT_SLOGD("Account Queried failed \n");
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
} else if (user_resp == 4) {
- printf("Enter Account capability key to be Queried \n");
+ ACCOUNT_SLOGD("Enter Account capability key to be Queried \n");
if (scanf("%d", &cap_key) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
- printf("Enter Account capability key's value to be Queried \n");
+ ACCOUNT_SLOGD("Enter Account capability key's value to be Queried \n");
if (scanf("%d", &cap_value) != 1) {
- printf("Scanf Failed!!!\n");
+ ACCOUNT_SLOGD("Scanf Failed!!!\n");
exit(0);
}
int ret = account_connect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d\n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d\n", __LINE__, ret);
}
if (account_query_account_by_capability(_account_get_callback, ACCOUNT_SUPPORTS_CAPABILITY_PHOTO, cap_value, NULL) == ACCOUNT_ERROR_NONE)
- printf("Account Queried Successfully \n");
+ ACCOUNT_SLOGD("Account Queried Successfully \n");
else
- printf("Account Queried failed \n");
+ ACCOUNT_SLOGD("Account Queried failed \n");
ret = account_disconnect();
if(ret != ACCOUNT_ERROR_NONE)
{
- printf("(%d)-[Account] ret = %d, \n", __LINE__, ret);
+ ACCOUNT_SLOGD("(%d)-[Account] ret = %d, \n", __LINE__, ret);
}
} else {
- printf("Wrong info entered \n");
+ ACCOUNT_SLOGD("Wrong info entered \n");
exit(0);
}
} else {
- printf("Wrong info entered \n");
+ ACCOUNT_SLOGD("Wrong info entered \n");
exit(0);
}