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 DEVMGR_SERVICE_CLIENT_H 10 #define DEVMGR_SERVICE_CLIENT_H 11 12 #include "devhost_service_if.h" 13 #include "devmgr_service_if.h" 14 #include "hdf_device_token.h" 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif /* __cplusplus */ 19 20 struct DevmgrServiceClnt { 21 struct IDevmgrService *devMgrSvcIf; 22 }; 23 24 struct DevmgrServiceClnt *DevmgrServiceClntGetInstance(void); 25 void DevmgrServiceClntFreeInstance(struct DevmgrServiceClnt *inst); 26 int DevmgrServiceClntAttachDevice(struct IHdfDeviceToken *deviceToken); 27 int DevmgrServiceClntDetachDevice(devid_t devid); 28 int DevmgrServiceClntAttachDeviceHost(uint16_t hostId, struct IDevHostService *hostService); 29 30 #ifdef __cplusplus 31 } 32 #endif /* __cplusplus */ 33 34 #endif /* DEVMGR_SERVICE_CLIENT_H */ 35