MT2523 API Reference  LinkIt SDK v4
bt_pbapc.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_PBAPC_H__
36 #define __BT_PBAPC_H__
37 
212 #include "bt_type.h"
213 #include "bt_system.h"
214 #include "bt_debug.h"
215 #include "bt_platform.h"
216 
225 #define BT_PBAPC_CONNECT_CNF (BT_MODULE_PBAPC|0x01)
226 #define BT_PBAPC_GET_NUMBER_OF_PHOENBOOK_OBJECTS_IND (BT_MODULE_PBAPC|0x02)
227 #define BT_PBAPC_GET_NUMBER_OF_PHOENBOOK_OBJECTS_CNF (BT_MODULE_PBAPC|0x03)
228 #define BT_PBAPC_GET_PHOENBOOK_OBJECTS_IND (BT_MODULE_PBAPC|0x04)
229 #define BT_PBAPC_GET_PHONEBOOK_OBJECTS_CNF (BT_MODULE_PBAPC|0x05)
230 #define BT_PBAPC_GET_CALLER_NAME_IND (BT_MODULE_PBAPC|0x06)
231 #define BT_PBAPC_GET_CALLER_NAME_CNF (BT_MODULE_PBAPC|0x07)
232 #define BT_PBAPC_DISCONNECT_IND (BT_MODULE_PBAPC|0x08)
236 typedef uint8_t bt_pbapc_phonebook_type_t;
237 #define BT_PBAPC_MISSED_CALL_TYPE 0x00
238 #define BT_PBAPC_POHONEBOOK_TYPE 0x01
251 typedef struct {
252  uint32_t handle;
254 
258 typedef struct {
259  uint32_t handle;
261 
265 typedef struct {
266  uint32_t handle;
268 
272 typedef struct {
273  uint32_t handle;
274  uint16_t number;
275  uint8_t new_missed_call;
280 typedef struct {
281  uint32_t handle;
283 
287 typedef struct {
288  uint8_t number_length;
289  uint8_t name_length;
290  uint8_t *number;
291  uint8_t *name;
293 
297 typedef struct {
298  uint32_t handle;
301 
305 typedef struct {
306  uint8_t length;
307  uint8_t *name;
309 
313 typedef struct {
314  uint32_t handle;
316 
320 typedef struct {
321  uint32_t handle;
324 
330 BT_EXTERN_C_BEGIN
341 bt_status_t bt_pbapc_connect(uint32_t *handle, const bt_bd_addr_t *address);
342 
353 
364 bt_status_t bt_pbapc_get_phonebook_objects(uint32_t handle, uint16_t offset, bt_pbapc_phonebook_type_t type);
365 
375 bt_status_t bt_pbapc_get_caller_name_by_number(uint32_t handle, uint8_t *number);
376 
386 bt_status_t bt_pbapc_pull_vcard_entry(uint32_t handle, uint8_t index);
387 
396 bt_status_t bt_pbapc_disconnect(uint32_t handle);
397 
398 
399 BT_EXTERN_C_END
405 #endif
406 
This structure defines the name and number of a missed call.
Definition: bt_pbapc.h:287
uint8_t number_length
The length of the number.
Definition: bt_pbapc.h:288
uint32_t handle
PBAPC handle.
Definition: bt_pbapc.h:252
This structure defines the data type of the parameter in the callback for BT_PBAPC_CONNECT_CNF event...
Definition: bt_pbapc.h:251
uint8_t * number
The content of the number.
Definition: bt_pbapc.h:290
bt_status_t bt_pbapc_disconnect(uint32_t handle)
This function disconnects from the specified remote device.
uint32_t handle
PBAPC handle.
Definition: bt_pbapc.h:321
uint8_t new_missed_call
Unread missed call number.
Definition: bt_pbapc.h:275
bt_status_t bt_pbapc_get_num_of_phonebook_objects(uint32_t handle, bt_pbapc_phonebook_type_t type)
This function gets the number of phonebook objects of type Missed Calls History or Main Phonebook of ...
uint8_t * name
The content of the name.
Definition: bt_pbapc.h:291
This structure defines the data type of the parameter in the callback for BT_PBAPC_DISCONNECT_IND eve...
Definition: bt_pbapc.h:258
uint16_t number
The number of Phonebook objects.
Definition: bt_pbapc.h:274
This structure defines the data type of the parameter in the callback for BT_PBAPC_GET_CALLER_NAME_CN...
Definition: bt_pbapc.h:313
uint32_t handle
PBAPC handle.
Definition: bt_pbapc.h:273
This structure defines the data type of the parameter in the callback for BT_PBAPC_GET_CALLER_NAME_IN...
Definition: bt_pbapc.h:320
uint32_t handle
PBAPC handle.
Definition: bt_pbapc.h:298
uint8_t name_length
The length of the name.
Definition: bt_pbapc.h:289
uint32_t handle
PBAPC handle.
Definition: bt_pbapc.h:314
bt_status_t bt_pbapc_pull_vcard_entry(uint32_t handle, uint8_t index)
This function pulls a specific vCard object from the specified remote device.
uint32_t handle
PBAPC handle.
Definition: bt_pbapc.h:281
uint8_t bt_bd_addr_t[6]
Address type, defined in Bluetooth core specification version 4.2.
Definition: bt_type.h:180
int32_t bt_status_t
Define the status type, returned from the APIs, and defined as BT_STATUS_XXX.
Definition: bt_type.h:173
bt_status_t bt_pbapc_connect(uint32_t *handle, const bt_bd_addr_t *address)
This function connects to the specified remote device.
bt_status_t bt_pbapc_get_caller_name_by_number(uint32_t handle, uint8_t *number)
This function gets the contact name of a phonebook object stored in the phonebook of the remote devic...
This structure defines the data type of the parameter in the callback for BT_PBAPC_GET_PHOENBOOK_OBJE...
Definition: bt_pbapc.h:297
uint8_t bt_pbapc_phonebook_type_t
The following macros define the type of phonebook objects.
Definition: bt_pbapc.h:236
This structure defines the data type of the parameter in the callback for BT_PBAPC_GET_PHONEBOOK_OBJE...
Definition: bt_pbapc.h:280
This structure defines the data type of the parameter in the callback for BT_PBAPC_GET_NUMBER_OF_PHOE...
Definition: bt_pbapc.h:265
bt_pbapc_contact_t * caller
The contact information of phonebook objects.
Definition: bt_pbapc.h:322
bt_status_t bt_pbapc_get_phonebook_objects(uint32_t handle, uint16_t offset, bt_pbapc_phonebook_type_t type)
This function gets the phonebook objects of type Missed Calls History or Main Phone Book of the speci...
This structure defines the data type of the parameter in the callback for BT_PBAPC_GET_NUMBER_OF_PHOE...
Definition: bt_pbapc.h:272
uint32_t handle
PBAPC handle.
Definition: bt_pbapc.h:259
This structure defines the contact name.
Definition: bt_pbapc.h:305
uint32_t handle
PBAPC handle.
Definition: bt_pbapc.h:266
uint8_t length
The length of the contact name.
Definition: bt_pbapc.h:306
uint8_t * name
The the contact name.
Definition: bt_pbapc.h:307
bt_pbapc_phonebook_objects_t * object
The information of phonebook objects.
Definition: bt_pbapc.h:299