Zephyr Project API 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_gatt_authorization_cb Struct Reference

GATT authorization callback structure. More...

#include <gatt.h>

Data Fields

bool(* read_authorize )(struct bt_conn *conn, const struct bt_gatt_attr *attr)
 Authorize the GATT read operation.
 
bool(* write_authorize )(struct bt_conn *conn, const struct bt_gatt_attr *attr)
 Authorize the GATT write operation.
 

Detailed Description

GATT authorization callback structure.

Field Documentation

◆ read_authorize

bool(* bt_gatt_authorization_cb::read_authorize) (struct bt_conn *conn, const struct bt_gatt_attr *attr)

Authorize the GATT read operation.

This callback allows the application to authorize the GATT read operation for the attribute that is being read.

Parameters
connConnection object.
attrThe attribute that is being read.
Return values
trueAuthorize the operation and allow it to execute.
falseReject the operation and prevent it from executing.

◆ write_authorize

bool(* bt_gatt_authorization_cb::write_authorize) (struct bt_conn *conn, const struct bt_gatt_attr *attr)

Authorize the GATT write operation.

This callback allows the application to authorize the GATT write operation for the attribute that is being written.

Parameters
connConnection object.
attrThe attribute that is being written.
Return values
trueAuthorize the operation and allow it to execute.
falseReject the operation and prevent it from executing.

The documentation for this struct was generated from the following file: