4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Contact: Hocheol Seo <hocheol.seo@samsung.com>
7 * GirishAshok Joshi <girish.joshi@samsung.com>
8 * DoHyun Pyun <dh79.pyun@samsung.com>
10 * Licensed under the Flora License, Version 1.1 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.tizenopensource.org/license
16 * Unless required by applicable law or agreed to in writing,
17 * software distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
24 #ifndef __BT_MAIN_VIEW_H__
25 #define __BT_MAIN_VIEW_H__
33 #include "bt-type-define.h"
34 #include "bt-main-ug.h"
36 typedef struct _bt_radio_item bt_radio_item;
38 struct _bt_radio_item {
39 Elm_Object_Item *it; /* Genlist Item pointer */
44 int _bt_main_enable_bt(void *data);
46 int _bt_main_disable_bt(void *data);
48 void _bt_main_phone_name_changing_btn_cb(void *data, Evas_Object *obj,
51 void _bt_main_popup_del_cb(void *data, Evas_Object *obj, void *event_info);
53 void _bt_back_btn_popup_del_cb(void *data, Evas_Object *obj, void *event_info);
55 void _bt_main_create_information_popup(void *data, char *msg);
57 int _bt_main_draw_list_view(bt_ug_data *ugd);
59 int _bt_main_draw_onoff_view(bt_ug_data *ugd);
61 int _bt_main_draw_visibility_view(bt_ug_data *ugd);
63 void _bt_main_draw_paired_devices(bt_ug_data *ugd);
65 Elm_Object_Item *_bt_main_add_paired_device_on_bond(bt_ug_data *ugd,
68 Elm_Object_Item *_bt_main_add_paired_device(bt_ug_data *ugd,
71 Elm_Object_Item *_bt_main_add_searched_device(bt_ug_data *ugd,
74 Elm_Object_Item *_bt_main_add_no_device_found(bt_ug_data *ugd);
76 void _bt_main_remove_paired_device(bt_ug_data *ugd, bt_dev_t *dev);
78 void _bt_sort_paired_device_list(bt_ug_data *ugd, bt_dev_t *dev, int connected);
80 void _bt_main_remove_searched_device(bt_ug_data *ugd, bt_dev_t *dev);
82 void _bt_main_remove_all_paired_devices(bt_ug_data *ugd);
84 void _bt_main_remove_all_searched_devices(bt_ug_data *ugd);
86 bt_dev_t *_bt_main_get_dev_info(Eina_List *list,
87 Elm_Object_Item *genlist_item);
89 bt_dev_t *_bt_main_get_dev_info_by_address(Eina_List *list,
92 gboolean _bt_main_is_connectable_device(bt_dev_t *dev);
94 void _bt_main_connect_device(bt_ug_data *ugd, bt_dev_t *dev);
96 void _bt_main_disconnect_device(bt_ug_data *ugd, bt_dev_t *dev);
98 int _bt_main_request_connect_with_effect(bt_ug_data *ugd, Elm_Object_Item *seleted_item);
100 bt_dev_t *_bt_main_create_searched_le_device_item(void *data);
102 int _bt_main_request_pairing_with_effect(bt_ug_data *ugd,
103 Elm_Object_Item *seleted_item);
105 void _bt_main_init_status(bt_ug_data *ugd, void *data);
107 bt_dev_t *_bt_main_create_paired_device_item(void *data);
109 bt_dev_t *_bt_main_create_searched_device_item(void *data);
111 void _bt_main_get_paired_device(bt_ug_data *ugd);
113 void _bt_main_scan_device(bt_ug_data *ugd);
115 int _bt_main_service_request_cb(void *data);
117 char *_bt_main_get_device_icon(int major_class, int minor_class,
118 int connected, gboolean highlighted);
120 int _bt_main_check_and_update_device(Eina_List *list,
121 char *addr, char *name);
123 void _bt_main_launch_syspopup(void *data, char *event_type,
124 char *title, char *type);
126 gboolean _bt_main_is_matched_profile(unsigned int search_type,
127 unsigned int major_class,
128 unsigned int service_class,
129 app_control_h service,
130 unsigned int minor_class);
132 void _bt_main_add_searched_title(bt_ug_data *ugd);
134 void _bt_main_add_device_name_item(bt_ug_data *ugd, Evas_Object *genlist);
136 void _bt_update_device_list(bt_ug_data *ugd);
138 Evas_Object * _bt_main_create_scan_button(bt_ug_data *ugd);
140 int _bt_idle_destroy_ug(void *data);
145 #endif /* __BT_MAIN_VIEW_H__ */