3 * BlueZ - Bluetooth protocol stack for Linux
5 * Copyright (C) 2018 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.
22 #define MESH_IO_TX_COUNT_UNLIMITED 0
25 MESH_IO_TYPE_NONE = 0,
29 enum mesh_io_timing_type {
30 MESH_IO_TIMING_TYPE_GENERAL = 1,
31 MESH_IO_TIMING_TYPE_POLL,
32 MESH_IO_TIMING_TYPE_POLL_RSP
35 struct mesh_io_recv_info {
42 #ifdef TIZEN_FEATURE_BLUEZ_MODIFY
49 struct mesh_io_send_info {
50 enum mesh_io_timing_type type;
60 uint16_t scan_duration;
62 uint8_t filter_ids[2];
76 uint8_t max_num_filters;
77 uint8_t window_accuracy;
80 typedef void (*mesh_io_recv_func_t)(void *user_data,
81 struct mesh_io_recv_info *info,
82 const uint8_t *data, uint16_t len);
84 typedef void (*mesh_io_recv_ext_func_t)(void *user_data,
85 struct mesh_io_recv_info *info,
86 const uint8_t *data, uint16_t len,
89 typedef void (*mesh_io_ready_func_t)(void *user_data, bool result);
91 struct mesh_io *mesh_io_new(enum mesh_io_type type, void *opts,
92 mesh_io_ready_func_t cb, void *user_data);
93 void mesh_io_destroy(struct mesh_io *io);
95 bool mesh_io_get_caps(struct mesh_io *io, struct mesh_io_caps *caps);
97 bool mesh_io_register_recv_cb(struct mesh_io *io, const uint8_t *filter,
98 uint8_t len, mesh_io_recv_func_t cb,
101 bool mesh_io_deregister_recv_cb(struct mesh_io *io, const uint8_t *filter,
104 bool mesh_io_send(struct mesh_io *io, struct mesh_io_send_info *info,
105 const uint8_t *data, uint16_t len);
106 bool mesh_io_send_cancel(struct mesh_io *io, const uint8_t *pattern,