1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef SOFTBUS_MODULE_MANAGER_H 10 #define SOFTBUS_MODULE_MANAGER_H 11 12 #include "hdf_base.h" 13 #include "hdf_device_desc.h" 14 #include "hdf_sbuf.h" 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 typedef enum { 21 SOFTBUS_MODULE_WLAN_PARAM_MONITOR = 0, 22 SOFTBUS_MODULE_LWIP_MONITOR, 23 SOFTBUS_MODULE_MAX_INDEX, 24 } SoftbusDriverModuleId; 25 26 typedef int32_t (*SoftbusDriverModuleInit)(struct HdfDeviceObject *device); 27 typedef void (*SoftbusDriverModuleDeinit)(void); 28 typedef void (*SoftbusDriverModuleProcess)(const struct HdfSBuf *reqData, struct HdfSBuf *rspData); 29 30 typedef struct { 31 int32_t moduleId; 32 SoftbusDriverModuleInit init; 33 SoftbusDriverModuleDeinit deinit; 34 SoftbusDriverModuleProcess process; 35 } SoftbusDriverModule; 36 37 int32_t SoftbusModuleManagerInit(struct HdfDeviceObject *device); 38 void SoftbusModuleManagerDeinit(void); 39 void SoftbusDispatchModuleCommand(int32_t moduleId, const struct HdfSBuf *reqData, struct HdfSBuf *rspData); 40 41 #ifdef __cplusplus 42 } 43 #endif 44 45 #endif // SOFTBUS_MODULE_MANAGER_H