• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 IF_BUS_CENTER_EX_STRUCT_H
17 #define IF_BUS_CENTER_EX_STRUCT_H
18 
19 #include <stdbool.h>
20 #include <stdint.h>
21 #include "meta_socket_struct.h"
22 #include "softbus_bus_center.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #define DATA_MAX_LEN 2048
29 
30 typedef enum {
31     DISCOVERT_POLICY_ALLOW_REPLY,
32     DISCOVERT_POLICY_REJECT_REPLY,
33     DISCOVERT_POLICY_ALLOW_REPLY_SYNC,
34 } DiscoveryPolicy;
35 
36 /**
37 * @brief Defines parameter, see {@link CustomData}.
38 *
39 * @since 1.0
40 * @version 1.0
41 */
42 typedef struct {
43     MetaNodeType type;           /**< User type */
44     uint8_t data[DATA_MAX_LEN];  /**< User data */
45 } CustomData;
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif  //SOFTBUS_BUS_CENTER_EX_STRUCT_H