bms.h File Reference

Bond Management Service API. More...

#include "gr_includes.h"
+ Include dependency graph for bms.h:

Go to the source code of this file.

Classes

struct  bms_init_t
 BMS Service init stucture. More...
 

Macros

#define BMS_CONNECTION_MAX   10
 Maximum number of BMS connections.The value is configurable. More...
 
#define BMS_ERROR_OP_CODE_NOT_SUPPORTED   0x80
 Error code: Response if unsupported Op Code is received. More...
 
#define BMS_ERROR_OPERATION_FAILED   0x81
 Error code: Response if unable to complete a procedure for any reason. More...
 
#define BMS_AUTH_CODE_LEN_MAX   12
 
#define BMS_FEAT_DEL_BONDS_REQ_DEV_BR_LE   (0x01 << 0)
 Delete bond of the requesting device (BR/EDR and LE). More...
 
#define BMS_FEAT_DEL_BONDS_REQ_DEV_BR_LE_AUTH_CODE   (0x01 << 1)
 Delete bond of the requesting device (BR/EDR and LE) with an authorization code. More...
 
#define BMS_FEAT_DEL_BONDS_REQ_DEV_BR   (0x01 << 2)
 Delete bond of the requesting device (BR/EDR transport only). More...
 
#define BMS_FEAT_DEL_BONDS_REQ_DEV_BR_AUTH_CODE   (0x01 << 3)
 Delete bond of the requesting device (BR/EDR transport only) with an authorization code. More...
 
#define BMS_FEAT_DEL_BONDS_REQ_DEV_LE   (0x01 << 4)
 Delete bond of the requesting device (LE transport only). More...
 
#define BMS_FEAT_DEL_BONDS_REQ_DEV_LE_AUTH_CODE   (0x01 << 5)
 Delete bond of the requesting device (LE transport only) with an authorization code. More...
 
#define BMS_FEAT_DEL_ALL_BONDS_BR_LE   (0x01 << 6)
 Delete all bonds on the device (BR/EDR and LE). More...
 
#define BMS_FEAT_DEL_ALL_BONDS_BR_LE_AUTH_CODE   (0x01 << 7)
 Delete all bonds on the device (BR/EDR and LE) with an authorization code. More...
 
#define BMS_FEAT_DEL_ALL_BONDS_BR   (0x01 << 8)
 Delete all bonds on the device (BR/EDR transport only). More...
 
#define BMS_FEAT_DEL_ALL_BONDS_BR_AUTH_CODE   (0x01 << 9)
 Delete all bonds on the device (BR/EDR transport only) with an authorization code. More...
 
#define BMS_FEAT_DEL_ALL_BONDS_LE   (0x01 << 10)
 Delete all bonds on the device (LE transport only). More...
 
#define BMS_FEAT_DEL_ALL_BONDS_LE_AUTH_CODE   (0x01 << 11)
 Delete all bonds on the device (LE transport only) with an authorization code. More...
 
#define BMS_FEAT_DEL_ALL_BUT_REQ_DEV_BR_LE   (0x01 << 12)
 Delete all bonds on the device except for the bond of the requesting device (BR/EDR and LE). More...
 
#define BMS_FEAT_DEL_ALL_BUT_REQ_DEV_BR_LE_AUTH_CODE   (0x01 << 13)
 Delete all bonds on the device except for the bond of the requesting device (BR/EDR and LE) with an authorization code. More...
 
#define BMS_FEAT_DEL_ALL_BUT_REQ_DEV_BR   (0x01 << 14)
 Delete all bonds on the device except for the bond of the requesting device (BR/EDR transport only). More...
 
#define BMS_FEAT_DEL_ALL_BUT_REQ_DEV_BR_AUTH_CODE   (0x01 << 15)
 Delete all bonds on the device except for the bond of the requesting device (BR/EDR transport only) with an authorization code. More...
 
#define BMS_FEAT_DEL_ALL_BUT_REQ_DEV_LE   (0x01 << 16)
 Delete all bonds on the device except for the bond of the requesting device (LE transport only). More...
 
#define BMS_FEAT_DEL_ALL_BUT_REQ_DEV_LE_AUTH_CODE   (0x01 << 17)
 Delete all bonds on the device except for the bond of the requesting device (LE transport only) with an authorization code. More...
 
#define BMS_FEAT_FULL   (0x3ffff)
 All feature Supported. More...
 

Typedefs

typedef void(* bms_cccd_change_handler_t) (uint8_t conn_idx, bms_cccd_status_t cccd_status)
 BMS Service CCCD change handler type. More...
 

Enumerations

enum  bms_cccd_status_t { BMS_CCCD_STATUS_FEATURE_ENABLED, BMS_CCCD_STATUS_FEATURE_DISABLED }
 BMS Service CCCD status. More...
 
enum  bms_op_code_t {
  BMS_OP_CODE_DEL_BOND_REQ_DEVICE_BR_LE = 0x01, BMS_OP_CODE_DEL_BOND_REQ_DEVICE_BR_ONLY = 0x02, BMS_OP_CODE_DEL_BOND_REQ_DEVICE_LE_ONLY = 0x03, BMS_OP_CODE_DEL_ALL_BONDS_ON_SERVER_BR_LE = 0x04,
  BMS_OP_CODE_DEL_ALL_BONDS_ON_SERVER_BR_ONLY = 0x05, BMS_OP_CODE_DEL_ALL_BONDS_ON_SERVER_LE_ONLY = 0x06, BMS_OP_CODE_DEL_ALL_BUT_ACTIVE_BOND_BR_LE = 0x07, BMS_OP_CODE_DEL_ALL_BUT_ACTIVE_BOND_BR_ONLY = 0x08,
  BMS_OP_CODE_DEL_ALL_BUT_ACTIVE_BOND_LE_ONLY = 0x09, BMS_OP_CODE_NONE = 0xFF
}
 Bond Management Control Point opcodes. More...
 

Functions

sdk_err_t bms_service_init (bms_init_t *p_bms_init)
 Initialize a Bond Management Service instance and add in the DB. More...
 
sdk_err_t bms_feature_update (uint32_t feature)
 Bond Management Service feature update. More...
 

Detailed Description

Bond Management Service API.

Attention
Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file bms.h.