• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
16 #ifndef DISC_INTERFACE_STRUCT_H
17 #define DISC_INTERFACE_STRUCT_H
18 
19 #include "softbus_common.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /**
26  * @ingroup softbus_disc_manager
27  * Inner Module.
28  *
29  */
30 typedef enum {
31     MODULE_MIN = 1,
32     MODULE_LNN = MODULE_MIN,
33     MODULE_CONN = 2,
34     MODULE_MAX = MODULE_CONN
35 } DiscModule;
36 
37 typedef enum {
38     LINK_STATUS_UP = 0,
39     LINK_STATUS_DOWN,
40 } LinkStatus;
41 
42 typedef enum {
43     TYPE_LOCAL_DEVICE_NAME,
44     TYPE_ACCOUNT,
45 } InfoTypeChanged;
46 
47 /**
48  * @ingroup softbus_disc_manager
49  * Inner Callback.
50  *
51  */
52 typedef struct {
53     void (*OnDeviceFound)(const DeviceInfo *device, const InnerDeviceInfoAddtions *addtions);
54 } DiscInnerCallback;
55 
56 typedef struct {
57     char bleMac[BT_MAC_LEN];
58     char accountHash[MAX_ACCOUNT_HASH_LEN];
59     char deviceIdHash[DISC_MAX_DEVICE_ID_LEN];
60     uint8_t heartbeatValue[HB_HEARTBEAT_VALUE_LEN];
61     uint32_t deviceTypeId;
62     int32_t heartbeatVersion;
63     int32_t heartbeatType;
64     uint64_t nowTimes;
65 } RaiseHandDeviceInfo;
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* DISC_INTERFACE_STRUCT_H */