Diff between 640236664966eed0e6bc7126044742ef4a5e3237 and c21c706a50c50ab97ad266e9e33044eba4f26e04

Changed Files

File Additions Deletions Status
src/shared/gatt-client.c +17 -0 modified
src/shared/gatt-client.h +3 -0 modified

Full Patch

diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index a7c52dc..5a3939b 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -2644,3 +2644,20 @@ bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
 	complete_unregister_notify(notify_data);
 	return true;
 }
+
+bool bt_gatt_client_set_sec_level(struct bt_gatt_client *client,
+								int level)
+{
+	if (!client)
+		return false;
+
+	return bt_att_set_sec_level(client->att, level);
+}
+
+int bt_gatt_client_get_sec_level(struct bt_gatt_client *client)
+{
+	if (!client)
+		return -1;
+
+	return bt_att_get_sec_level(client->att);
+}
diff --git a/src/shared/gatt-client.h b/src/shared/gatt-client.h
index b84fa13..d4358cf 100644
--- a/src/shared/gatt-client.h
+++ b/src/shared/gatt-client.h
@@ -117,3 +117,6 @@ unsigned int bt_gatt_client_register_notify(struct bt_gatt_client *client,
 				bt_gatt_client_destroy_func_t destroy);
 bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client,
 							unsigned int id);
+
+bool bt_gatt_client_set_sec_level(struct bt_gatt_client *client, int level);
+int bt_gatt_client_get_sec_level(struct bt_gatt_client *client);