1458bf4e8S[email protected] /* 2458bf4e8S[email protected] * Copyright (C) 2011-2012 BlueKitchen GmbH 3458bf4e8S[email protected] * 4458bf4e8S[email protected] * Redistribution and use in source and binary forms, with or without 5458bf4e8S[email protected] * modification, are permitted provided that the following conditions 6458bf4e8S[email protected] * are met: 7458bf4e8S[email protected] * 8458bf4e8S[email protected] * 1. Redistributions of source code must retain the above copyright 9458bf4e8S[email protected] * notice, this list of conditions and the following disclaimer. 10458bf4e8S[email protected] * 2. Redistributions in binary form must reproduce the above copyright 11458bf4e8S[email protected] * notice, this list of conditions and the following disclaimer in the 12458bf4e8S[email protected] * documentation and/or other materials provided with the distribution. 13458bf4e8S[email protected] * 3. Neither the name of the copyright holders nor the names of 14458bf4e8S[email protected] * contributors may be used to endorse or promote products derived 15458bf4e8S[email protected] * from this software without specific prior written permission. 16458bf4e8S[email protected] * 4. Any redistribution, use, or modification is done solely for 17458bf4e8S[email protected] * personal benefit and not for any commercial purpose or for 18458bf4e8S[email protected] * monetary gain. 19458bf4e8S[email protected] * 20458bf4e8S[email protected] * THIS SOFTWARE IS PROVIDED BY MATTHIAS RINGWALD AND CONTRIBUTORS 21458bf4e8S[email protected] * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22458bf4e8S[email protected] * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23458bf4e8S[email protected] * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24458bf4e8S[email protected] * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25458bf4e8S[email protected] * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26458bf4e8S[email protected] * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27458bf4e8S[email protected] * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28458bf4e8S[email protected] * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29458bf4e8S[email protected] * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30458bf4e8S[email protected] * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31458bf4e8S[email protected] * SUCH DAMAGE. 32458bf4e8S[email protected] * 33458bf4e8S[email protected] * Please inquire about commercial licensing options at [email protected] 34458bf4e8S[email protected] * 35458bf4e8S[email protected] */ 36458bf4e8S[email protected] 37458bf4e8S[email protected] #pragma once 38458bf4e8S[email protected] 39458bf4e8S[email protected] #if defined __cplusplus 40458bf4e8S[email protected] extern "C" { 41458bf4e8S[email protected] #endif 42458bf4e8S[email protected] 43*cb230b9dS[email protected] typedef enum { 44*cb230b9dS[email protected] 45*cb230b9dS[email protected] // MITM protection not required 46*cb230b9dS[email protected] // No encryption required 47*cb230b9dS[email protected] // No user interaction required 48*cb230b9dS[email protected] LEVEL_0 = 0, 49*cb230b9dS[email protected] 50*cb230b9dS[email protected] // MITM protection not required 51*cb230b9dS[email protected] // No encryption required 52*cb230b9dS[email protected] // Minimal user interaction desired 53*cb230b9dS[email protected] LEVEL_1, 54*cb230b9dS[email protected] 55*cb230b9dS[email protected] // MITM protection not required 56*cb230b9dS[email protected] // Encryption required 57*cb230b9dS[email protected] LEVEL_2, 58*cb230b9dS[email protected] 59*cb230b9dS[email protected] // MITM protection required 60*cb230b9dS[email protected] // Encryption required 61*cb230b9dS[email protected] // User interaction acceptable 62*cb230b9dS[email protected] LEVEL_3, 63*cb230b9dS[email protected] 64*cb230b9dS[email protected] // MITM protection required 65*cb230b9dS[email protected] // Encryption required 66*cb230b9dS[email protected] // 128-bit equivalent strength for link and encryption keys required 67*cb230b9dS[email protected] // User interaction acceptable 68*cb230b9dS[email protected] LEVEL_4, 69*cb230b9dS[email protected] } gap_security_level_t; 70*cb230b9dS[email protected] 71458bf4e8S[email protected] /** 72458bf4e8S[email protected] * @bbrief enable/disable bonding. default is enabled 73458bf4e8S[email protected] * @praram enabled 74458bf4e8S[email protected] */ 75458bf4e8S[email protected] void gap_set_bondable_mode(int enabled); 76458bf4e8S[email protected] 77458bf4e8S[email protected] #if defined __cplusplus 78458bf4e8S[email protected] } 79458bf4e8S[email protected] #endif 80458bf4e8S[email protected] 81