X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fsetting_data_vconf.c;h=8373aec6918f4c17c49e53dc468304ece2f1d1b5;hb=088b74709a93e67409c9de42da2b9f8804585ebc;hp=ef052c85fdf18b7758fd867885074f86fe556c1c;hpb=868c3e69f73fa58e8f97162816bb56068a8fba96;p=apps%2Fhome%2Fb2-clocksetting.git diff --git a/src/setting_data_vconf.c b/src/setting_data_vconf.c index ef052c8..8373aec 100644 --- a/src/setting_data_vconf.c +++ b/src/setting_data_vconf.c @@ -1,50 +1,49 @@ /* - * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved. + * Copyright (c) 2010 Samsung Electronics, Inc. + * 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. - * -*/ + * This software is a confidential and proprietary information + * of Samsung Electronics, Inc. ("Confidential Information"). You + * shall not disclose such Confidential Information and shall use + * it only in accordance with the terms of the license agreement + * you entered into with Samsung Electronics. + */ #include "setting_data_vconf.h" #include "util.h" -void unregister_vconf_changing(const char *vconf, vconf_callback_fn cb) +int unregister_vconf_changing(const char *vconf, vconf_callback_fn cb) { - if (vconf && cb) { - int ret = vconf_ignore_key_changed(vconf, cb); - if (ret != 0) { - DBG("Setting - vconf's changed callback do not unregist"); + int ret = TRUE; + if ( vconf && cb ) { + ret = vconf_ignore_key_changed(vconf, cb); + if ( ret == VCONF_OK ) + { + DBG("Setting - vconf's changed callback unregisted!!"); } else { - DBG("Setting - vconf's changed callback unregisted!!"); + DBG("Setting - vconf's changed callback do not unregist"); + ret = FALSE; } } + return ret; } int register_vconf_changing(const char *vconf, vconf_callback_fn cb, void *data) { - int ret = 1; + int ret = TRUE; if ( vconf && cb ) { - if(0 == vconf_notify_key_changed(vconf, cb, data)) + ret = vconf_notify_key_changed(vconf, cb, data); + if( ret == VCONF_OK ) { DBG("Setting - vconf's changed callback is registed!"); } else { DBG("Setting - vconf's changed callback is not registed!"); - ret = 0; + ret = FALSE; } } return ret;