xref: /nrf52832-nimble/packages/NimBLE-latest/nimble/host/store/config/src/ble_store_config_priv.h (revision 042d53a763ad75cb1465103098bb88c245d95138)
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements.  See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership.  The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License.  You may obtain a copy of the License at
9  *
10  *  http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied.  See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
20 #ifndef H_BLE_STORE_CONFIG_PRIV_
21 #define H_BLE_STORE_CONFIG_PRIV_
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 extern struct ble_store_value_sec
28     ble_store_config_our_secs[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
29 extern int ble_store_config_num_our_secs;
30 
31 extern struct ble_store_value_sec
32     ble_store_config_peer_secs[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
33 extern int ble_store_config_num_peer_secs;
34 
35 extern struct ble_store_value_cccd
36     ble_store_config_cccds[MYNEWT_VAL(BLE_STORE_MAX_CCCDS)];
37 extern int ble_store_config_num_cccds;
38 
39 #if MYNEWT_VAL(BLE_STORE_CONFIG_PERSIST)
40 
41 int ble_store_config_persist_our_secs(void);
42 int ble_store_config_persist_peer_secs(void);
43 int ble_store_config_persist_cccds(void);
44 void ble_store_config_conf_init(void);
45 
46 #else
47 
ble_store_config_persist_our_secs(void)48 static inline int ble_store_config_persist_our_secs(void)   { return 0; }
ble_store_config_persist_peer_secs(void)49 static inline int ble_store_config_persist_peer_secs(void)  { return 0; }
ble_store_config_persist_cccds(void)50 static inline int ble_store_config_persist_cccds(void)      { return 0; }
ble_store_config_conf_init(void)51 static inline void ble_store_config_conf_init(void)         { }
52 
53 #endif /* MYNEWT_VAL(BLE_STORE_CONFIG_PERSIST) */
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif
60