tizen 2.3 release
[apps/home/b2-clocksetting.git] / src / setting_data_vconf.c
index ef052c8..8373aec 100644 (file)
@@ -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;