1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef SOFTBUS_CONN_BLE_CLIENT_H
17 #define SOFTBUS_CONN_BLE_CLIENT_H
18 
19 #include "message_handler.h"
20 #include "softbus_conn_ble_connection.h"
21 #include "softbus_conn_interface.h"
22 #include "softbus_error_code.h"
23 
24 /* In the fastest connection mode, the underlying connection timeout and notifications is set to 3500 milliseconds */
25 #define BLE_FAST_CONNECT_TIMEOUT 3500
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 int32_t ConnGattClientConnect(ConnBleConnection *connection);
32 int32_t ConnGattClientDisconnect(ConnBleConnection *connection, bool grace, bool refreshGatt);
33 int32_t ConnGattClientSend(ConnBleConnection *connection, const uint8_t *data, uint32_t dataLen, int32_t module);
34 int32_t ConnGattClientUpdatePriority(ConnBleConnection *connection, ConnectBlePriority priority);
35 int32_t ConnGattInitClientModule(SoftBusLooper *looper, const ConnBleClientEventListener *listener);
36 
37 #ifdef __cplusplus
38 }
39 #endif /* __cplusplus */
40 #endif /* SOFTBUS_CONN_BLE_CLIENT_H */