xref: /btstack/src/classic/btstack_link_key_db_memory.h (revision 2fca4dad957cd7b88f4657ed51e89c12615dda72)
1a98592bcSMatthias Ringwald /*
2a98592bcSMatthias Ringwald  * Copyright (C) 2014 BlueKitchen GmbH
3a98592bcSMatthias Ringwald  *
4a98592bcSMatthias Ringwald  * Redistribution and use in source and binary forms, with or without
5a98592bcSMatthias Ringwald  * modification, are permitted provided that the following conditions
6a98592bcSMatthias Ringwald  * are met:
7a98592bcSMatthias Ringwald  *
8a98592bcSMatthias Ringwald  * 1. Redistributions of source code must retain the above copyright
9a98592bcSMatthias Ringwald  *    notice, this list of conditions and the following disclaimer.
10a98592bcSMatthias Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
11a98592bcSMatthias Ringwald  *    notice, this list of conditions and the following disclaimer in the
12a98592bcSMatthias Ringwald  *    documentation and/or other materials provided with the distribution.
13a98592bcSMatthias Ringwald  * 3. Neither the name of the copyright holders nor the names of
14a98592bcSMatthias Ringwald  *    contributors may be used to endorse or promote products derived
15a98592bcSMatthias Ringwald  *    from this software without specific prior written permission.
16a98592bcSMatthias Ringwald  * 4. Any redistribution, use, or modification is done solely for
17a98592bcSMatthias Ringwald  *    personal benefit and not for any commercial purpose or for
18a98592bcSMatthias Ringwald  *    monetary gain.
19a98592bcSMatthias Ringwald  *
20a98592bcSMatthias Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21a98592bcSMatthias Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22a98592bcSMatthias Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23*2fca4dadSMilanka Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN
24*2fca4dadSMilanka Ringwald  * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25a98592bcSMatthias Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26a98592bcSMatthias Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27a98592bcSMatthias Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28a98592bcSMatthias Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29a98592bcSMatthias Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30a98592bcSMatthias Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31a98592bcSMatthias Ringwald  * SUCH DAMAGE.
32a98592bcSMatthias Ringwald  *
33a98592bcSMatthias Ringwald  * Please inquire about commercial licensing options at
34a98592bcSMatthias Ringwald  * [email protected]
35a98592bcSMatthias Ringwald  *
36a98592bcSMatthias Ringwald  */
37a98592bcSMatthias Ringwald 
38a98592bcSMatthias Ringwald /**
39fe5a6c4eSMilanka Ringwald  * @title In-Memory Link Key Storage
40fe5a6c4eSMilanka Ringwald  *
41a98592bcSMatthias Ringwald  */
42a98592bcSMatthias Ringwald 
4380e33422SMatthias Ringwald #ifndef BTSTACK_LINK_KEY_DB_MEMORY_H
4480e33422SMatthias Ringwald #define BTSTACK_LINK_KEY_DB_MEMORY_H
45a98592bcSMatthias Ringwald 
46a98592bcSMatthias Ringwald #include "btstack_link_key_db.h"
47a98592bcSMatthias Ringwald #include "btstack_linked_list.h"
48a98592bcSMatthias Ringwald 
49a98592bcSMatthias Ringwald #if defined __cplusplus
50a98592bcSMatthias Ringwald extern "C" {
51a98592bcSMatthias Ringwald #endif
52a98592bcSMatthias Ringwald 
53fe5a6c4eSMilanka Ringwald /* API_START */
54fe5a6c4eSMilanka Ringwald 
55a98592bcSMatthias Ringwald /*
56a98592bcSMatthias Ringwald  * @brief
57a98592bcSMatthias Ringwald  */
58a98592bcSMatthias Ringwald const btstack_link_key_db_t * btstack_link_key_db_memory_instance(void);
59a98592bcSMatthias Ringwald 
60a98592bcSMatthias Ringwald typedef struct {
61a98592bcSMatthias Ringwald     btstack_linked_item_t item;
62a98592bcSMatthias Ringwald     bd_addr_t bd_addr;
63a98592bcSMatthias Ringwald     link_key_t link_key;
64a98592bcSMatthias Ringwald     link_key_type_t link_key_type;
65d56ad4f6SMatthias Ringwald } btstack_link_key_db_memory_entry_t;
66a98592bcSMatthias Ringwald 
67a98592bcSMatthias Ringwald /* API_END */
68a98592bcSMatthias Ringwald 
69a98592bcSMatthias Ringwald #if defined __cplusplus
70a98592bcSMatthias Ringwald }
71a98592bcSMatthias Ringwald #endif
72a98592bcSMatthias Ringwald 
7380e33422SMatthias Ringwald #endif // BTSTACK_LINK_KEY_DB_MEMORY_H
74