2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Created on: Oct 9, 2013
24 #ifndef SETTING_BLUETOOTH_H_
25 #define SETTING_BLUETOOTH_H_
27 #include <Elementary.h>
30 #include <bluetooth-api.h>
31 #include <bluetooth.h>
34 #define VISIBILITY_TIMEOUT 120
35 #define BT_LIST_ITEM_COUNT 3
44 BT_MENU_TYPE_BT_ON_OFF,
45 BT_MENU_TYPE_BT_HEADSET,
46 BT_MENU_TYPE_VISIBLE_ON_OFF
49 struct _bt_menu_item {
52 void (*func)(void *data, Evas_Object *obj, void *event_info);
55 typedef struct Bt_Item_Data {
57 Elm_Object_Item *item;
59 Evas_Object *state_label;
62 static char *_gl_bt_title_get(void *data, Evas_Object *obj, const char *part);
63 static Evas_Object *_gl_bt_check_get(void *data, Evas_Object *obj, const char *part);
64 Evas_Object *_create_bt_list(void *data);
65 static void _bt_chk_changed_cb(void *data, Evas_Object *obj, void *event_info);
66 static void _blutooth_cb(void *data, Evas_Object *obj, void *event_info);
67 static void _visibility_cb(void *data, Evas_Object *obj, void *event_info);
68 static void _alternate_bt_mode(void *data);
69 static void _deamon_cb(void *data, Evas_Object *obj, void *event_info);
71 static void _BT_headset_cb(void *data, Evas_Object *obj, void *event_info);
74 void clear_bt_resource();
75 Eina_Bool _clear_bluetooth_cb(void *data, Elm_Object_Item *it);
76 void _update_visibility_item_view(int is_hf_connected);
78 static void bt_state_vconf_change_cb(keynode_t *key, void *data);
79 static void hf_event_handler(int event, void *data, void *user_data);
81 #endif /* SETTING_BLUETOOTH_H_ */