bluez/src/shared/hciemu.h

52 lines
1.6 KiB
C
Raw Normal View History

2012-12-28 16:04:56 +08:00
/*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2012 Intel Corporation. All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
2012-12-28 16:04:56 +08:00
*
* This library is distributed in the hope that it will be useful,
2012-12-28 16:04:56 +08:00
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
2012-12-28 16:04:56 +08:00
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
2012-12-28 16:04:56 +08:00
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <stdbool.h>
#include <stdint.h>
2012-12-28 16:04:56 +08:00
struct hciemu;
enum hciemu_type {
HCIEMU_TYPE_BREDRLE,
HCIEMU_TYPE_BREDR,
HCIEMU_TYPE_LE,
};
struct hciemu *hciemu_new(enum hciemu_type type);
2012-12-28 16:04:56 +08:00
struct hciemu *hciemu_ref(struct hciemu *hciemu);
void hciemu_unref(struct hciemu *hciemu);
typedef void (*hciemu_scan_enable_cb)(uint8_t status, void *user_data);
void hciemu_client_scan_enable(struct hciemu *hciemu, uint8_t scan,
hciemu_scan_enable_cb cb, void *user_data);
2012-12-28 16:04:56 +08:00
const char *hciemu_get_address(struct hciemu *hciemu);
typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data,
uint8_t len, void *user_data);
bool hciemu_add_master_post_command_hook(struct hciemu *hciemu,
hciemu_command_func_t function, void *user_data);