1 /* 2 * Copyright (c) 2018 Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /* Max settings key length (with all components) */ 8 #define BT_SETTINGS_KEY_MAX 36 9 10 /* Base64-encoded string buffer size of in_size bytes */ 11 #define BT_SETTINGS_SIZE(in_size) ((((((in_size) - 1) / 3) * 4) + 4) + 1) 12 13 /* Helpers for keys containing a bdaddr */ 14 void bt_settings_encode_key(char *path, size_t path_size, const char *subsys, 15 const bt_addr_le_t *addr, const char *key); 16 int bt_settings_decode_key(const char *key, bt_addr_le_t *addr); 17 18 void bt_settings_save_id(void); 19 20 int bt_settings_init(void); 21