• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2024 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 DIALOG_PAIR_H
17 #define DIALOG_PAIR_H
18 
19 #include "raw_address.h"
20 
21 namespace OHOS {
22 namespace bluetooth {
23 class DialogPair {
24 public:
25     /**
26      * @brief Request bluetooth pair dialog
27      *
28      * @param device device.
29      * @param reqType reqType for pair
30      * @param number pinCode
31      * @return Returns <b>true</b> if the operation is successful;
32      *         returns <b>false</b> if the operation fails.
33      * @since 6
34      */
35     static bool RequestBluetoothPairDialog(const RawAddress& device, int reqType, int number);
36 
37     /**
38      * @brief Build command string to send
39      *
40      * @param device device
41      * @param reqType reqType for pair
42      * @param number pinCode
43      * @return Returns string to send
44      * @since 6
45      */
46     static std::string BuildStartCommand(const RawAddress& device, int reqType, int number);
47 };
48 } // namespace bluetooth
49 } // namespace OHOS
50 #endif // DIALOG_PAIR_H