3 * BlueZ - Bluetooth protocol stack for Linux
5 * Copyright (C) 2012-2014 Intel Corporation. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
36 enum hciemu_hook_type {
43 struct hciemu *hciemu_new(enum hciemu_type type);
45 struct hciemu *hciemu_ref(struct hciemu *hciemu);
46 void hciemu_unref(struct hciemu *hciemu);
48 struct bthost *hciemu_client_get_host(struct hciemu *hciemu);
50 const char *hciemu_get_address(struct hciemu *hciemu);
51 uint8_t *hciemu_get_features(struct hciemu *hciemu);
53 const uint8_t *hciemu_get_master_bdaddr(struct hciemu *hciemu);
54 const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu);
56 uint8_t hciemu_get_master_scan_enable(struct hciemu *hciemu);
58 uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu);
60 void hciemu_set_master_le_states(struct hciemu *hciemu,
61 const uint8_t *le_states);
63 typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data,
64 uint8_t len, void *user_data);
66 typedef bool (*hciemu_hook_func_t)(const void *data, uint16_t len,
69 bool hciemu_add_master_post_command_hook(struct hciemu *hciemu,
70 hciemu_command_func_t function, void *user_data);
72 bool hciemu_clear_master_post_command_hooks(struct hciemu *hciemu);
74 int hciemu_add_hook(struct hciemu *hciemu, enum hciemu_hook_type type,
75 uint16_t opcode, hciemu_hook_func_t function,
78 bool hciemu_del_hook(struct hciemu *hciemu, enum hciemu_hook_type type,