Remove the devider of genlist for IOT profile
[apps/native/ug-bluetooth-efl.git] / standard / bt-main-view.h
1 /*
2 * ug-bluetooth-efl
3 *
4 * Copyright 2012 Samsung Electronics Co., Ltd
5 *
6 * Contact: Hocheol Seo <hocheol.seo@samsung.com>
7 *           GirishAshok Joshi <girish.joshi@samsung.com>
8 *           DoHyun Pyun <dh79.pyun@samsung.com>
9 *
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
13 *
14 * http://www.tizenopensource.org/license
15 *
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.
21 *
22 */
23
24 #ifndef __BT_MAIN_VIEW_H__
25 #define __BT_MAIN_VIEW_H__
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 #include <glib.h>
32
33 #include "bt-type-define.h"
34 #include "bt-main-ug.h"
35
36 typedef struct _bt_radio_item bt_radio_item;
37
38 struct _bt_radio_item {
39         Elm_Object_Item *it;    /* Genlist Item pointer */
40         int index;              /* Index*/
41         void *ugd;
42 };
43
44 int _bt_main_enable_bt(void *data);
45
46 int _bt_main_disable_bt(void *data);
47
48 void _bt_main_phone_name_changing_btn_cb(void *data, Evas_Object *obj,
49                                                  void *event_info);
50
51 void _bt_main_popup_del_cb(void *data, Evas_Object *obj, void *event_info);
52
53 void _bt_back_btn_popup_del_cb(void *data, Evas_Object *obj, void *event_info);
54
55 void _bt_main_create_information_popup(void *data, char *msg);
56
57 int _bt_main_draw_list_view(bt_ug_data *ugd);
58
59 int _bt_main_draw_onoff_view(bt_ug_data *ugd);
60
61 int _bt_main_draw_visibility_view(bt_ug_data *ugd);
62
63 void _bt_main_draw_paired_devices(bt_ug_data *ugd);
64
65 Elm_Object_Item *_bt_main_add_paired_device_on_bond(bt_ug_data *ugd,
66                                         bt_dev_t *dev);
67
68 Elm_Object_Item *_bt_main_add_paired_device(bt_ug_data *ugd,
69                                         bt_dev_t *dev);
70
71 Elm_Object_Item *_bt_main_add_searched_device(bt_ug_data *ugd,
72                                                 bt_dev_t *dev);
73
74 Elm_Object_Item *_bt_main_add_no_device_found(bt_ug_data *ugd);
75
76 void _bt_main_remove_paired_device(bt_ug_data *ugd, bt_dev_t *dev);
77
78 void _bt_sort_paired_device_list(bt_ug_data *ugd, bt_dev_t *dev, int connected);
79
80 void _bt_main_remove_searched_device(bt_ug_data *ugd, bt_dev_t *dev);
81
82 void _bt_main_remove_all_paired_devices(bt_ug_data *ugd);
83
84 void _bt_main_remove_all_searched_devices(bt_ug_data *ugd);
85
86 bt_dev_t *_bt_main_get_dev_info(Eina_List *list,
87                                 Elm_Object_Item *genlist_item);
88
89 bt_dev_t *_bt_main_get_dev_info_by_address(Eina_List *list,
90                                                 char *address);
91
92 gboolean _bt_main_is_connectable_device(bt_dev_t *dev);
93
94 void _bt_main_connect_device(bt_ug_data *ugd, bt_dev_t *dev);
95
96 void _bt_main_disconnect_device(bt_ug_data *ugd, bt_dev_t *dev);
97
98 int _bt_main_request_connect_with_effect(bt_ug_data *ugd, Elm_Object_Item *seleted_item);
99
100 bt_dev_t *_bt_main_create_searched_le_device_item(void *data);
101
102 int _bt_main_request_pairing_with_effect(bt_ug_data *ugd,
103                                         Elm_Object_Item *seleted_item);
104
105 void _bt_main_init_status(bt_ug_data *ugd, void *data);
106
107 bt_dev_t *_bt_main_create_paired_device_item(void *data);
108
109 bt_dev_t *_bt_main_create_searched_device_item(void *data);
110
111 void _bt_main_get_paired_device(bt_ug_data *ugd);
112
113 void _bt_main_scan_device(bt_ug_data *ugd);
114
115 int _bt_main_service_request_cb(void *data);
116
117 char *_bt_main_get_device_icon(int major_class, int minor_class,
118                                 int connected, gboolean highlighted);
119
120 int _bt_main_check_and_update_device(Eina_List *list,
121                                         char *addr, char *name);
122
123 void _bt_main_launch_syspopup(void *data, char *event_type,
124                                 char *title, char *type);
125
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);
131
132 void _bt_main_add_searched_title(bt_ug_data *ugd);
133
134 void _bt_main_add_device_name_item(bt_ug_data *ugd, Evas_Object *genlist);
135
136 void _bt_update_device_list(bt_ug_data *ugd);
137
138 Evas_Object * _bt_main_create_scan_button(bt_ug_data *ugd);
139
140 int _bt_idle_destroy_ug(void *data);
141
142 #ifdef __cplusplus
143 }
144 #endif
145 #endif                          /* __BT_MAIN_VIEW_H__ */