MT2523 API Reference  LinkIt SDK v4
bt_device_manager.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2016 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef __BT_DEVICE_MANAGER_H__
36 #define __BT_DEVICE_MANAGER_H__
37 
73 #include <stdbool.h>
74 #include <stdint.h>
75 #include <stdio.h>
76 #include "bt_type.h"
77 #include "bt_gap.h"
78 
79 #ifdef __cplusplus
80 extern "C"
81 {
82 #endif /* __cplusplus */
83 
90 #define BT_DEVICE_MANAGER_MAX_PAIRED_NUM 5
92 #define BT_DEVICE_MANAGER_PAIRED_ADD 0x00
93 #define BT_DEVICE_MANAGER_PAIRED_UNPAIR 0x01
94 #define BT_DEVICE_MANAGER_PAIRED_KEY_MISS 0x02
95 #define BT_DEVICE_MANAGER_PAIRED_LIST_FULL 0x03
96 #define BT_DEVICE_MANAGER_PAIRED_UNPAIR_ALL 0x04
97 typedef uint8_t bt_device_manager_paired_event_t;
112 typedef struct {
116 
125 void bt_device_manager_init(void);
126 
132 
141 
149 
157 
164 
172 #ifdef __cplusplus
173 }
174 #endif
175 
176 #endif /* __BT_DEVICE_MANAGER_H__ */
177 
void bt_device_manager_init(void)
This function initializes the Bluetooth device manager.
uint8_t const * bt_bd_addr_ptr_t
A pointer to the bt_bd_addr_t.
Definition: bt_type.h:181
bt_status_t bt_device_manager_delete_paired_device(bt_bd_addr_ptr_t address)
This function unpairs an already paired device.
#define BT_GAP_MAX_DEVICE_NAME_LENGTH
The maximum length of the device name, including null-ending char.
Definition: bt_gap.h:332
bt_status_t bt_device_manager_unpair_all(void)
This function unpairs all paired devices.
bool bt_device_manager_is_paired(bt_bd_addr_ptr_t address)
This function gets the status of a device.
uint8_t bt_bd_addr_t[6]
Address type, defined in Bluetooth core specification version 4.2.
Definition: bt_type.h:180
bt_bd_addr_t address
Address of the paired device.
Definition: bt_device_manager.h:113
int32_t bt_status_t
Define the status type, returned from the APIs, and defined as BT_STATUS_XXX.
Definition: bt_type.h:173
uint32_t bt_device_manager_get_paired_number(void)
This function gets the number of the paired devices.
This structure defines the information about the paired device.
Definition: bt_device_manager.h:112
void bt_device_manager_get_paired_list(bt_device_manager_paired_infomation_t *info, uint32_t *read_number)
This function gets the paired device list.