1 /* 2 * Copyright (c) 2020-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 DEVHOST_SERVICE_CLNT_H 10 #define DEVHOST_SERVICE_CLNT_H 11 12 #include "devhost_service_if.h" 13 #include "hdf_slist.h" 14 #include "hdf_map.h" 15 16 struct DevHostServiceClnt { 17 struct DListHead node; 18 struct HdfSList devices; 19 struct HdfSList unloadDevInfos; 20 struct HdfSList dynamicDevInfos; 21 Map *deviceHashMap; 22 struct IDevHostService *hostService; 23 uint16_t devCount; 24 uint16_t hostId; 25 int hostPid; 26 const char *hostName; 27 bool stopFlag; 28 }; 29 30 int DevHostServiceClntInstallDriver(struct DevHostServiceClnt *hostClnt); 31 struct DevHostServiceClnt *DevHostServiceClntNewInstance(uint16_t hostId, const char *hostName); 32 void DevHostServiceClntFreeInstance(struct DevHostServiceClnt *hostClnt); 33 void DevHostServiceClntDelete(struct DevHostServiceClnt *hostClnt); 34 35 #endif /* DEVHOST_SERVICE_CLNT_H */ 36