1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 #ifndef _SCO_API_H
5 #define _SCO_API_H
6 #include "btlib_type.h"
7 
8 /* notify upper layer */
9 enum sco_event_enum {
10     SCO_OPENED,
11     SCO_CLOSED
12 };
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17     int8 sco_register_link(struct bdaddr_t *bdaddr,
18                            void (*sco_notify_callback) (enum sco_event_enum event, void *pdata), void *link);
19     int8 sco_open_link(struct bdaddr_t *bdaddr,
20                        void (*sco_notify_callback) (enum sco_event_enum event, void *pdata, void *link), void *link);
21     int8 sco_close_link(struct bdaddr_t *bdaddr1, uint8 reason, void *link);
22     int8 sco_unregister_link(struct bdaddr_t *bdaddr);
23     int8 sco_init(void);
24     int8 sco_exit(void);
25     void sco_conn_opened_ind(struct bdaddr_t *bdaddr_remote);
26     void sco_conn_closed_ind(struct bdaddr_t *bdaddr_remote);
27 #ifdef __cplusplus
28     extern "C" {
29 #endif
30 
31 #endif                          /**/
32