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