2 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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
58 Elm_Object_Item *item;
60 Evas_Object *state_label;
63 static char * _gl_bt_title_get(void *data, Evas_Object *obj, const char *part);
64 static Evas_Object * _gl_bt_check_get(void *data, Evas_Object *obj, const char *part);
65 Evas_Object* _create_bt_list(void* data);
66 static void _bt_chk_changed_cb(void *data, Evas_Object *obj, void *event_info);
67 static void _blutooth_cb(void *data, Evas_Object *obj, void *event_info);
68 static void _visibility_cb(void *data, Evas_Object *obj, void *event_info);
69 static void _alternate_bt_mode( void* data );
70 static void _deamon_cb(void *data, Evas_Object *obj, void *event_info);
72 static void _BT_headset_cb(void *data, Evas_Object *obj, void *event_info);
75 void clear_bt_resource();
76 Eina_Bool _clear_bluetooth_cb(void *data, Elm_Object_Item *it);
77 void _update_visibility_item_view(int is_hf_connected);
79 static void bt_state_vconf_change_cb(keynode_t * key, void * data);
80 static void hf_event_handler(int event, void *data, void *user_data);
82 #endif /* SETTING_BLUETOOTH_H_ */