2 * Copyright (c) 2012-2013 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,
11 * software 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.
17 #ifndef __BT_MAIN_UG_H__
18 #define __BT_MAIN_UG_H__
26 #include <appcore-efl.h>
27 #include <Elementary.h>
28 #include <ui-gadget-module.h>
33 #include "bt-type-define.h"
34 #include "bt-profile-view.h"
37 #define UG_MODULE_API __attribute__ ((visibility("default")))
40 #define PKGNAME "ug-setting-bluetooth-efl"
45 #define PREFIX "/usr/ug/"
47 #define LOCALEDIR PREFIX"res/locale"
49 #define _EDJ(o) elm_layout_edje_get(o)
54 #define _(s) dgettext(PKGNAME, s)
56 #define dgettext_noop(s) (s)
61 #define N_(s) dgettext_noop(s)
63 #define BT_UG_VCONF_PRINTSETTING "memory/bluetooth/printsetting"
69 Evas_Object *win_main;
70 bt_launch_mode_t bt_launch_mode;
73 Ecore_Timer *request_timer;
75 /*************************
77 ************************ */
78 Evas_Object *navi_bar;
79 Evas_Object *main_layout;
80 Elm_Object_Item *navi_it;
81 Elm_Object_Item *service_navi_it;
84 Evas_Object *main_genlist;
86 Evas_Object *selectioninfo;
88 /* Paired / Searched devices */
89 Evas_Object *paired_dlggrp;
90 Evas_Object *searched_dlggrp;
92 /* Selected device's genlist items */
93 Elm_Object_Item *paired_item;
94 Elm_Object_Item *searched_item;
96 /* Paired / Searched device list */
97 Eina_List *paired_device;
98 Eina_List *searched_device;
101 Evas_Object *onoff_btn;
102 Evas_Object *scan_btn;
103 Evas_Object *radio_main;
105 /* Genlist Item class */
106 Elm_Genlist_Item_Class *sp_itc;
107 Elm_Genlist_Item_Class *status_itc;
108 Elm_Genlist_Item_Class *visible_itc;
109 Elm_Genlist_Item_Class *paired_title_itc;
110 Elm_Genlist_Item_Class *searched_title_itc;
111 Elm_Genlist_Item_Class *timeout_value_itc;
112 Elm_Genlist_Item_Class *searched_itc;
113 Elm_Genlist_Item_Class *no_device_itc;
114 Elm_Genlist_Item_Class *device_itc;
117 Elm_Object_Item *status_item;
118 Elm_Object_Item *visible_item;
119 Elm_Object_Item *paired_title;
120 Elm_Object_Item *searched_title;
121 Elm_Object_Item *no_device_item;
122 Elm_Object_Item *paired_padding;
123 Elm_Object_Item *searched_padding;
124 Elm_Object_Item *bottom_padding;
125 Elm_Object_Item *visible_exp_item[5];
127 /*************************
129 ************************ */
131 Evas_Object *popup_menu;
133 /*************************
135 ************************ */
136 bool waiting_service_response;
137 bool auto_service_search;
140 bool aul_launching_req;
141 bool aul_pairing_req;
142 unsigned int op_status;
143 unsigned int ug_status;
144 unsigned int search_type;
146 /*************************
148 ************************ */
149 Elm_Genlist_Item_Class popup_menu_itc;
151 bundle *popup_bundle;
153 char phone_name[BT_DEVICE_NAME_LENGTH_MAX + 1];
161 int visibility_timeout;
162 bt_rotate_mode_t rotation;
163 bt_dev_t *pick_device;
167 E_DBus_Connection *EDBusHandle;
168 E_DBus_Signal_Handler *sh;
169 E_DBus_Signal_Handler *popup_sh;
171 /* Dbus connection / proxy */
174 /* End key callback */
175 bt_app_back_cb back_cb;
177 /*************************
179 ************************ */
180 bt_profile_view_data *profile_vd;
181 bt_confirm_req_t confirm_req;
184 void _bt_ug_destroy(void *data, void *result);
189 #endif /* __BT_MAIN_UG_H__ */