1 /*
2 * Copyright (C) 2025 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 #include "taihe_bluetooth_ble_advertise_callback.h"
16
17 #include "bluetooth_log.h"
18
19 namespace OHOS {
20 namespace Bluetooth {
TaiheBluetoothBleAdvertiseCallback()21 TaiheBluetoothBleAdvertiseCallback::TaiheBluetoothBleAdvertiseCallback()
22 {}
23
GetInstance(void)24 std::shared_ptr<TaiheBluetoothBleAdvertiseCallback> TaiheBluetoothBleAdvertiseCallback::GetInstance(void)
25 {
26 static std::shared_ptr<TaiheBluetoothBleAdvertiseCallback> instance =
27 std::make_shared<TaiheBluetoothBleAdvertiseCallback>();
28 return instance;
29 }
30
OnStartResultEvent(int result,int advHandle)31 void TaiheBluetoothBleAdvertiseCallback::OnStartResultEvent(int result, int advHandle)
32 {
33 HILOGI("enter, result: %{public}d advHandle: %{public}d", result, advHandle);
34 }
35
OnEnableResultEvent(int result,int advHandle)36 void TaiheBluetoothBleAdvertiseCallback::OnEnableResultEvent(int result, int advHandle)
37 {
38 HILOGI("enter, result: %{public}d advHandle: %{public}d", result, advHandle);
39 }
40
OnDisableResultEvent(int result,int advHandle)41 void TaiheBluetoothBleAdvertiseCallback::OnDisableResultEvent(int result, int advHandle)
42 {
43 HILOGI("enter, result: %{public}d advHandle: %{public}d", result, advHandle);
44 }
45
OnStopResultEvent(int result,int advHandle)46 void TaiheBluetoothBleAdvertiseCallback::OnStopResultEvent(int result, int advHandle)
47 {
48 HILOGI("enter, result: %{public}d advHandle: %{public}d", result, advHandle);
49 }
50
OnSetAdvDataEvent(int result)51 void TaiheBluetoothBleAdvertiseCallback::OnSetAdvDataEvent(int result)
52 {}
53
OnGetAdvHandleEvent(int result,int advHandle)54 void TaiheBluetoothBleAdvertiseCallback::OnGetAdvHandleEvent(int result, int advHandle)
55 {
56 advHandle_ = advHandle;
57 }
58
OnChangeAdvResultEvent(int result,int advHandle)59 void TaiheBluetoothBleAdvertiseCallback::OnChangeAdvResultEvent(int result, int advHandle)
60 {}
61 } // namespace Bluetooth
62 } // namespace OHOS