summaryrefslogtreecommitdiff
path: root/include/bt-util.h
blob: f95dd0b7cedf61386468df8511406df03ee732f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
* ug-bluetooth-efl
*
* Copyright 2012 Samsung Electronics Co., Ltd
*
* Contact: Hocheol Seo <hocheol.seo@samsung.com>
*           GirishAshok Joshi <girish.joshi@samsung.com>
*           DoHyun Pyun <dh79.pyun@samsung.com>
*
* Licensed under the Flora License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.tizenopensource.org/license
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#ifndef __BT_UTIL_H__
#define __BT_UTIL_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <glib.h>
#include <bundle.h>
#include <Elementary.h>

#include "bt-type-define.h"

/* Major Device Mask */
#define MISCELLANEOUS_MAJOR_DEVICE_MASK (0x000000)
#define COMPUTER_MAJOR_DEVICE_MASK (0x000100)
#define PHONE_MAJOR_DEVICE_MASK (0x000200)
#define LAN_MAJOR_DEVICE_MASK (0x000300)
#define AV_MAJOR_DEVICE_MASK (0x000400)
#define PERIPHERAL_MAJOR_DEVICE_MASK (0x000500)
#define IMAGING_MAJOR_DEVICE_MASK (0x000600)
#define WEARABLE_MAJOR_DEVICE_MASK (0x000700)
#define TOY_MAJOR_DEVICE_MASK (0x000800)
#define UNCLASSIFIED_MAJOR_DEVICE_MASK (0x001F00)
#define OBJECT_TRANSFER_MAJOR_SERVICE_MASK (0x100000)

gboolean _bt_util_update_class_of_device_by_service_list(bt_service_class_t service_list,
						 bt_major_class_t *major_class,
						 bt_minor_class_t *minor_class);

void _bt_util_set_value(const char *req, unsigned int *search_type,
			unsigned int *op_mode);

gboolean _bt_util_store_get_value(const char *key,
			      bt_store_type_t store_type,
			      unsigned int size, void *value);

void _bt_util_launch_no_event(void *data, void *obj, void *event);

void _bt_util_set_list_disabled(Evas_Object *genlist, Eina_Bool disable);

gboolean _bt_util_is_profile_connected(int connected_type, unsigned char *addr);

int _bt_util_check_any_profile_connected(bt_dev_t *dev);

void _bt_util_set_phone_name(void);

int _bt_util_get_phone_name(char *phone_name, int size);

char * _bt_util_get_timeout_string(int timeout);

int _bt_util_get_timeout_value(int index);

int _bt_util_get_timeout_index(int timeout);

gboolean _bt_util_is_battery_low(void);

void _bt_util_addr_type_to_addr_string(char *address,
					       unsigned char *addr);

void _bt_util_addr_type_to_addr_result_string(char *address,
					       unsigned char *addr);

void _bt_util_addr_type_to_addr_net_string(char *address,
					       unsigned char *addr);

void _bt_util_addr_string_to_addr_type(unsigned char *addr,
						  const char *address);

void _bt_util_convert_time_to_string(unsigned int remain_time,
					char *text_display, char *text_read,
					int size_display, int size_read);

void _bt_util_free_device_uuids(bt_dev_t *item);

void _bt_util_free_device_item(bt_dev_t *item);

gboolean _bt_util_is_space_str(const char *name_str);

void _bt_util_max_len_reached_cb(void *data, Evas_Object *obj,
					void *event_info);

#ifndef TIZEN_TV
char *_bt_util_vcard_create_from_id(int id, bool my_profile, const char *working_dir);

char *_bt_util_vcard_create_from_id_list(const int *id_list, int count, const char *working_dir, volatile bool *cancel);
#endif


#ifdef __cplusplus
}
#endif
#endif				/* __BT_UTIL_H__ */