Bluetooth: Mesh: Use a unified send callback also for public API

There's no need for callback exposed in the public API to be something
different than what's used internally. In fact this would just
complicate things. This patch exposes the internal callback under a
bt_mesh_adv_cb name and uses it throughout the mesh stack.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-11-17 15:19:51 +02:00 committed by Johan Hedberg
commit 4bf045e282
12 changed files with 63 additions and 63 deletions

View file

@ -267,7 +267,10 @@ struct bt_mesh_model {
void *user_data;
};
typedef void (*bt_mesh_cb_t)(int err, void *cb_data);
struct bt_mesh_send_cb {
void (*start)(u16_t duration, int err, void *cb_data);
void (*end)(int err, void *cb_data);
};
void bt_mesh_model_msg_init(struct net_buf_simple *msg, u32_t opcode);
@ -290,7 +293,8 @@ void bt_mesh_model_msg_init(struct net_buf_simple *msg, u32_t opcode);
*/
int bt_mesh_model_send(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct net_buf_simple *msg, bt_mesh_cb_t cb,
struct net_buf_simple *msg,
const struct bt_mesh_send_cb *cb,
void *cb_data);
/**