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;
125 /*************************
127 ************************ */
129 Evas_Object *popup_menu;
131 /*************************
133 ************************ */
134 bool waiting_service_response;
135 bool auto_service_search;
138 bool aul_launching_req;
139 bool aul_pairing_req;
140 unsigned int op_status;
141 unsigned int ug_status;
142 unsigned int search_type;
144 /*************************
146 ************************ */
147 Elm_Genlist_Item_Class popup_menu_itc;
149 bundle *popup_bundle;
151 char phone_name[BT_DEVICE_NAME_LENGTH_MAX + 1];
158 int visibility_timeout;
159 bt_rotate_mode_t rotation;
160 bt_dev_t *pick_device;
164 E_DBus_Connection *EDBusHandle;
165 E_DBus_Signal_Handler *sh;
166 E_DBus_Signal_Handler *popup_sh;
168 /* Dbus connection / proxy */
171 /* End key callback */
172 bt_app_back_cb back_cb;
174 /*************************
176 ************************ */
177 bt_profile_view_data *profile_vd;
178 bt_confirm_req_t confirm_req;
181 void _bt_ug_destroy(void *data, void *result);
186 #endif /* __BT_MAIN_UG_H__ */