2018-04-27 03:05:26 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2018-04-28 01:01:51 +08:00
|
|
|
/* Max settings key length (with all components) */
|
|
|
|
#define BT_SETTINGS_KEY_MAX 36
|
|
|
|
|
|
|
|
/* Base64-encoded string buffer size of in_size bytes */
|
|
|
|
#define BT_SETTINGS_SIZE(in_size) ((((((in_size) - 1) / 3) * 4) + 4) + 1)
|
|
|
|
|
|
|
|
/* Helpers for keys containing a bdaddr */
|
|
|
|
void bt_settings_encode_key(char *path, size_t path_size, const char *subsys,
|
2020-02-14 03:14:54 +08:00
|
|
|
const bt_addr_le_t *addr, const char *key);
|
2019-06-15 00:23:39 +08:00
|
|
|
int bt_settings_decode_key(const char *key, bt_addr_le_t *addr);
|
2018-04-28 01:01:51 +08:00
|
|
|
|
2018-07-16 19:39:06 +08:00
|
|
|
void bt_settings_save_id(void);
|
|
|
|
|
2018-04-27 03:05:26 +08:00
|
|
|
int bt_settings_init(void);
|