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.
33 #include <Elementary.h>
35 #include "bt-type-define.h"
36 #include "bt-main-ug.h"
38 /* Major Device Mask */
39 #define MISCELLANEOUS_MAJOR_DEVICE_MASK (0x000000)
40 #define COMPUTER_MAJOR_DEVICE_MASK (0x000100)
41 #define PHONE_MAJOR_DEVICE_MASK (0x000200)
42 #define LAN_MAJOR_DEVICE_MASK (0x000300)
43 #define AV_MAJOR_DEVICE_MASK (0x000400)
44 #define PERIPHERAL_MAJOR_DEVICE_MASK (0x000500)
45 #define IMAGING_MAJOR_DEVICE_MASK (0x000600)
46 #define WEARABLE_MAJOR_DEVICE_MASK (0x000700)
47 #define TOY_MAJOR_DEVICE_MASK (0x000800)
48 #define UNCLASSIFIED_MAJOR_DEVICE_MASK (0x001F00)
49 #define OBJECT_TRANSFER_MAJOR_SERVICE_MASK (0x100000)
51 gboolean _bt_util_update_class_of_device_by_service_list(bt_service_class_t service_list,
52 bt_major_class_t *major_class,
53 bt_minor_class_t *minor_class);
55 void _bt_util_set_value(const char *req, unsigned int *search_type,
56 unsigned int *op_mode);
58 gboolean _bt_util_store_get_value(const char *key,
59 bt_store_type_t store_type,
60 unsigned int size, void *value);
62 void _bt_util_launch_no_event(void *data, void *obj, void *event);
64 void _bt_util_set_list_disabled(Evas_Object *genlist, Eina_Bool disable);
66 void _bt_util_change_discoverable_mode(bt_ug_data *ugd, gboolean discoverable);
68 gboolean _bt_util_is_profile_connected(int connected_type, unsigned char *addr);
70 int _bt_util_check_any_profile_connected(bt_dev_t *dev);
72 void _bt_util_set_phone_name(void);
74 int _bt_util_get_phone_name(char *phone_name, int size);
76 char * _bt_util_get_timeout_string(int timeout);
78 int _bt_util_get_timeout_value(int index);
80 int _bt_util_get_timeout_index(int timeout);
82 gboolean _bt_util_is_battery_low(void);
84 void _bt_util_addr_type_to_addr_string(char *address,
87 void _bt_util_addr_type_to_addr_result_string(char *address,
90 void _bt_util_addr_type_to_addr_net_string(char *address,
93 void _bt_util_addr_string_to_addr_type(unsigned char *addr,
96 void _bt_util_convert_time_to_string(unsigned int remain_time,
97 char *text_display, char *text_read,
98 int size_display, int size_read);
100 void _bt_util_free_device_uuids(bt_dev_t *item);
102 void _bt_util_free_device_item(bt_dev_t *item);
104 gboolean _bt_util_is_space_str(const char *name_str);
106 void _bt_util_max_len_reached_cb(void *data, Evas_Object *obj,
109 Eina_Bool _bt_timer_change_discoverable_mode(void *data);
111 char *_bt_util_vcard_create_from_id(int id, bool my_profile, const char *working_dir);
113 char *_bt_util_vcard_create_from_id_list(const int *id_list, int count, const char *working_dir, volatile bool *cancel);
115 int _bt_util_create_dpm_context(void *ug_data);
117 void _bt_util_destroy_dpm_context(void *ug_data);
119 gboolean _bt_util_is_dpm_restricted(void *handle);
122 _PROFILE_UNKNOWN = 0,
123 _PROFILE_MOBILE = 0x1,
124 _PROFILE_WEARABLE = 0x2,
128 _PROFILE_COMMON = 0x20,
130 extern tizen_profile_t _get_tizen_profile();
131 #define TIZEN_PROFILE_TV ((_get_tizen_profile()) == _PROFILE_TV)
132 #define TIZEN_HID ((_get_tizen_profile()) & (_PROFILE_MOBILE | _PROFILE_COMMON))
133 #define TIZEN_COMMON ((_get_tizen_profile()) == _PROFILE_COMMON)
134 //#define TIZEN_FEATURE_BT_HOG ((_get_tizen_profile() == _PROFILE_MOBILE))
135 #define TIZEN_FEATURE_BT_HOG (0)
140 #endif /* __BT_UTIL_H__ */